修复数据库中反斜杠转义问题
This commit is contained in:
@ -6,7 +6,7 @@ export function escapeID(...keys: string[]) {
|
||||
|
||||
export function escapeValue(value: any) {
|
||||
if (typeof value === "number") return value.toString();
|
||||
else if (typeof value === "string") return `E'${(value).replaceAll("'", "\\x27")}'`;
|
||||
else if (typeof value === "string") return `E'${(value).replaceAll("'", "\\x27").replaceAll("\\", "\\x5c")}'`;
|
||||
else if (typeof value === "boolean") return value.toString();
|
||||
else if (typeof value === "bigint") return value.toString();
|
||||
else if (value === null) return "null";
|
||||
|
Reference in New Issue
Block a user