Skip to content

Commit bd36361

Browse files
authored
Merge pull request #485 from atelier-saulx/fix/no-indexing-has
disable indexing for `has` filter operator
2 parents 9f59284 + ea0a173 commit bd36361

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

client/src/get/executeGetOperations/indexing.ts

-24
Original file line numberDiff line numberDiff line change
@@ -35,30 +35,6 @@ function ast2inlineRpn(schema: Schema, f: FilterAST | null): string | null {
3535
const num = Number(f.$value)
3636
return Number.isNaN(num) ? null : `"${f.$field}" g #${num} F`
3737
}
38-
case 'has':
39-
if (['ancestors', 'children', 'descendants', 'parents'].includes(f.$field)) {
40-
return null
41-
}
42-
43-
if (typeof f.$value === 'string') {
44-
return `"${f.$value}" "${f.$field}" a`
45-
} else if (typeof f.$value === 'number') {
46-
return `#${f.$value} "${f.$field}" a`
47-
} else if (Array.isArray(f.$value)) {
48-
if (typeof f.$value[0] === 'string') {
49-
if (f.$value.some((v: string) => v.includes('"'))) {
50-
// We can't inline quotes at the moment
51-
return null
52-
}
53-
54-
const a = `{${f.$value.map((v) => `"${v}"`).join(',')}}`
55-
return `"${f.$field}" ${a} l`
56-
} else if (typeof f.$value[0] === 'number') {
57-
const a = `{${f.$value.map((v) => `#${v}`).join(',')}}`
58-
return `"${f.$field}" ${a} l`
59-
}
60-
return null
61-
}
6238
case 'exists':
6339
return `"${f.$field}" h`
6440
case 'notExists':

0 commit comments

Comments
 (0)