ueberdb2 4.2.62 → 4.2.73

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.
@@ -1,99 +1,99 @@
1
- /**
2
- * Licensed under the Apache License, Version 2.0 (the "License");
3
- * you may not use this file except in compliance with the License.
4
- * You may obtain a copy of the License at
5
- *
6
- * http://www.apache.org/licenses/LICENSE-2.0
7
- *
8
- * Unless required by applicable law or agreed to in writing, software
9
- * distributed under the License is distributed on an "AS-IS" BASIS,
10
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- * See the License for the specific language governing permissions and
12
- * limitations under the License.
13
- */
14
- import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
15
- import { Client, types, ValueCallback } from 'cassandra-driver';
16
- import ResultSet = types.ResultSet;
17
- export type BulkObject = {
18
- type: string;
19
- key: string;
20
- value?: string;
21
- };
22
- export default class Cassandra_db extends AbstractDatabase {
23
- client: Client | undefined;
24
- pool: any;
25
- /**
26
- * @param {Object} settings The required settings object to initiate the Cassandra database
27
- * @param {String[]} settings.clientOptions See
28
- * http://www.datastax.com/drivers/nodejs/2.0/global.html#ClientOptions for a full set of
29
- * options that can be used
30
- * @param {String} settings.columnFamily The column family that should be used to store data. The
31
- * column family will be created if it doesn't exist
32
- * @param {Function} [settings.logger] Function that will be used to pass on log events emitted by
33
- * the Cassandra driver. See https://github.com/datastax/nodejs-driver#logging for more
34
- * information
35
- */
36
- constructor(settings: Settings);
37
- /**
38
- * Initializes the Cassandra client, connects to Cassandra and creates the CF if it didn't exist
39
- * already
40
- *
41
- * @param {Function} callback Standard callback method.
42
- * @param {Error} callback.err An error object (if any.)
43
- */
44
- init(callback: (arg: any) => {}): void;
45
- /**
46
- * Gets a value from Cassandra
47
- *
48
- * @param {String} key The key for which the value should be retrieved
49
- * @param {Function} callback Standard callback method
50
- * @param {Error} callback.err An error object, if any
51
- * @param {String} callback.value The value for the given key (if any)
52
- */
53
- get(key: string, callback: (err: Error | null, data?: any) => {}): void;
54
- /**
55
- * Cassandra has no native `findKeys` method. This function implements a naive filter by
56
- * retrieving *all* the keys and filtering those. This should obviously be used with the utmost
57
- * care and is probably not something you want to run in production.
58
- *
59
- * @param {String} key The filter for keys that should match
60
- * @param {String} [notKey] The filter for keys that shouldn't match
61
- * @param {Function} callback Standard callback method
62
- * @param {Error} callback.err An error object, if any
63
- * @param {String[]} callback.keys An array of keys that match the specified filters
64
- */
65
- findKeys(key: string, notKey: string, callback: Function): any;
66
- /**
67
- * Sets a value for a key
68
- *
69
- * @param {String} key The key to set
70
- * @param {String} value The value associated to this key
71
- * @param {Function} callback Standard callback method
72
- * @param {Error} callback.err An error object, if any
73
- */
74
- set(key: string, value: string, callback: () => {}): void;
75
- /**
76
- * Removes a key and it's value from the column family
77
- *
78
- * @param {String} key The key to remove
79
- * @param {Function} callback Standard callback method
80
- * @param {Error} callback.err An error object, if any
81
- */
82
- remove(key: string, callback: ValueCallback<ResultSet>): void;
83
- /**
84
- * Performs multiple operations in one action
85
- *
86
- * @param {Object[]} bulk The set of operations that should be performed
87
- * @param {Function} callback Standard callback method
88
- * @param {Error} callback.err An error object, if any
89
- */
90
- doBulk(bulk: BulkObject[], callback: ValueCallback<ResultSet>): void;
91
- /**
92
- * Closes the Cassandra connection
93
- *
94
- * @param {Function} callback Standard callback method
95
- * @param {Error} callback.err Error object in case something goes wrong
96
- */
97
- close(callback: () => {}): void;
98
- }
1
+ /**
2
+ * Licensed under the Apache License, Version 2.0 (the "License");
3
+ * you may not use this file except in compliance with the License.
4
+ * You may obtain a copy of the License at
5
+ *
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ *
8
+ * Unless required by applicable law or agreed to in writing, software
9
+ * distributed under the License is distributed on an "AS-IS" BASIS,
10
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ * See the License for the specific language governing permissions and
12
+ * limitations under the License.
13
+ */
14
+ import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
15
+ import { Client, types, ValueCallback } from 'cassandra-driver';
16
+ import ResultSet = types.ResultSet;
17
+ export type BulkObject = {
18
+ type: string;
19
+ key: string;
20
+ value?: string;
21
+ };
22
+ export default class Cassandra_db extends AbstractDatabase {
23
+ client: Client | undefined;
24
+ pool: any;
25
+ /**
26
+ * @param {Object} settings The required settings object to initiate the Cassandra database
27
+ * @param {String[]} settings.clientOptions See
28
+ * http://www.datastax.com/drivers/nodejs/2.0/global.html#ClientOptions for a full set of
29
+ * options that can be used
30
+ * @param {String} settings.columnFamily The column family that should be used to store data. The
31
+ * column family will be created if it doesn't exist
32
+ * @param {Function} [settings.logger] Function that will be used to pass on log events emitted by
33
+ * the Cassandra driver. See https://github.com/datastax/nodejs-driver#logging for more
34
+ * information
35
+ */
36
+ constructor(settings: Settings);
37
+ /**
38
+ * Initializes the Cassandra client, connects to Cassandra and creates the CF if it didn't exist
39
+ * already
40
+ *
41
+ * @param {Function} callback Standard callback method.
42
+ * @param {Error} callback.err An error object (if any.)
43
+ */
44
+ init(callback: (arg: any) => {}): void;
45
+ /**
46
+ * Gets a value from Cassandra
47
+ *
48
+ * @param {String} key The key for which the value should be retrieved
49
+ * @param {Function} callback Standard callback method
50
+ * @param {Error} callback.err An error object, if any
51
+ * @param {String} callback.value The value for the given key (if any)
52
+ */
53
+ get(key: string, callback: (err: Error | null, data?: any) => {}): void;
54
+ /**
55
+ * Cassandra has no native `findKeys` method. This function implements a naive filter by
56
+ * retrieving *all* the keys and filtering those. This should obviously be used with the utmost
57
+ * care and is probably not something you want to run in production.
58
+ *
59
+ * @param {String} key The filter for keys that should match
60
+ * @param {String} [notKey] The filter for keys that shouldn't match
61
+ * @param {Function} callback Standard callback method
62
+ * @param {Error} callback.err An error object, if any
63
+ * @param {String[]} callback.keys An array of keys that match the specified filters
64
+ */
65
+ findKeys(key: string, notKey: string, callback: Function): any;
66
+ /**
67
+ * Sets a value for a key
68
+ *
69
+ * @param {String} key The key to set
70
+ * @param {String} value The value associated to this key
71
+ * @param {Function} callback Standard callback method
72
+ * @param {Error} callback.err An error object, if any
73
+ */
74
+ set(key: string, value: string, callback: () => {}): void;
75
+ /**
76
+ * Removes a key and it's value from the column family
77
+ *
78
+ * @param {String} key The key to remove
79
+ * @param {Function} callback Standard callback method
80
+ * @param {Error} callback.err An error object, if any
81
+ */
82
+ remove(key: string, callback: ValueCallback<ResultSet>): void;
83
+ /**
84
+ * Performs multiple operations in one action
85
+ *
86
+ * @param {Object[]} bulk The set of operations that should be performed
87
+ * @param {Function} callback Standard callback method
88
+ * @param {Error} callback.err An error object, if any
89
+ */
90
+ doBulk(bulk: BulkObject[], callback: ValueCallback<ResultSet>): void;
91
+ /**
92
+ * Closes the Cassandra connection
93
+ *
94
+ * @param {Function} callback Standard callback method
95
+ * @param {Error} callback.err Error object in case something goes wrong
96
+ */
97
+ close(callback: () => {}): void;
98
+ }
99
99
  //# sourceMappingURL=cassandra_db.d.ts.map
@@ -1,34 +1,34 @@
1
- /**
2
- * 2012 Max 'Azul' Wiehle
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS-IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /// <reference types="node" />
17
- import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
18
- import { Agent } from 'http';
19
- import nano from 'nano';
20
- import { BulkObject } from './cassandra_db';
21
- export default class Couch_db extends AbstractDatabase {
22
- agent: Agent | null;
23
- db: nano.DocumentScope<string> | null;
24
- constructor(settings: Settings);
25
- get isAsync(): boolean;
26
- init(): Promise<void>;
27
- get(key: string): Promise<null | string>;
28
- findKeys(key: string, notKey: string): Promise<string[] | undefined>;
29
- set(key: string, value: string): Promise<void>;
30
- remove(key: string): Promise<void>;
31
- doBulk(bulk: BulkObject[]): Promise<void>;
32
- close(): Promise<void>;
33
- }
1
+ /**
2
+ * 2012 Max 'Azul' Wiehle
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS-IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /// <reference types="node" />
17
+ import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
18
+ import { Agent } from 'http';
19
+ import nano from 'nano';
20
+ import { BulkObject } from './cassandra_db';
21
+ export default class Couch_db extends AbstractDatabase {
22
+ agent: Agent | null;
23
+ db: nano.DocumentScope<string> | null;
24
+ constructor(settings: Settings);
25
+ get isAsync(): boolean;
26
+ init(): Promise<void>;
27
+ get(key: string): Promise<null | string>;
28
+ findKeys(key: string, notKey: string): Promise<string[] | undefined>;
29
+ set(key: string, value: string): Promise<void>;
30
+ remove(key: string): Promise<void>;
31
+ doBulk(bulk: BulkObject[]): Promise<void>;
32
+ close(): Promise<void>;
33
+ }
34
34
  //# sourceMappingURL=couch_db.d.ts.map
@@ -1,29 +1,29 @@
1
- /**
2
- * 2011 Peter 'Pita' Martischka
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS-IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
17
- type DirtyDBCallback = (p?: any, keys?: string[]) => {};
18
- export default class extends AbstractDatabase {
19
- db: any;
20
- constructor(settings: Settings);
21
- init(callback: () => {}): void;
22
- get(key: string, callback: DirtyDBCallback): void;
23
- findKeys(key: string, notKey: string, callback: DirtyDBCallback): void;
24
- set(key: string, value: string, callback: DirtyDBCallback): void;
25
- remove(key: string, callback: DirtyDBCallback): void;
26
- close(callback: DirtyDBCallback): void;
27
- }
28
- export {};
1
+ /**
2
+ * 2011 Peter 'Pita' Martischka
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS-IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
17
+ type DirtyDBCallback = (p?: any, keys?: string[]) => {};
18
+ export default class extends AbstractDatabase {
19
+ db: any;
20
+ constructor(settings: Settings);
21
+ init(callback: () => {}): void;
22
+ get(key: string, callback: DirtyDBCallback): void;
23
+ findKeys(key: string, notKey: string, callback: DirtyDBCallback): void;
24
+ set(key: string, value: string, callback: DirtyDBCallback): void;
25
+ remove(key: string, callback: DirtyDBCallback): void;
26
+ close(callback: DirtyDBCallback): void;
27
+ }
28
+ export {};
29
29
  //# sourceMappingURL=dirty_db.d.ts.map
@@ -1,12 +1,12 @@
1
- import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
2
- export default class extends AbstractDatabase {
3
- db: any;
4
- constructor(settings: Settings);
5
- init(callback: () => void): void;
6
- get(key: string, callback: (err: string | any, value: string) => void): void;
7
- findKeys(key: string, notKey: string, callback: (v: any, keys: string[]) => {}): void;
8
- set(key: string, value: string, callback: () => {}): void;
9
- remove(key: string, callback: () => {}): void;
10
- close(callback: () => void): void;
11
- }
1
+ import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
2
+ export default class extends AbstractDatabase {
3
+ db: any;
4
+ constructor(settings: Settings);
5
+ init(callback: () => void): void;
6
+ get(key: string, callback: (err: string | any, value: string) => void): void;
7
+ findKeys(key: string, notKey: string, callback: (v: any, keys: string[]) => {}): void;
8
+ set(key: string, value: string, callback: () => {}): void;
9
+ remove(key: string, callback: () => {}): void;
10
+ close(callback: () => void): void;
11
+ }
12
12
  //# sourceMappingURL=dirty_git_db.d.ts.map
@@ -1,72 +1,72 @@
1
- /**
2
- * 2015 Visionist, Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS-IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
17
- import { BulkObject } from './cassandra_db';
18
- export default class extends AbstractDatabase {
19
- _client: any;
20
- readonly _index: any;
21
- _indexClean: boolean;
22
- readonly _q: {
23
- index: any;
24
- };
25
- constructor(settings: Settings);
26
- get isAsync(): boolean;
27
- _refreshIndex(): Promise<void>;
28
- /**
29
- * Initialize the elasticsearch client, then ping the server to ensure that a
30
- * connection was made.
31
- */
32
- init(): Promise<void>;
33
- /**
34
- * This function provides read functionality to the database.
35
- *
36
- * @param {String} key Key
37
- */
38
- get(key: string): Promise<any>;
39
- /**
40
- * @param key Search key, which uses an asterisk (*) as the wild card.
41
- * @param notKey Used to filter the result set
42
- */
43
- findKeys(key: string, notKey: string): Promise<any>;
44
- /**
45
- * This function provides write functionality to the database.
46
- *
47
- * @param {String} key Record identifier.
48
- * @param {JSON|String} value The value to store in the database.
49
- */
50
- set(key: string, value: string): Promise<void>;
51
- /**
52
- * This function provides delete functionality to the database.
53
- *
54
- * The index, type, and ID will be parsed from the key, and this document will
55
- * be deleted from the database.
56
- *
57
- * @param {String} key Record identifier.
58
- */
59
- remove(key: string): Promise<void>;
60
- /**
61
- * This uses the bulk upload functionality of elasticsearch (url:port/_bulk).
62
- *
63
- * The CacheAndBufferLayer will periodically (every this.settings.writeInterval)
64
- * flush writes that have already been done in the local cache out to the database.
65
- *
66
- * @param {Array} bulk An array of JSON data in the format:
67
- * {"type":type, "key":key, "value":value}
68
- */
69
- doBulk(bulk: BulkObject[]): Promise<void>;
70
- close(): Promise<void>;
71
- }
1
+ /**
2
+ * 2015 Visionist, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS-IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
17
+ import { BulkObject } from './cassandra_db';
18
+ export default class extends AbstractDatabase {
19
+ _client: any;
20
+ readonly _index: any;
21
+ _indexClean: boolean;
22
+ readonly _q: {
23
+ index: any;
24
+ };
25
+ constructor(settings: Settings);
26
+ get isAsync(): boolean;
27
+ _refreshIndex(): Promise<void>;
28
+ /**
29
+ * Initialize the elasticsearch client, then ping the server to ensure that a
30
+ * connection was made.
31
+ */
32
+ init(): Promise<void>;
33
+ /**
34
+ * This function provides read functionality to the database.
35
+ *
36
+ * @param {String} key Key
37
+ */
38
+ get(key: string): Promise<any>;
39
+ /**
40
+ * @param key Search key, which uses an asterisk (*) as the wild card.
41
+ * @param notKey Used to filter the result set
42
+ */
43
+ findKeys(key: string, notKey: string): Promise<any>;
44
+ /**
45
+ * This function provides write functionality to the database.
46
+ *
47
+ * @param {String} key Record identifier.
48
+ * @param {JSON|String} value The value to store in the database.
49
+ */
50
+ set(key: string, value: string): Promise<void>;
51
+ /**
52
+ * This function provides delete functionality to the database.
53
+ *
54
+ * The index, type, and ID will be parsed from the key, and this document will
55
+ * be deleted from the database.
56
+ *
57
+ * @param {String} key Record identifier.
58
+ */
59
+ remove(key: string): Promise<void>;
60
+ /**
61
+ * This uses the bulk upload functionality of elasticsearch (url:port/_bulk).
62
+ *
63
+ * The CacheAndBufferLayer will periodically (every this.settings.writeInterval)
64
+ * flush writes that have already been done in the local cache out to the database.
65
+ *
66
+ * @param {Array} bulk An array of JSON data in the format:
67
+ * {"type":type, "key":key, "value":value}
68
+ */
69
+ doBulk(bulk: BulkObject[]): Promise<void>;
70
+ close(): Promise<void>;
71
+ }
72
72
  //# sourceMappingURL=elasticsearch_db.d.ts.map
@@ -1,13 +1,13 @@
1
- import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
2
- export default class MemoryDB extends AbstractDatabase {
3
- _data: any;
4
- constructor(settings: Settings);
5
- get isAsync(): boolean;
6
- close(): void;
7
- findKeys(key: string, notKey: string): any[];
8
- get(key: string): any;
9
- init(): void;
10
- remove(key: string): void;
11
- set(key: string, value: string): void;
12
- }
1
+ import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
2
+ export default class MemoryDB extends AbstractDatabase {
3
+ _data: any;
4
+ constructor(settings: Settings);
5
+ get isAsync(): boolean;
6
+ close(): void;
7
+ findKeys(key: string, notKey: string): any[];
8
+ get(key: string): any;
9
+ init(): void;
10
+ remove(key: string): void;
11
+ set(key: string, value: string): void;
12
+ }
13
13
  //# sourceMappingURL=memory_db.d.ts.map
@@ -1,16 +1,16 @@
1
- /// <reference types="node" />
2
- import { Settings } from '../lib/AbstractDatabase';
3
- import events from 'events';
4
- export default class extends events.EventEmitter {
5
- settings: Settings;
6
- mock: any;
7
- constructor(settings: Settings);
8
- close(cb: () => {}): void;
9
- doBulk(ops: string, cb: () => {}): void;
10
- findKeys(key: string, notKey: string, cb: () => {}): void;
11
- get(key: string, cb: () => {}): void;
12
- init(cb: () => {}): Promise<void>;
13
- remove(key: string, cb: () => {}): void;
14
- set(key: string, value: string, cb: () => {}): void;
15
- }
1
+ /// <reference types="node" />
2
+ import { Settings } from '../lib/AbstractDatabase';
3
+ import events from 'events';
4
+ export default class extends events.EventEmitter {
5
+ settings: Settings;
6
+ mock: any;
7
+ constructor(settings: Settings);
8
+ close(cb: () => {}): void;
9
+ doBulk(ops: string, cb: () => {}): void;
10
+ findKeys(key: string, notKey: string, cb: () => {}): void;
11
+ get(key: string, cb: () => {}): void;
12
+ init(cb: () => {}): Promise<void>;
13
+ remove(key: string, cb: () => {}): void;
14
+ set(key: string, value: string, cb: () => {}): void;
15
+ }
16
16
  //# sourceMappingURL=mock_db.d.ts.map
@@ -1,36 +1,36 @@
1
- /**
2
- * 2020 Sylchauf
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS-IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /// <reference types="node" />
17
- import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
18
- import { BulkObject } from './cassandra_db';
19
- import { Collection, Db, MongoClient } from 'mongodb';
20
- export default class extends AbstractDatabase {
21
- interval: NodeJS.Timer | undefined;
22
- database: Db | undefined;
23
- client: MongoClient | undefined;
24
- collection: Collection | undefined;
25
- constructor(settings: Settings);
26
- clearPing(): void;
27
- schedulePing(): void;
28
- init(callback: Function): void;
29
- get(key: string, callback: Function): void;
30
- findKeys(key: string, notKey: string, callback: Function): void;
31
- set(key: string, value: string, callback: Function): void;
32
- remove(key: string, callback: Function): void;
33
- doBulk(bulk: BulkObject[], callback: Function): void;
34
- close(callback: any): void;
35
- }
1
+ /**
2
+ * 2020 Sylchauf
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS-IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /// <reference types="node" />
17
+ import AbstractDatabase, { Settings } from '../lib/AbstractDatabase';
18
+ import { BulkObject } from './cassandra_db';
19
+ import { Collection, Db, MongoClient } from 'mongodb';
20
+ export default class extends AbstractDatabase {
21
+ interval: NodeJS.Timer | undefined;
22
+ database: Db | undefined;
23
+ client: MongoClient | undefined;
24
+ collection: Collection | undefined;
25
+ constructor(settings: Settings);
26
+ clearPing(): void;
27
+ schedulePing(): void;
28
+ init(callback: Function): void;
29
+ get(key: string, callback: Function): void;
30
+ findKeys(key: string, notKey: string, callback: Function): void;
31
+ set(key: string, value: string, callback: Function): void;
32
+ remove(key: string, callback: Function): void;
33
+ doBulk(bulk: BulkObject[], callback: Function): void;
34
+ close(callback: any): void;
35
+ }
36
36
  //# sourceMappingURL=mongodb_db.d.ts.map