@opra/sqb 0.20.3 → 0.22.0
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.
|
@@ -97,9 +97,9 @@ common_1.DocumentFactory.prototype.extractFieldSchema = async function (target,
|
|
|
97
97
|
target.exclusive = sqbField.exclusive;
|
|
98
98
|
};
|
|
99
99
|
// @ts-ignore
|
|
100
|
-
const
|
|
100
|
+
const _extractCollectionSchema = common_1.DocumentFactory.prototype.extractCollectionSchema;
|
|
101
101
|
// @ts-ignore
|
|
102
|
-
common_1.DocumentFactory.prototype.
|
|
102
|
+
common_1.DocumentFactory.prototype.extractCollectionSchema = async function (schema, ctor, metadata, controller) {
|
|
103
103
|
const { document } = this;
|
|
104
104
|
const dataType = document.getComplexType(schema.type);
|
|
105
105
|
// Determine primaryKey if not defined
|
|
@@ -112,5 +112,5 @@ common_1.DocumentFactory.prototype.createCollection = async function (name, sche
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
return await
|
|
115
|
+
return await _extractCollectionSchema.call(this, schema, ctor, metadata, controller);
|
|
116
116
|
};
|
package/cjs/transform-filter.js
CHANGED
|
@@ -33,7 +33,7 @@ function transformFilter(ast) {
|
|
|
33
33
|
return transformFilter(ast.expression);
|
|
34
34
|
}
|
|
35
35
|
if (ast instanceof common_1.OpraFilter.ComparisonExpression) {
|
|
36
|
-
const left =
|
|
36
|
+
const left = String(ast.left);
|
|
37
37
|
const right = transformFilter(ast.right);
|
|
38
38
|
switch (ast.op) {
|
|
39
39
|
case '=':
|
|
@@ -95,9 +95,9 @@ DocumentFactory.prototype.extractFieldSchema = async function (target, ctor, met
|
|
|
95
95
|
target.exclusive = sqbField.exclusive;
|
|
96
96
|
};
|
|
97
97
|
// @ts-ignore
|
|
98
|
-
const
|
|
98
|
+
const _extractCollectionSchema = DocumentFactory.prototype.extractCollectionSchema;
|
|
99
99
|
// @ts-ignore
|
|
100
|
-
DocumentFactory.prototype.
|
|
100
|
+
DocumentFactory.prototype.extractCollectionSchema = async function (schema, ctor, metadata, controller) {
|
|
101
101
|
const { document } = this;
|
|
102
102
|
const dataType = document.getComplexType(schema.type);
|
|
103
103
|
// Determine primaryKey if not defined
|
|
@@ -110,5 +110,5 @@ DocumentFactory.prototype.createCollection = async function (name, schema) {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
return await
|
|
113
|
+
return await _extractCollectionSchema.call(this, schema, ctor, metadata, controller);
|
|
114
114
|
};
|
package/esm/transform-filter.js
CHANGED
|
@@ -30,7 +30,7 @@ export default function transformFilter(ast) {
|
|
|
30
30
|
return transformFilter(ast.expression);
|
|
31
31
|
}
|
|
32
32
|
if (ast instanceof OpraFilter.ComparisonExpression) {
|
|
33
|
-
const left =
|
|
33
|
+
const left = String(ast.left);
|
|
34
34
|
const right = transformFilter(ast.right);
|
|
35
35
|
switch (ast.op) {
|
|
36
36
|
case '=':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opra/sqb",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Opra SQB adapter package",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@faker-js/faker": "^8.0.2",
|
|
33
|
-
"@sqb/builder": "^4.9.
|
|
34
|
-
"@sqb/connect": "^4.9.
|
|
35
|
-
"@sqb/postgres": "^4.9.
|
|
33
|
+
"@sqb/builder": "^4.9.1",
|
|
34
|
+
"@sqb/connect": "^4.9.1",
|
|
35
|
+
"@sqb/postgres": "^4.9.1",
|
|
36
36
|
"postgresql-client": "^2.5.9",
|
|
37
37
|
"ts-gems": "^2.4.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@opra/core": "^0.
|
|
40
|
+
"@opra/core": "^0.22.0",
|
|
41
41
|
"@sqb/connect": ">= 4.9.0"
|
|
42
42
|
},
|
|
43
43
|
"type": "module",
|