@based/db 0.0.7 → 0.0.8
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/dist/lib/darwin_aarch64/libnode-v20.11.1.node +0 -0
- package/dist/lib/darwin_aarch64/libnode-v20.18.1.node +0 -0
- package/dist/lib/darwin_aarch64/libnode-v22.13.0.node +0 -0
- package/dist/lib/darwin_aarch64/libselva.dylib +0 -0
- package/dist/lib/linux_aarch64/libnode-v20.11.1.node +0 -0
- package/dist/lib/linux_aarch64/libnode-v20.18.1.node +0 -0
- package/dist/lib/linux_aarch64/libnode-v22.13.0.node +0 -0
- package/dist/lib/linux_aarch64/libselva.so +0 -0
- package/dist/lib/linux_x86_64/libnode-v20.11.1.node +0 -0
- package/dist/lib/linux_x86_64/libnode-v20.18.1.node +0 -0
- package/dist/lib/linux_x86_64/libnode-v22.13.0.node +0 -0
- package/dist/lib/linux_x86_64/libselva.so +0 -0
- package/dist/src/client/query/filter/filter.js +5 -2
- package/dist/src/server/migrate/index.js +6 -2
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -134,10 +134,13 @@ export const convertFilter = (field, operator, value) => {
|
|
|
134
134
|
}
|
|
135
135
|
else {
|
|
136
136
|
if (operator == 'like') {
|
|
137
|
-
if (value
|
|
137
|
+
if (value == null) {
|
|
138
|
+
throw new Error('Value is required');
|
|
139
|
+
}
|
|
140
|
+
if (value?.normalize) {
|
|
138
141
|
value = normalizeNeedle(value);
|
|
139
142
|
}
|
|
140
|
-
else {
|
|
143
|
+
else if (Array.isArray(value) && value[0]?.normalize) {
|
|
141
144
|
value = value.map(normalizeNeedle);
|
|
142
145
|
}
|
|
143
146
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { BasedDb } from '../../index.js';
|
|
2
|
-
import { join } from 'path';
|
|
2
|
+
import { dirname, join } from 'path';
|
|
3
3
|
import { tmpdir } from 'os';
|
|
4
4
|
import { Worker, MessageChannel } from 'node:worker_threads';
|
|
5
5
|
import native from '../../native.js';
|
|
6
6
|
import './worker.js';
|
|
7
7
|
import { foreachDirtyBlock } from '../tree.js';
|
|
8
|
+
import { fileURLToPath } from 'url';
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = dirname(__filename);
|
|
11
|
+
const workerPath = join(__dirname, 'worker.js');
|
|
8
12
|
let migrationCnt = 0;
|
|
9
13
|
const parseTransform = (transform) => {
|
|
10
14
|
const res = {};
|
|
@@ -45,7 +49,7 @@ export const migrate = async (fromDbServer, toSchema, transform) => {
|
|
|
45
49
|
const toAddress = native.intFromExternal(toCtx);
|
|
46
50
|
const transformFns = parseTransform(transform);
|
|
47
51
|
atomics[0] = 1;
|
|
48
|
-
const worker = new Worker(
|
|
52
|
+
const worker = new Worker(workerPath, {
|
|
49
53
|
workerData: {
|
|
50
54
|
from: fromAddress,
|
|
51
55
|
to: toAddress,
|