not support in queries

pull/612/head
Zef Hemel 2023-12-21 18:21:00 +01:00
parent 1a86c5b326
commit 62d55e11ff
2 changed files with 5 additions and 1 deletions

View File

@ -25,6 +25,9 @@ export function evalQueryExpression(
// Value types
case "null":
return null;
// TODO: Add this to the actualy query syntax
case "not":
return !evalQueryExpression(op1, obj, functionMap);
case "number":
case "string":
case "boolean":

View File

@ -97,6 +97,7 @@ export type QueryExpression =
| ["string", string]
| ["boolean", boolean]
| ["null"]
| ["not", QueryExpression]
| ["array", QueryExpression[]]
| ["object", Record<string, any>]
| ["regexp", string, string] // regex, modifier
@ -145,4 +146,4 @@ export type UploadFile = {
name: string;
contentType: string;
content: Uint8Array;
}
};