(
path: string[],
type: string,
aliased: boolean,
value?: unknown,
)
| 101 | } |
| 102 | |
| 103 | override getSearchJsonPropertyKey( |
| 104 | path: string[], |
| 105 | type: string, |
| 106 | aliased: boolean, |
| 107 | value?: unknown, |
| 108 | ): string | RawQueryFragment { |
| 109 | const [a, ...b] = path; |
| 110 | const jsonPath = this.quoteValue(`$.${b.map(this.quoteJsonKey).join('.')}`); |
| 111 | |
| 112 | if (aliased) { |
| 113 | return raw(alias => `json_extract(${this.quoteIdentifier(`${alias}.${a}`)}, ${jsonPath})`); |
| 114 | } |
| 115 | |
| 116 | return raw(`json_extract(${this.quoteIdentifier(a)}, ${jsonPath})`); |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * Quotes a key for use inside a JSON path expression (e.g. `$.key`). |
nothing calls this directly
no test coverage detected