Escape quotes in IN clause
This commit is contained in:
parent
3a180c1b3c
commit
535b2b6594
|
@ -23,5 +23,5 @@ export function buildInQuery (term: string, values: string[] | number[]) {
|
|||
}
|
||||
|
||||
export function buildInValuesArray (values: string[] | number[]) {
|
||||
return '[' + values.map(v => `'${v}'`).join(',') + ']'
|
||||
return '[' + values.map(v => `'${v.replace(/'/g, '\\\'')}'`).join(',') + ']'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue