@mikro-orm/postgresql 7.0.0-dev.65 → 7.0.0-dev.67
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.
- package/PostgreSqlPlatform.d.ts +1 -1
- package/PostgreSqlPlatform.js +3 -3
- package/package.json +3 -3
package/PostgreSqlPlatform.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IPostgresInterval } from 'postgres-interval';
|
|
2
|
-
import { type
|
|
2
|
+
import { type Configuration, type EntityProperty, type IsolationLevel, type SimpleColumnMeta, Type } from '@mikro-orm/core';
|
|
3
3
|
import { AbstractSqlPlatform, type IndexDef, PostgreSqlNativeQueryBuilder } from '@mikro-orm/knex';
|
|
4
4
|
import { PostgreSqlSchemaHelper } from './PostgreSqlSchemaHelper.js';
|
|
5
5
|
import { PostgreSqlExceptionConverter } from './PostgreSqlExceptionConverter.js';
|
package/PostgreSqlPlatform.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Client } from 'pg';
|
|
2
2
|
import parseDate from 'postgres-date';
|
|
3
3
|
import PostgresInterval from 'postgres-interval';
|
|
4
|
-
import {
|
|
4
|
+
import { ALIAS_REPLACEMENT, ARRAY_OPERATORS, raw, RawQueryFragment, Type, Utils, } from '@mikro-orm/core';
|
|
5
5
|
import { AbstractSqlPlatform, PostgreSqlNativeQueryBuilder } from '@mikro-orm/knex';
|
|
6
6
|
import { PostgreSqlSchemaHelper } from './PostgreSqlSchemaHelper.js';
|
|
7
7
|
import { PostgreSqlExceptionConverter } from './PostgreSqlExceptionConverter.js';
|
|
@@ -162,7 +162,7 @@ export class PostgreSqlPlatform extends AbstractSqlPlatform {
|
|
|
162
162
|
if (column.nativeEnumName) {
|
|
163
163
|
return column.nativeEnumName;
|
|
164
164
|
}
|
|
165
|
-
if (column.items?.every(item =>
|
|
165
|
+
if (column.items?.every(item => typeof item === 'string')) {
|
|
166
166
|
return 'text';
|
|
167
167
|
}
|
|
168
168
|
return `smallint`;
|
|
@@ -231,7 +231,7 @@ export class PostgreSqlPlatform extends AbstractSqlPlatform {
|
|
|
231
231
|
const cast = (key) => raw(type in types ? `(${key})::${types[type]}` : key);
|
|
232
232
|
let lastOperator = '->>';
|
|
233
233
|
// force `->` for operator payloads with array values
|
|
234
|
-
if (Utils.isPlainObject(value) && Object.keys(value).every(key =>
|
|
234
|
+
if (Utils.isPlainObject(value) && Object.keys(value).every(key => ARRAY_OPERATORS.includes(key) && Array.isArray(value[key]))) {
|
|
235
235
|
lastOperator = '->';
|
|
236
236
|
}
|
|
237
237
|
if (path.length === 0) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/postgresql",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.0-dev.
|
|
4
|
+
"version": "7.0.0-dev.67",
|
|
5
5
|
"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.",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./package.json": "./package.json",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@mikro-orm/knex": "7.0.0-dev.
|
|
53
|
+
"@mikro-orm/knex": "7.0.0-dev.67",
|
|
54
54
|
"pg": "8.16.3",
|
|
55
55
|
"pg-cursor": "2.15.3",
|
|
56
56
|
"postgres-array": "3.0.4",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"kysely": "0.28.8"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@mikro-orm/core": "7.0.0-dev.
|
|
65
|
+
"@mikro-orm/core": "7.0.0-dev.67",
|
|
66
66
|
"kysely": "*"
|
|
67
67
|
}
|
|
68
68
|
}
|