修复数据库中反斜杠转义问题
This commit is contained in:
@ -161,8 +161,8 @@ export function Field(typename: string, name: string | undefined, encode: IEntit
|
||||
* @param name 字段名称
|
||||
* @param option 字段选项
|
||||
*/
|
||||
export function IntColumn(name: string, option?: { primary: boolean, virtual?: boolean }): Decorators.PropDecorator<BasicEntity>
|
||||
export function IntColumn(option?: { primary: boolean, virtual?: boolean }): Decorators.PropDecorator<BasicEntity>
|
||||
export function IntColumn(name: string, option?: { primary?: boolean, virtual?: boolean }): Decorators.PropDecorator<BasicEntity>
|
||||
export function IntColumn(option?: { primary?: boolean, virtual?: boolean }): Decorators.PropDecorator<BasicEntity>
|
||||
export function IntColumn(name?: any, option?: any) {
|
||||
if (typeof name != "string") {
|
||||
option = name;
|
||||
|
@ -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