diff --git a/plug-api/lib/query.ts b/plug-api/lib/query.ts index a1613295..33a13455 100644 --- a/plug-api/lib/query.ts +++ b/plug-api/lib/query.ts @@ -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": diff --git a/plug-api/types.ts b/plug-api/types.ts index 2b2d439d..496c9f52 100644 --- a/plug-api/types.ts +++ b/plug-api/types.ts @@ -97,6 +97,7 @@ export type QueryExpression = | ["string", string] | ["boolean", boolean] | ["null"] + | ["not", QueryExpression] | ["array", QueryExpression[]] | ["object", Record] | ["regexp", string, string] // regex, modifier @@ -145,4 +146,4 @@ export type UploadFile = { name: string; contentType: string; content: Uint8Array; -} \ No newline at end of file +};