@bridgerust/embex 0.1.2 → 0.1.3
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/index.js +14 -23
- package/dist/src/index.js +26 -0
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "QueryBuilder", { enumerable: true, get: function () { return native_1.QueryBuilder; } });
|
|
8
|
-
Object.defineProperty(exports, "SearchBuilder", { enumerable: true, get: function () { return native_1.SearchBuilder; } });
|
|
9
|
-
Object.defineProperty(exports, "cli", { enumerable: true, get: function () { return
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
native_1.cli; } });
|
|
12
|
-
// Monkey patch
|
|
13
|
-
native_1.Collection.prototype.insertStream = async function (points, parallel = 5) {
|
|
14
|
-
const BATCH_SIZE = 100;
|
|
15
|
-
let batch = [];
|
|
16
|
-
for await (const point of points) {
|
|
17
|
-
batch.push(point);
|
|
18
|
-
if (batch.length >= BATCH_SIZE) {
|
|
19
|
-
await this.insertBatch(batch, BATCH_SIZE, parallel);
|
|
20
|
-
batch = [];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
if (batch.length > 0) {
|
|
24
|
-
await this.insertBatch(batch, BATCH_SIZE, parallel);
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25
7
|
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
26
15
|
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./src"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cli = exports.SearchBuilder = exports.QueryBuilder = exports.EmbexClient = exports.Collection = void 0;
|
|
4
|
+
const native_1 = require("../native");
|
|
5
|
+
Object.defineProperty(exports, "Collection", { enumerable: true, get: function () { return native_1.Collection; } });
|
|
6
|
+
Object.defineProperty(exports, "EmbexClient", { enumerable: true, get: function () { return native_1.EmbexClient; } });
|
|
7
|
+
Object.defineProperty(exports, "QueryBuilder", { enumerable: true, get: function () { return native_1.QueryBuilder; } });
|
|
8
|
+
Object.defineProperty(exports, "SearchBuilder", { enumerable: true, get: function () { return native_1.SearchBuilder; } });
|
|
9
|
+
Object.defineProperty(exports, "cli", { enumerable: true, get: function () { return
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
native_1.cli; } });
|
|
12
|
+
// Monkey patch
|
|
13
|
+
native_1.Collection.prototype.insertStream = async function (points, parallel = 5) {
|
|
14
|
+
const BATCH_SIZE = 100;
|
|
15
|
+
let batch = [];
|
|
16
|
+
for await (const point of points) {
|
|
17
|
+
batch.push(point);
|
|
18
|
+
if (batch.length >= BATCH_SIZE) {
|
|
19
|
+
await this.insertBatch(batch, BATCH_SIZE, parallel);
|
|
20
|
+
batch = [];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (batch.length > 0) {
|
|
24
|
+
await this.insertBatch(batch, BATCH_SIZE, parallel);
|
|
25
|
+
}
|
|
26
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bridgerust/embex",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Embex Vector Database ORM Node.js Bindings",
|
|
5
5
|
"homepage": "https://github.com/bridgerust/bridgerust/embex",
|
|
6
6
|
"repository": {
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"@types/node": "^25.0.3"
|
|
62
62
|
},
|
|
63
63
|
"optionalDependencies": {
|
|
64
|
-
"@bridgerust/embex-darwin-arm64": "0.1.
|
|
65
|
-
"@bridgerust/embex-darwin-x64": "0.1.
|
|
66
|
-
"@bridgerust/embex-linux-x64-musl": "0.1.
|
|
67
|
-
"@bridgerust/embex-linux-arm64-musl": "0.1.
|
|
68
|
-
"@bridgerust/embex-win32-ia32-msvc": "0.1.
|
|
69
|
-
"@bridgerust/embex-linux-arm-gnueabihf": "0.1.
|
|
64
|
+
"@bridgerust/embex-darwin-arm64": "0.1.3",
|
|
65
|
+
"@bridgerust/embex-darwin-x64": "0.1.3",
|
|
66
|
+
"@bridgerust/embex-linux-x64-musl": "0.1.3",
|
|
67
|
+
"@bridgerust/embex-linux-arm64-musl": "0.1.3",
|
|
68
|
+
"@bridgerust/embex-win32-ia32-msvc": "0.1.3",
|
|
69
|
+
"@bridgerust/embex-linux-arm-gnueabihf": "0.1.3"
|
|
70
70
|
}
|
|
71
71
|
}
|