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:
parent
9b726126ed
commit
5d87b7e411
3 changed files with 760 additions and 117 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue