@mikro-orm/postgresql 6.3.11-dev.7 → 6.3.11-dev.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -76,7 +76,7 @@ export declare class PostgreSqlPlatform extends AbstractSqlPlatform {
76
76
  getSearchJsonPropertyKey(path: string[], type: string | undefined | Type, aliased: boolean, value?: unknown): string;
77
77
  getJsonIndexDefinition(index: IndexDef): string[];
78
78
  quoteIdentifier(id: string, quote?: string): string;
79
- quoteValue(value: any): string;
79
+ escape(value: any): string;
80
80
  private pad;
81
81
  /** @internal */
82
82
  formatDate(date: Date): string;
@@ -249,11 +249,7 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
249
249
  quoteIdentifier(id, quote = '"') {
250
250
  return `${quote}${id.replace('.', `${quote}.${quote}`)}${quote}`;
251
251
  }
252
- quoteValue(value) {
253
- /* istanbul ignore if */
254
- if (core_1.Utils.isPlainObject(value) || value?.[core_1.JsonProperty]) {
255
- value = JSON.stringify(value);
256
- }
252
+ escape(value) {
257
253
  if (typeof value === 'string') {
258
254
  return pg_1.Client.prototype.escapeLiteral(value);
259
255
  }
@@ -263,7 +259,7 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
263
259
  if (ArrayBuffer.isView(value)) {
264
260
  return `E'\\\\x${value.toString('hex')}'`;
265
261
  }
266
- return super.quoteValue(value);
262
+ return super.escape(value);
267
263
  }
268
264
  pad(number, digits) {
269
265
  return String(number).padStart(digits, '0');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/postgresql",
3
- "version": "6.3.11-dev.7",
3
+ "version": "6.3.11-dev.9",
4
4
  "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -58,7 +58,7 @@
58
58
  "access": "public"
59
59
  },
60
60
  "dependencies": {
61
- "@mikro-orm/knex": "6.3.11-dev.7",
61
+ "@mikro-orm/knex": "6.3.11-dev.9",
62
62
  "pg": "8.13.0",
63
63
  "postgres-array": "3.0.2",
64
64
  "postgres-date": "2.1.0",
@@ -68,6 +68,6 @@
68
68
  "@mikro-orm/core": "^6.3.10"
69
69
  },
70
70
  "peerDependencies": {
71
- "@mikro-orm/core": "6.3.11-dev.7"
71
+ "@mikro-orm/core": "6.3.11-dev.9"
72
72
  }
73
73
  }