@opra/mongodb 1.8.0 → 1.9.1
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.
|
@@ -127,6 +127,16 @@ function prepareFilterAst(ast, negative) {
|
|
|
127
127
|
$and: [{ $ne: { [left]: null } }, { [left]: { $exists: true } }],
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
|
+
if (ast.prepare) {
|
|
131
|
+
const x = ast.prepare({
|
|
132
|
+
left,
|
|
133
|
+
right,
|
|
134
|
+
op: ast.op,
|
|
135
|
+
adapter: 'mongodb',
|
|
136
|
+
});
|
|
137
|
+
if (x)
|
|
138
|
+
return x;
|
|
139
|
+
}
|
|
130
140
|
const mngOp = opMap[ast.op];
|
|
131
141
|
if (mngOp) {
|
|
132
142
|
if (ast.op === 'in' || ast.op === '!in')
|
|
@@ -124,6 +124,16 @@ function prepareFilterAst(ast, negative) {
|
|
|
124
124
|
$and: [{ $ne: { [left]: null } }, { [left]: { $exists: true } }],
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
+
if (ast.prepare) {
|
|
128
|
+
const x = ast.prepare({
|
|
129
|
+
left,
|
|
130
|
+
right,
|
|
131
|
+
op: ast.op,
|
|
132
|
+
adapter: 'mongodb',
|
|
133
|
+
});
|
|
134
|
+
if (x)
|
|
135
|
+
return x;
|
|
136
|
+
}
|
|
127
137
|
const mngOp = opMap[ast.op];
|
|
128
138
|
if (mngOp) {
|
|
129
139
|
if (ast.op === 'in' || ast.op === '!in')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opra/mongodb",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "Opra MongoDB adapter package",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"valgen": "^5.12.0"
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
|
-
"@opra/common": "^1.
|
|
14
|
-
"@opra/core": "^1.
|
|
15
|
-
"@opra/http": "^1.
|
|
13
|
+
"@opra/common": "^1.9.1",
|
|
14
|
+
"@opra/core": "^1.9.1",
|
|
15
|
+
"@opra/http": "^1.9.1",
|
|
16
16
|
"mongodb": "^6.0.0"
|
|
17
17
|
},
|
|
18
18
|
"type": "module",
|