1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-19 13:19:41 +02:00

feature: query filter support for common SQL keywords (#2366)

* added support for SQL keywords IS, IN, LIKE, NOT
deprecated datetime workaround for "<> null"
updated frontend reference for "<> null" to "IS NOT NULL"

* tests

* refactored query filtering to leverage orm

* added CONTAINS ALL keyword

* tests

* fixed bug where "and" or "or" was in an attr name

* more tests

* linter fixes

* TIL this works
This commit is contained in:
Michael Genson 2023-05-06 17:28:40 -05:00 committed by GitHub
parent 9b726126ed
commit 5d87b7e411
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 760 additions and 117 deletions

View file

@ -217,7 +217,7 @@ export default defineComponent({
const queryFilter = computed(() => {
const orderBy = props.query?.orderBy || preferences.value.orderBy;
return preferences.value.filterNull && orderBy ? `${orderBy} <> null` : null;
return preferences.value.filterNull && orderBy ? `${orderBy} IS NOT NULL` : null;
});
async function fetchRecipes(pageCount = 1) {