@saulx/selva
Advanced tools
Comparing version 21.2.2 to 21.2.3
@@ -33,27 +33,2 @@ "use strict"; | ||
} | ||
case 'has': | ||
if (['ancestors', 'children', 'descendants', 'parents'].includes(f.$field)) { | ||
return null; | ||
} | ||
if (typeof f.$value === 'string') { | ||
return `"${f.$value}" "${f.$field}" a`; | ||
} | ||
else if (typeof f.$value === 'number') { | ||
return `#${f.$value} "${f.$field}" a`; | ||
} | ||
else if (Array.isArray(f.$value)) { | ||
if (typeof f.$value[0] === 'string') { | ||
if (f.$value.some((v) => v.includes('"'))) { | ||
// We can't inline quotes at the moment | ||
return null; | ||
} | ||
const a = `{${f.$value.map((v) => `"${v}"`).join(',')}}`; | ||
return `"${f.$field}" ${a} l`; | ||
} | ||
else if (typeof f.$value[0] === 'number') { | ||
const a = `{${f.$value.map((v) => `#${v}`).join(',')}}`; | ||
return `"${f.$field}" ${a} l`; | ||
} | ||
return null; | ||
} | ||
case 'exists': | ||
@@ -60,0 +35,0 @@ return `"${f.$field}" h`; |
{ | ||
"name": "@saulx/selva", | ||
"version": "21.2.2", | ||
"version": "21.2.3", | ||
"license": "MIT", | ||
@@ -54,3 +54,3 @@ "main": "dist/src/index.js", | ||
"@types/pg": "^8.6.1", | ||
"@saulx/selva-server": "21.2.2", | ||
"@saulx/selva-server": "21.2.3", | ||
"before-exit": "1.0.0", | ||
@@ -77,3 +77,3 @@ "async-exec": "^1.1.0", | ||
"data-record": "^1.0.0", | ||
"@saulx/selva-query-ast-parser": "^4.2.0", | ||
"@saulx/selva-query-ast-parser": "^4.0.2", | ||
"@types/uuid": "^8.3.0", | ||
@@ -80,0 +80,0 @@ "chalk": "^4.1.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1212559
16746