ueberdb2 5.0.48 → 6.0.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.
- package/dist/{AbstractDatabase-a4jdIEuT.js → AbstractDatabase-DfQ39Ry6.js} +6 -13
- package/dist/{cassandra_db-C5K2zZew.js → cassandra_db-B_5ANRzM.js} +6 -7
- package/dist/{couch_db-BVd81sS7.js → couch_db-BXyzauwJ.js} +5 -20
- package/dist/databases/cassandra_db.d.ts +5 -3
- package/dist/databases/cassandra_db.d.ts.map +1 -1
- package/dist/databases/couch_db.d.ts +2 -4
- package/dist/databases/couch_db.d.ts.map +1 -1
- package/dist/databases/dirty_db.d.ts +1 -1
- package/dist/databases/dirty_db.d.ts.map +1 -1
- package/dist/databases/dirty_git_db.d.ts +1 -1
- package/dist/databases/dirty_git_db.d.ts.map +1 -1
- package/dist/databases/elasticsearch_db.d.ts +2 -2
- package/dist/databases/elasticsearch_db.d.ts.map +1 -1
- package/dist/databases/memory_db.d.ts +1 -1
- package/dist/databases/memory_db.d.ts.map +1 -1
- package/dist/databases/mock_db.d.ts +1 -1
- package/dist/databases/mock_db.d.ts.map +1 -1
- package/dist/databases/mongodb_db.d.ts +4 -3
- package/dist/databases/mongodb_db.d.ts.map +1 -1
- package/dist/databases/mssql_db.d.ts +3 -3
- package/dist/databases/mssql_db.d.ts.map +1 -1
- package/dist/databases/mysql_db.d.ts +3 -3
- package/dist/databases/mysql_db.d.ts.map +1 -1
- package/dist/databases/postgres_db.d.ts +2 -2
- package/dist/databases/postgres_db.d.ts.map +1 -1
- package/dist/databases/postgrespool_db.d.ts +1 -1
- package/dist/databases/postgrespool_db.d.ts.map +1 -1
- package/dist/databases/redis_db.d.ts +3 -3
- package/dist/databases/redis_db.d.ts.map +1 -1
- package/dist/databases/rethink_db.d.ts +2 -2
- package/dist/databases/rethink_db.d.ts.map +1 -1
- package/dist/databases/sqlite_db.d.ts +2 -2
- package/dist/databases/sqlite_db.d.ts.map +1 -1
- package/dist/databases/surrealdb_db.d.ts +3 -3
- package/dist/databases/surrealdb_db.d.ts.map +1 -1
- package/dist/{dirty_db-C9zUhXIG.js → dirty_db-CocfsG5w.js} +5 -7
- package/dist/{dirty_git_db-Cj3oEEyZ.js → dirty_git_db-BYnH74Hk.js} +8 -10
- package/dist/{elasticsearch_db-DjnZ1DHG.js → elasticsearch_db-C6G-Wnou.js} +12 -14
- package/dist/index.d.ts +44 -91
- package/dist/index.js +106 -282
- package/dist/lib/AbstractDatabase.d.ts +13 -15
- package/dist/lib/AbstractDatabase.d.ts.map +1 -1
- package/dist/lib/CacheAndBufferLayer.d.ts +95 -77
- package/dist/lib/CacheAndBufferLayer.d.ts.map +1 -1
- package/dist/lib/logging.d.ts +12 -2
- package/dist/lib/logging.d.ts.map +1 -1
- package/dist/logging-DOvFhjsQ.js +22 -0
- package/dist/{memory_db-SlQsh4tk.js → memory_db-CGTi0Ck-.js} +3 -3
- package/dist/{mock_db-BBijMErd.js → mock_db-DCUmGtUq.js} +3 -5
- package/dist/{mongodb_db-ByZscnbs.js → mongodb_db-DgkIuEMZ.js} +5 -6
- package/dist/{mssql_db-C9-gmVgP.js → mssql_db-LiEvv4Sm.js} +19 -22
- package/dist/{mysql_db-CRYtP-Mk.js → mysql_db-48mMBbKZ.js} +7 -10
- package/dist/{postgres_db-CVDQiNwN.js → postgres_db-7Hiezhpi.js} +6 -9
- package/dist/{postgrespool_db-CynysVC1.js → postgrespool_db-CdF-1S34.js} +3 -3
- package/dist/{redis_db-CDma40om.js → redis_db-DKRC8sR9.js} +7 -8
- package/dist/{rethink_db-D7NvPe_4.js → rethink_db-BGxY_SA3.js} +15 -18
- package/dist/{rusty_db-CaVGu0z7.js → rusty_db-Msjxckfm.js} +5 -6
- package/dist/{sqlite_db-B-nmfVje.js → sqlite_db-Cy8OT62U.js} +5 -6
- package/dist/{surrealdb_db-JmcyCabz.js → surrealdb_db-XnhMQEwL.js} +10 -10
- package/package.json +88 -38
- package/dist/chunk-8l464Juk.js +0 -28
- package/dist/logging-DmqnZRde.js +0 -25
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { t as normalizeLogger } from "./logging-DOvFhjsQ.js";
|
|
1
2
|
//#region lib/AbstractDatabase.ts
|
|
2
|
-
const nullLogger =
|
|
3
|
+
const nullLogger = normalizeLogger(null);
|
|
3
4
|
const simpleGlobToRegExp = (s) => s.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*");
|
|
4
|
-
var AbstractDatabase = class {
|
|
5
|
+
var AbstractDatabase = class AbstractDatabase {
|
|
5
6
|
logger;
|
|
6
7
|
settings;
|
|
7
8
|
constructor(settings) {
|
|
8
|
-
if (new.target ===
|
|
9
|
+
if (new.target === AbstractDatabase) throw new TypeError("cannot instantiate Abstract Database directly");
|
|
9
10
|
for (const fn of [
|
|
10
11
|
"init",
|
|
11
12
|
"close",
|
|
@@ -17,15 +18,12 @@ var AbstractDatabase = class {
|
|
|
17
18
|
this.logger = nullLogger;
|
|
18
19
|
this.settings = settings;
|
|
19
20
|
}
|
|
20
|
-
/**
|
|
21
|
-
* For findKey regex. Used by document dbs like mongodb or dirty.
|
|
22
|
-
*/
|
|
23
21
|
createFindRegex(key, notKey) {
|
|
24
22
|
let regex = `^(?=${simpleGlobToRegExp(key)}$)`;
|
|
25
23
|
if (notKey != null) regex += `(?!${simpleGlobToRegExp(notKey)}$)`;
|
|
26
24
|
return new RegExp(regex);
|
|
27
25
|
}
|
|
28
|
-
doBulk(
|
|
26
|
+
doBulk(..._args) {
|
|
29
27
|
throw new Error("the doBulk method must be implemented if write caching is enabled");
|
|
30
28
|
}
|
|
31
29
|
get isAsync() {
|
|
@@ -33,9 +31,4 @@ var AbstractDatabase = class {
|
|
|
33
31
|
}
|
|
34
32
|
};
|
|
35
33
|
//#endregion
|
|
36
|
-
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function() {
|
|
39
|
-
return AbstractDatabase;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
34
|
+
export { AbstractDatabase as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
let cassandra_driver = require("cassandra-driver");
|
|
1
|
+
import { t as AbstractDatabase } from "./AbstractDatabase-DfQ39Ry6.js";
|
|
2
|
+
import { Client } from "cassandra-driver";
|
|
4
3
|
//#region databases/cassandra_db.ts
|
|
5
4
|
/**
|
|
6
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -15,7 +14,7 @@ let cassandra_driver = require("cassandra-driver");
|
|
|
15
14
|
* See the License for the specific language governing permissions and
|
|
16
15
|
* limitations under the License.
|
|
17
16
|
*/
|
|
18
|
-
var Cassandra_db = class extends
|
|
17
|
+
var Cassandra_db = class extends AbstractDatabase {
|
|
19
18
|
client;
|
|
20
19
|
pool;
|
|
21
20
|
/**
|
|
@@ -46,8 +45,8 @@ var Cassandra_db = class extends require_AbstractDatabase.AbstractDatabase {
|
|
|
46
45
|
* @param {Error} callback.err An error object (if any.)
|
|
47
46
|
*/
|
|
48
47
|
init(callback) {
|
|
49
|
-
this.client = new
|
|
50
|
-
if (this.settings.logger) this.client.on("log", this.settings.logger);
|
|
48
|
+
this.client = new Client(this.settings.clientOptions);
|
|
49
|
+
if (this.settings.logger) this.client.on("log", (...args) => this.settings.logger(...args));
|
|
51
50
|
this.client.execute("SELECT columnfamily_name FROM system.schema_columnfamilies WHERE keyspace_name = ?", [this.settings.clientOptions.keyspace], (err, result) => {
|
|
52
51
|
if (err) return callback(err);
|
|
53
52
|
let isDefined = false;
|
|
@@ -187,4 +186,4 @@ var Cassandra_db = class extends require_AbstractDatabase.AbstractDatabase {
|
|
|
187
186
|
}
|
|
188
187
|
};
|
|
189
188
|
//#endregion
|
|
190
|
-
|
|
189
|
+
export { Cassandra_db as default };
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
let http = require("http");
|
|
4
|
-
http = require_chunk.__toESM(http);
|
|
5
|
-
let nano = require("nano");
|
|
6
|
-
nano = require_chunk.__toESM(nano);
|
|
1
|
+
import { t as AbstractDatabase } from "./AbstractDatabase-DfQ39Ry6.js";
|
|
2
|
+
import nano from "nano";
|
|
7
3
|
//#region databases/couch_db.ts
|
|
8
4
|
/**
|
|
9
5
|
* 2012 Max 'Azul' Wiehle
|
|
@@ -20,12 +16,10 @@ nano = require_chunk.__toESM(nano);
|
|
|
20
16
|
* See the License for the specific language governing permissions and
|
|
21
17
|
* limitations under the License.
|
|
22
18
|
*/
|
|
23
|
-
var Couch_db = class extends
|
|
24
|
-
agent;
|
|
19
|
+
var Couch_db = class extends AbstractDatabase {
|
|
25
20
|
db;
|
|
26
21
|
constructor(settings) {
|
|
27
22
|
super(settings);
|
|
28
|
-
this.agent = null;
|
|
29
23
|
this.db = null;
|
|
30
24
|
this.settings = settings;
|
|
31
25
|
this.settings.cache = 1e3;
|
|
@@ -36,14 +30,7 @@ var Couch_db = class extends require_AbstractDatabase.AbstractDatabase {
|
|
|
36
30
|
return true;
|
|
37
31
|
}
|
|
38
32
|
async init() {
|
|
39
|
-
|
|
40
|
-
keepAlive: true,
|
|
41
|
-
maxSockets: this.settings.maxListeners || 1
|
|
42
|
-
});
|
|
43
|
-
const client = (0, nano.default)({
|
|
44
|
-
url: `http://${this.settings.host}:${this.settings.port}`,
|
|
45
|
-
requestDefaults: { agent: this.agent }
|
|
46
|
-
});
|
|
33
|
+
const client = nano(`http://${this.settings.host}:${this.settings.port}`);
|
|
47
34
|
if (this.settings.user && this.settings.password) await client.auth(this.settings.user, this.settings.password);
|
|
48
35
|
try {
|
|
49
36
|
await client.db.get(this.settings.database);
|
|
@@ -125,9 +112,7 @@ var Couch_db = class extends require_AbstractDatabase.AbstractDatabase {
|
|
|
125
112
|
}
|
|
126
113
|
async close() {
|
|
127
114
|
this.db = null;
|
|
128
|
-
if (this.agent) this.agent.destroy();
|
|
129
|
-
this.agent = null;
|
|
130
115
|
}
|
|
131
116
|
};
|
|
132
117
|
//#endregion
|
|
133
|
-
|
|
118
|
+
export { Couch_db as default };
|
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
* See the License for the specific language governing permissions and
|
|
12
12
|
* limitations under the License.
|
|
13
13
|
*/
|
|
14
|
-
import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
|
|
15
|
-
import { Client, types
|
|
16
|
-
import
|
|
14
|
+
import AbstractDatabase, { type Settings } from '../lib/AbstractDatabase';
|
|
15
|
+
import { Client, types } from 'cassandra-driver';
|
|
16
|
+
import type { ValueCallback } from 'cassandra-driver';
|
|
17
|
+
type ResultSet = types.ResultSet;
|
|
17
18
|
export type BulkObject = {
|
|
18
19
|
type: string;
|
|
19
20
|
key: string;
|
|
@@ -96,4 +97,5 @@ export default class Cassandra_db extends AbstractDatabase {
|
|
|
96
97
|
*/
|
|
97
98
|
close(callback: () => {}): void;
|
|
98
99
|
}
|
|
100
|
+
export {};
|
|
99
101
|
//# sourceMappingURL=cassandra_db.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cassandra_db.d.ts","sourceRoot":"","sources":["../../databases/cassandra_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,gBAAgB,EAAE,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"cassandra_db.d.ts","sourceRoot":"","sources":["../../databases/cassandra_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,gBAAgB,EAAE,EAAC,KAAK,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAgB,aAAa,EAAC,MAAM,kBAAkB,CAAC;AACnE,KAAK,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;AAOjC,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAC,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,gBAAgB;IACjD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,IAAI,EAAE,GAAG,CAAC;IACjB;;;;;;;;;;OAUG;gBACS,QAAQ,EAAC,QAAQ;IAc7B;;;;;;OAMG;IACH,IAAI,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,KAAG,EAAE;IAyC7B;;;;;;;OAOG;IACH,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAC,KAAK,GAAG,IAAI,EAAE,IAAI,CAAC,EAAC,GAAG,KAAG,EAAE;IAe3D;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ;IAqDtD;;;;;;;OAOG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAI,EAAE;IAI9C;;;;;;OAMG;IACH,MAAM,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,SAAS,CAAC;IAKrD;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAC,UAAU,EAAE,EAAE,QAAQ,EAAC,aAAa,CAAC,SAAS,CAAC;IAmC3D;;;;;OAKG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAI,EAAE;CAGvB"}
|
|
@@ -13,12 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
|
|
17
|
-
import { Agent } from 'http';
|
|
16
|
+
import AbstractDatabase, { type Settings } from '../lib/AbstractDatabase';
|
|
18
17
|
import nano from 'nano';
|
|
19
|
-
import { BulkObject } from './cassandra_db';
|
|
18
|
+
import type { BulkObject } from './cassandra_db';
|
|
20
19
|
export default class Couch_db extends AbstractDatabase {
|
|
21
|
-
agent: Agent | null;
|
|
22
20
|
db: nano.DocumentScope<string> | null;
|
|
23
21
|
constructor(settings: Settings);
|
|
24
22
|
get isAsync(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"couch_db.d.ts","sourceRoot":"","sources":["../../databases/couch_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"couch_db.d.ts","sourceRoot":"","sources":["../../databases/couch_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,KAAK,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACxE,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAE/C,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,gBAAgB;IAC7C,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;gBACjC,QAAQ,EAAE,QAAQ;IAY9B,IAAI,OAAO,YAAmB;IAExB,IAAI;IA4BJ,GAAG,CAAC,GAAG,EAAC,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC;IAgBvC,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM;IAoBlC,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM;IAsB5B,MAAM,CAAC,GAAG,EAAC,MAAM;IAgBjB,MAAM,CAAC,IAAI,EAAC,UAAU,EAAE;IAuBxB,KAAK;CAGZ"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
|
|
16
|
+
import AbstractDatabase, { type Settings } from '../lib/AbstractDatabase';
|
|
17
17
|
type DirtyDBCallback = (p?: any, keys?: string[]) => {};
|
|
18
18
|
export default class extends AbstractDatabase {
|
|
19
19
|
db: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dirty_db.d.ts","sourceRoot":"","sources":["../../databases/dirty_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,gBAAgB,EAAE,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"dirty_db.d.ts","sourceRoot":"","sources":["../../databases/dirty_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,gBAAgB,EAAE,EAAC,KAAK,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAGxE,KAAK,eAAe,GAAG,CAAC,CAAC,CAAC,EAAC,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,KAAG,EAAE,CAAC;AAGrD,MAAM,CAAC,OAAO,MAAO,SAAQ,gBAAgB;IACpC,EAAE,EAAE,GAAG,CAAC;gBACH,QAAQ,EAAC,QAAQ;IAiB7B,IAAI,CAAC,QAAQ,EAAE,MAAI,EAAE;IAOrB,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,eAAe;IAIxC,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,EAAE,QAAQ,EAAC,eAAe;IAW5D,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM,EAAE,QAAQ,EAAC,eAAe;IAItD,MAAM,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,eAAe;IAI3C,KAAK,CAAC,QAAQ,EAAC,eAAe;CAK/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dirty_git_db.d.ts","sourceRoot":"","sources":["../../databases/dirty_git_db.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,EAAE,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"dirty_git_db.d.ts","sourceRoot":"","sources":["../../databases/dirty_git_db.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,EAAE,EAAC,KAAK,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAsBxE,MAAM,CAAC,OAAO,MAAO,SAAQ,gBAAgB;IACpC,EAAE,EAAE,GAAG,CAAC;gBACH,QAAQ,EAAE,QAAQ;IAiB9B,IAAI,CAAC,QAAQ,EAAE,MAAI,IAAI;IAOvB,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,EAAE,KAAK,EAAE,MAAM,KAAG,IAAI;IAIlE,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,EAAE,QAAQ,EAAC,CAAC,CAAC,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,EAAE,KAAG,EAAE;IAWvE,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAI,EAAE;IAU/C,MAAM,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAK,EAAE;IAInC,KAAK,CAAC,QAAQ,EAAE,MAAI,IAAI;CAIzB"}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
|
|
17
|
-
import { BulkObject } from './cassandra_db';
|
|
16
|
+
import AbstractDatabase, { type Settings } from '../lib/AbstractDatabase';
|
|
17
|
+
import type { BulkObject } from './cassandra_db';
|
|
18
18
|
export default class extends AbstractDatabase {
|
|
19
19
|
_client: any;
|
|
20
20
|
readonly _index: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elasticsearch_db.d.ts","sourceRoot":"","sources":["../../databases/elasticsearch_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"elasticsearch_db.d.ts","sourceRoot":"","sources":["../../databases/elasticsearch_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,KAAK,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAOxE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAgF/C,MAAM,CAAC,OAAO,MAAO,SAAQ,gBAAgB;IACpC,OAAO,EAAE,GAAG,CAAC;IACpB,SAAgB,MAAM,EAAE,GAAG,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IAC5B,SAAgB,EAAE,EAAE;QAAC,KAAK,EAAE,GAAG,CAAA;KAAC,CAAC;gBACrB,QAAQ,EAAC,QAAQ;IAmB7B,IAAI,OAAO,YAAmB;IAExB,aAAa;IAMnB;;;OAGG;IACG,IAAI;IAmCV;;;;OAIG;IACG,GAAG,CAAC,GAAG,EAAC,MAAM;IAMpB;;;OAGG;IACG,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM;IAmBxC;;;;;OAKG;IACG,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAC,MAAM;IAKnC;;;;;;;OAOG;IACG,MAAM,CAAC,GAAG,EAAC,MAAM;IAKvB;;;;;;;;OAQG;IACG,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE;IAsBzB,KAAK;CAIZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory_db.d.ts","sourceRoot":"","sources":["../../databases/memory_db.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,EAAE,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"memory_db.d.ts","sourceRoot":"","sources":["../../databases/memory_db.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,EAAE,EAAC,KAAK,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAGxE,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,gBAAgB;IAC7C,KAAK,EAAE,GAAG,CAAC;gBACN,QAAQ,EAAC,QAAQ;IAS7B,IAAI,OAAO,YAAmB;IAE9B,KAAK;IAIL,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM;IAKlC,GAAG,CAAC,GAAG,EAAC,MAAM;IAId,IAAI;IAIJ,MAAM,CAAC,GAAG,EAAC,MAAM;IAIjB,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM;CAG7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock_db.d.ts","sourceRoot":"","sources":["../../databases/mock_db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"mock_db.d.ts","sourceRoot":"","sources":["../../databases/mock_db.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAEtD,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,OAAO,MAAO,SAAQ,MAAM,CAAC,YAAY;IACvC,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,GAAG,CAAC;gBACL,QAAQ,EAAC,QAAQ;IAU7B,KAAK,CAAC,EAAE,EAAE,MAAI,EAAE;IAIhB,MAAM,CAAC,GAAG,EAAC,MAAM,EAAE,EAAE,EAAE,MAAI,EAAE;IAI7B,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,EAAE,EAAE,EAAC,MAAI,EAAE;IAI7C,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,EAAE,EAAC,MAAI,EAAE;IAIpB,IAAI,CAAC,EAAE,EAAC,MAAI,EAAE;IAInB,MAAM,CAAC,GAAG,EAAC,MAAM,EAAE,EAAE,EAAC,MAAI,EAAE;IAI5B,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM,EAAE,EAAE,EAAC,MAAI,EAAE;CAGxC"}
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
|
|
17
|
-
import { BulkObject } from './cassandra_db';
|
|
18
|
-
import {
|
|
16
|
+
import AbstractDatabase, { type Settings } from '../lib/AbstractDatabase';
|
|
17
|
+
import type { BulkObject } from './cassandra_db';
|
|
18
|
+
import { MongoClient } from 'mongodb';
|
|
19
|
+
import type { Collection, Db } from 'mongodb';
|
|
19
20
|
export default class extends AbstractDatabase {
|
|
20
21
|
interval: NodeJS.Timer | undefined;
|
|
21
22
|
database: Db | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongodb_db.d.ts","sourceRoot":"","sources":["../../databases/mongodb_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"mongodb_db.d.ts","sourceRoot":"","sources":["../../databases/mongodb_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,KAAK,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAC,UAAU,EAAE,EAAE,EAAC,MAAM,SAAS,CAAC;AAE5C,MAAM,CAAC,OAAO,MAAO,SAAQ,gBAAgB;IACpC,QAAQ,EAAE,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC;IACnC,QAAQ,EAAG,EAAE,GAAC,SAAS,CAAC;IACxB,MAAM,EAAE,WAAW,GAAC,SAAS,CAAC;IAC9B,UAAU,EAAG,UAAU,GAAC,SAAS,CAAC;gBAC7B,QAAQ,EAAC,QAAQ;IAW7B,SAAS;IAMT,YAAY;IASZ,IAAI,CAAC,QAAQ,EAAC,QAAQ;IAgBtB,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,QAAQ;IAajC,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,EAAE,QAAQ,EAAC,QAAQ;IAwBrD,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM,EAAE,QAAQ,EAAC,QAAQ;IAa/C,MAAM,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,QAAQ;IASpC,MAAM,CAAC,IAAI,EAAC,UAAU,EAAE,EAAE,QAAQ,EAAC,QAAQ;IAoB3C,KAAK,CAAC,QAAQ,EAAC,GAAG;CAInB"}
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
* Note: This requires MS SQL Server >= 2008 due to the usage of the MERGE statement
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
|
-
import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
|
|
21
|
-
import { ConnectionPool } from 'mssql';
|
|
22
|
-
import { BulkObject } from './cassandra_db';
|
|
20
|
+
import AbstractDatabase, { type Settings } from '../lib/AbstractDatabase';
|
|
21
|
+
import type { ConnectionPool } from 'mssql';
|
|
22
|
+
import type { BulkObject } from './cassandra_db';
|
|
23
23
|
export default class MSSQL extends AbstractDatabase {
|
|
24
24
|
db: ConnectionPool | undefined;
|
|
25
25
|
constructor(settings: Settings);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mssql_db.d.ts","sourceRoot":"","sources":["../../databases/mssql_db.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,gBAAgB,EAAE,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"mssql_db.d.ts","sourceRoot":"","sources":["../../databases/mssql_db.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,gBAAgB,EAAE,EAAC,KAAK,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAGxE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAO/C,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,gBAAgB;IAC1C,EAAE,EAAE,cAAc,GAAG,SAAS,CAAC;gBAC1B,QAAQ,EAAC,QAAQ;IAuB7B,IAAI,CAAC,QAAQ,EAAC,CAAC,GAAG,EAAE,GAAG,KAAG,EAAE;IA0B5B,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,CAAC,GAAG,CAAC,EAAC,KAAK,EAAE,KAAK,CAAC,EAAC,MAAM,KAAG,EAAE;IAiBxD,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,EAAE,QAAQ,EAAC,CAAC,GAAG,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,EAAC,MAAM,EAAE,KAAG,EAAE;IA6BzF,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAC,MAAM,KAAG,EAAE;IAqBxD,MAAM,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAI,EAAE;IAMlC,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAC,CAAC,GAAG,EAAC,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,KAAG,EAAE;IAkEhE,KAAK,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAC,KAAK,KAAG,EAAE;CAGjC"}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
|
|
17
|
-
import { BulkObject } from './cassandra_db';
|
|
18
|
-
import { Pool } from
|
|
16
|
+
import AbstractDatabase, { type Settings } from '../lib/AbstractDatabase';
|
|
17
|
+
import type { BulkObject } from './cassandra_db';
|
|
18
|
+
import type { Pool } from 'mysql2';
|
|
19
19
|
export default class extends AbstractDatabase {
|
|
20
20
|
readonly _mysqlSettings: Settings;
|
|
21
21
|
_pool: Pool | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mysql_db.d.ts","sourceRoot":"","sources":["../../databases/mysql_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"mysql_db.d.ts","sourceRoot":"","sources":["../../databases/mysql_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,KAAK,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAExE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAmB,IAAI,EAAa,MAAM,QAAQ,CAAC;AAE/D,MAAM,CAAC,OAAO,MAAO,SAAQ,gBAAgB;IAC3C,SAAgB,cAAc,EAAE,QAAQ,CAAC;IAClC,KAAK,EAAE,IAAI,GAAC,IAAI,CAAC;gBACZ,QAAQ,EAAC,QAAQ;IAiB7B,IAAI,OAAO,YAAmB;IAExB,MAAM,CAAC,OAAO,EAAE,GAAG,GAAE,OAAO,CAAC,GAAG,CAAC;IAkBjC,IAAI;IAqEJ,GAAG,CAAC,GAAG,EAAC,MAAM;IAQd,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM;IAkBlC,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM;IAK5B,MAAM,CAAC,GAAG,EAAC,MAAM;IAOjB,MAAM,CAAC,IAAI,EAAC,UAAU,EAAE;IAsBxB,KAAK;CAGZ"}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
|
|
16
|
+
import AbstractDatabase, { type Settings } from '../lib/AbstractDatabase';
|
|
17
17
|
import * as pg from 'pg';
|
|
18
|
-
import { BulkObject } from './cassandra_db';
|
|
18
|
+
import type { BulkObject } from './cassandra_db';
|
|
19
19
|
export default class extends AbstractDatabase {
|
|
20
20
|
db: pg.Pool;
|
|
21
21
|
upsertStatement: string | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres_db.d.ts","sourceRoot":"","sources":["../../databases/postgres_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"postgres_db.d.ts","sourceRoot":"","sources":["../../databases/postgres_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,KAAK,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAExE,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAE/C,MAAM,CAAC,OAAO,MAAO,SAAQ,gBAAgB;IACpC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC;IACZ,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;gBACtC,QAAQ,EAAC,QAAQ,GAAG,MAAM;IAgBtC,IAAI,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,KAAG,EAAE;IA2E/B,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,EAAE,GAAG,KAAG,EAAE;IAY7D,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,EAAE,GAAG,KAAG,EAAE;IA0BjF,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM,EAAE,QAAQ,EAAC,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,WAAW,KAAK,IAAI;IASnF,MAAM,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAI,EAAE;IAIlC,MAAM,CAAC,IAAI,EAAC,UAAU,EAAE,EAAE,QAAQ,EAAC,MAAI,EAAE;IAsCzC,KAAK,CAAC,QAAQ,EAAC,MAAI,EAAE;CAGtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgrespool_db.d.ts","sourceRoot":"","sources":["../../databases/postgrespool_db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"postgrespool_db.d.ts","sourceRoot":"","sources":["../../databases/postgrespool_db.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAEtD,OAAO,WAAW,MAAM,eAAe,CAAA;AAEvC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;gBACrC,QAAQ,EAAC,QAAQ;CAK9B"}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
|
|
17
|
-
import { BulkObject } from './cassandra_db';
|
|
16
|
+
import AbstractDatabase, { type Settings } from '../lib/AbstractDatabase';
|
|
17
|
+
import type { BulkObject } from './cassandra_db';
|
|
18
18
|
export default class RedisDB extends AbstractDatabase {
|
|
19
19
|
_client: any;
|
|
20
20
|
constructor(settings: Settings);
|
|
@@ -24,7 +24,7 @@ export default class RedisDB extends AbstractDatabase {
|
|
|
24
24
|
findKeys(key: string, notKey: string): Promise<any>;
|
|
25
25
|
set(key: string, value: string): Promise<null | undefined>;
|
|
26
26
|
remove(key: string): Promise<null | undefined>;
|
|
27
|
-
doBulk(bulk: BulkObject[]): Promise<
|
|
27
|
+
doBulk(bulk: BulkObject[]): Promise<void>;
|
|
28
28
|
close(): Promise<null | undefined>;
|
|
29
29
|
}
|
|
30
30
|
//# sourceMappingURL=redis_db.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis_db.d.ts","sourceRoot":"","sources":["../../databases/redis_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"redis_db.d.ts","sourceRoot":"","sources":["../../databases/redis_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,KAAK,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAGxE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAE/C,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,gBAAgB;IAC5C,OAAO,EAAE,GAAG,CAAA;gBACP,QAAQ,EAAC,QAAQ;IAM7B,IAAI,OAAO,YAAmB;IAExB,IAAI;IAwBJ,GAAG,CAAC,GAAG,EAAC,MAAM;IAKd,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM;IAelC,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM;IAS5B,MAAM,CAAC,GAAG,EAAC,MAAM;IASjB,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBzC,KAAK;CAKZ"}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
|
|
16
|
+
import AbstractDatabase, { type Settings } from '../lib/AbstractDatabase';
|
|
17
17
|
import r from 'rethinkdb';
|
|
18
|
-
import { BulkObject } from './cassandra_db';
|
|
18
|
+
import type { BulkObject } from './cassandra_db';
|
|
19
19
|
export default class Rethink_db extends AbstractDatabase {
|
|
20
20
|
host: string;
|
|
21
21
|
db: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rethink_db.d.ts","sourceRoot":"","sources":["../../databases/rethink_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"rethink_db.d.ts","sourceRoot":"","sources":["../../databases/rethink_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,KAAK,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACxE,OAAO,CAAC,MAAM,WAAW,CAAC;AAE1B,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAE/C,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,gBAAgB;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC;gBAC3B,QAAQ,EAAC,QAAQ;IAe7B,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAG,EAAE;IAgBxC,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,KAAG,EAAE;IAQlD,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAI,EAAE;IAWnD,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAI,EAAE;IAM7C,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,MAAI,EAAE;IAsB3C,MAAM,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAI,EAAE;IAKlC,KAAK,CAAC,QAAQ,EAAC,MAAI,EAAE;CAGtB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BulkObject } from
|
|
2
|
-
import AbstractDatabase, { Settings } from
|
|
1
|
+
import type { BulkObject } from './cassandra_db';
|
|
2
|
+
import AbstractDatabase, { type Settings } from '../lib/AbstractDatabase';
|
|
3
3
|
/**
|
|
4
4
|
* 2011 Peter 'Pita' Martischka
|
|
5
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite_db.d.ts","sourceRoot":"","sources":["../../databases/sqlite_db.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sqlite_db.d.ts","sourceRoot":"","sources":["../../databases/sqlite_db.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,gBAAgB,EAAE,EAAC,KAAK,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAGxE;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,gBAAgB;IAC7C,EAAE,EAAE,GAAG,GAAC,IAAI,CAAC;gBACR,QAAQ,EAAC,QAAQ;IAsB7B,IAAI,CAAC,QAAQ,EAAE,QAAQ;IAMvB,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,QAAQ;IAKjC,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,EAAE,QAAQ,EAAC,QAAQ;IAMrD,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM,EAAE,QAAQ,EAAC,QAAQ;IAK/C,MAAM,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,QAAQ;IAMpC,MAAM,CAAC,IAAI,EAAC,UAAU,EAAE,EAAE,QAAQ,EAAC,QAAQ;IAgB3C,KAAK,CAAC,QAAQ,EAAE,QAAQ;CAIzB"}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
|
|
16
|
+
import AbstractDatabase, { type Settings } from '../lib/AbstractDatabase';
|
|
17
17
|
import { Surreal } from 'surrealdb';
|
|
18
|
-
import { BulkObject } from
|
|
18
|
+
import type { BulkObject } from './cassandra_db';
|
|
19
19
|
type StoreVal = {
|
|
20
20
|
key: string;
|
|
21
21
|
value: string;
|
|
@@ -32,7 +32,7 @@ export default class SurrealDB extends AbstractDatabase {
|
|
|
32
32
|
transformResult(rows: StoreVal[] | string, originalKey: string): string[];
|
|
33
33
|
set(key: string, value: string): Promise<null | undefined>;
|
|
34
34
|
remove(key: string): Promise<unknown[] | null>;
|
|
35
|
-
doBulk(bulk: BulkObject[]): Promise<
|
|
35
|
+
doBulk(bulk: BulkObject[]): Promise<void>;
|
|
36
36
|
close(): Promise<null | undefined>;
|
|
37
37
|
}
|
|
38
38
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surrealdb_db.d.ts","sourceRoot":"","sources":["../../databases/surrealdb_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"surrealdb_db.d.ts","sourceRoot":"","sources":["../../databases/surrealdb_db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,gBAAgB,EAAE,EAAC,KAAK,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAK/C,KAAK,QAAQ,GAAG;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAyBF,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,gBAAgB;IAC5C,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;gBAEnB,QAAQ,EAAE,QAAQ;IAK9B,IAAI,OAAO,YAAmB;IAExB,IAAI;IAuBJ,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAkBxC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAgBjD,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAY9C,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAYtD,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,WAAW,EAAE,MAAM;IAYxD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAiB9B,MAAM,CAAC,GAAG,EAAE,MAAM;IASlB,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAWzC,KAAK;CAKd"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
let dirty_ts = require("dirty-ts");
|
|
4
|
-
dirty_ts = require_chunk.__toESM(dirty_ts);
|
|
1
|
+
import { t as AbstractDatabase } from "./AbstractDatabase-DfQ39Ry6.js";
|
|
2
|
+
import Dirty from "dirty-ts";
|
|
5
3
|
//#region databases/dirty_db.ts
|
|
6
4
|
/**
|
|
7
5
|
* 2011 Peter 'Pita' Martischka
|
|
@@ -18,7 +16,7 @@ dirty_ts = require_chunk.__toESM(dirty_ts);
|
|
|
18
16
|
* See the License for the specific language governing permissions and
|
|
19
17
|
* limitations under the License.
|
|
20
18
|
*/
|
|
21
|
-
var dirty_db_default = class extends
|
|
19
|
+
var dirty_db_default = class extends AbstractDatabase {
|
|
22
20
|
db;
|
|
23
21
|
constructor(settings) {
|
|
24
22
|
super(settings);
|
|
@@ -30,7 +28,7 @@ var dirty_db_default = class extends require_AbstractDatabase.AbstractDatabase {
|
|
|
30
28
|
this.settings.json = false;
|
|
31
29
|
}
|
|
32
30
|
init(callback) {
|
|
33
|
-
this.db = new
|
|
31
|
+
this.db = new Dirty(this.settings.filename);
|
|
34
32
|
this.db.on("load", () => {
|
|
35
33
|
callback();
|
|
36
34
|
});
|
|
@@ -59,4 +57,4 @@ var dirty_db_default = class extends require_AbstractDatabase.AbstractDatabase {
|
|
|
59
57
|
}
|
|
60
58
|
};
|
|
61
59
|
//#endregion
|
|
62
|
-
|
|
60
|
+
export { dirty_db_default as default };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let node_path = require("node:path");
|
|
6
|
-
let simple_git = require("simple-git");
|
|
1
|
+
import { t as AbstractDatabase } from "./AbstractDatabase-DfQ39Ry6.js";
|
|
2
|
+
import Dirty from "dirty-ts";
|
|
3
|
+
import { dirname } from "node:path";
|
|
4
|
+
import { simpleGit } from "simple-git";
|
|
7
5
|
//#region databases/dirty_git_db.ts
|
|
8
6
|
/**
|
|
9
7
|
* 2011 Peter 'Pita' Martischka
|
|
@@ -20,7 +18,7 @@ let simple_git = require("simple-git");
|
|
|
20
18
|
* See the License for the specific language governing permissions and
|
|
21
19
|
* limitations under the License.
|
|
22
20
|
*/
|
|
23
|
-
var dirty_git_db_default = class extends
|
|
21
|
+
var dirty_git_db_default = class extends AbstractDatabase {
|
|
24
22
|
db;
|
|
25
23
|
constructor(settings) {
|
|
26
24
|
super(settings);
|
|
@@ -32,7 +30,7 @@ var dirty_git_db_default = class extends require_AbstractDatabase.AbstractDataba
|
|
|
32
30
|
this.settings.json = false;
|
|
33
31
|
}
|
|
34
32
|
init(callback) {
|
|
35
|
-
this.db = new
|
|
33
|
+
this.db = new Dirty(this.settings.filename);
|
|
36
34
|
this.db.on("load", (err) => {
|
|
37
35
|
callback();
|
|
38
36
|
});
|
|
@@ -50,7 +48,7 @@ var dirty_git_db_default = class extends require_AbstractDatabase.AbstractDataba
|
|
|
50
48
|
}
|
|
51
49
|
set(key, value, callback) {
|
|
52
50
|
this.db.set(key, value, callback);
|
|
53
|
-
|
|
51
|
+
simpleGit(dirname(this.settings.filename)).silent(true).add("./*.db").commit("Automated commit...").push([
|
|
54
52
|
"-u",
|
|
55
53
|
"origin",
|
|
56
54
|
"master"
|
|
@@ -65,4 +63,4 @@ var dirty_git_db_default = class extends require_AbstractDatabase.AbstractDataba
|
|
|
65
63
|
}
|
|
66
64
|
};
|
|
67
65
|
//#endregion
|
|
68
|
-
|
|
66
|
+
export { dirty_git_db_default as default };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
let crypto = require("crypto");
|
|
7
|
-
let _elastic_elasticsearch = require("@elastic/elasticsearch");
|
|
1
|
+
import { t as AbstractDatabase } from "./AbstractDatabase-DfQ39Ry6.js";
|
|
2
|
+
import assert, { equal } from "assert";
|
|
3
|
+
import { Buffer } from "buffer";
|
|
4
|
+
import { createHash } from "crypto";
|
|
5
|
+
import { Client } from "@elastic/elasticsearch";
|
|
8
6
|
//#region databases/elasticsearch_db.ts
|
|
9
7
|
/**
|
|
10
8
|
* 2015 Visionist, Inc.
|
|
@@ -23,8 +21,8 @@ let _elastic_elasticsearch = require("@elastic/elasticsearch");
|
|
|
23
21
|
*/
|
|
24
22
|
const schema = "2";
|
|
25
23
|
const keyToId = (key) => {
|
|
26
|
-
const keyBuf =
|
|
27
|
-
return keyBuf.length > 512 ?
|
|
24
|
+
const keyBuf = Buffer.from(key);
|
|
25
|
+
return keyBuf.length > 512 ? createHash("sha512").update(keyBuf).digest("hex") : key;
|
|
28
26
|
};
|
|
29
27
|
const mappings = { properties: {
|
|
30
28
|
key: { type: "wildcard" },
|
|
@@ -103,7 +101,7 @@ const migrateToSchema2 = async (client, v1BaseIndex, v2Index, logger) => {
|
|
|
103
101
|
await Promise.all([...scrollIds.values()].map((scrollId) => client.clearScroll({ scroll_id: scrollId })));
|
|
104
102
|
}
|
|
105
103
|
};
|
|
106
|
-
var elasticsearch_db_default = class extends
|
|
104
|
+
var elasticsearch_db_default = class extends AbstractDatabase {
|
|
107
105
|
_client;
|
|
108
106
|
_index;
|
|
109
107
|
_indexClean;
|
|
@@ -137,7 +135,7 @@ var elasticsearch_db_default = class extends require_AbstractDatabase.AbstractDa
|
|
|
137
135
|
* connection was made.
|
|
138
136
|
*/
|
|
139
137
|
async init() {
|
|
140
|
-
const client = new
|
|
138
|
+
const client = new Client({ node: `http://${this.settings.host}:${this.settings.port}` });
|
|
141
139
|
await client.ping();
|
|
142
140
|
if (!await client.indices.exists({ index: this._index })) {
|
|
143
141
|
let tmpIndex;
|
|
@@ -159,9 +157,9 @@ var elasticsearch_db_default = class extends require_AbstractDatabase.AbstractDa
|
|
|
159
157
|
});
|
|
160
158
|
}
|
|
161
159
|
const indices = Object.values(await client.indices.get({ index: this._index }));
|
|
162
|
-
|
|
160
|
+
equal(indices.length, 1);
|
|
163
161
|
try {
|
|
164
|
-
assert.
|
|
162
|
+
assert.deepEqual(indices[0].mappings, mappings);
|
|
165
163
|
} catch (err) {
|
|
166
164
|
this.logger.warn(`Index ${this._index} mappings does not match expected; attempting to use index anyway. Details: ${err}`);
|
|
167
165
|
}
|
|
@@ -266,4 +264,4 @@ var elasticsearch_db_default = class extends require_AbstractDatabase.AbstractDa
|
|
|
266
264
|
}
|
|
267
265
|
};
|
|
268
266
|
//#endregion
|
|
269
|
-
|
|
267
|
+
export { elasticsearch_db_default as default };
|