MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / quoteValue

Function quoteValue

packages/sql/src/AbstractSqlPlatform.ts:87–97  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

85 }
86
87 override quoteValue(value: any): string {
88 if (isRaw(value)) {
89 return this.formatQuery(value.sql, value.params);
90 }
91
92 if (Utils.isPlainObject(value) || value?.[JsonProperty]) {
93 return this.escape(JSON.stringify(value));
94 }
95
96 return this.escape(value);
97 }
98
99 override getSearchJsonPropertySQL(path: string, type: string, aliased: boolean): string | RawQueryFragment {
100 return this.getSearchJsonPropertyKey(path.split('->'), type, aliased);

Callers

nothing calls this directly

Calls 4

isRawFunction · 0.90
formatQueryMethod · 0.80
isPlainObjectMethod · 0.80
escapeMethod · 0.45

Tested by

no test coverage detected