@naturalcycles/mysql-lib 3.16.0 → 3.16.2
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,5 +1,5 @@
|
|
|
1
1
|
import { CommonDBCreateOptions, CommonKeyValueDB, KeyValueDBTuple } from '@naturalcycles/db-lib';
|
|
2
|
-
import {
|
|
2
|
+
import { IncrementTuple } from '@naturalcycles/db-lib/dist/kv/commonKeyValueDB';
|
|
3
3
|
import { ReadableTyped } from '@naturalcycles/nodejs-lib';
|
|
4
4
|
import { MysqlDB, MysqlDBCfg } from './mysql.db';
|
|
5
5
|
export declare class MySQLKeyValueDB implements CommonKeyValueDB {
|
|
@@ -26,6 +26,5 @@ export declare class MySQLKeyValueDB implements CommonKeyValueDB {
|
|
|
26
26
|
beginTransaction(): Promise<void>;
|
|
27
27
|
endTransaction(): Promise<void>;
|
|
28
28
|
count(table: string): Promise<number>;
|
|
29
|
-
|
|
30
|
-
incrementBatch(_table: string, _incrementMap: StringMap<number>): Promise<StringMap<number>>;
|
|
29
|
+
incrementBatch(_table: string, _entries: IncrementTuple[]): Promise<IncrementTuple[]>;
|
|
31
30
|
}
|
package/dist/mysqlKeyValueDB.js
CHANGED
|
@@ -101,10 +101,7 @@ class MySQLKeyValueDB {
|
|
|
101
101
|
const rows = await this.db.runSQL({ sql });
|
|
102
102
|
return rows[0].cnt;
|
|
103
103
|
}
|
|
104
|
-
async
|
|
105
|
-
throw new js_lib_1.AppError('MySQLKeyValueDB.increment() is not implemented');
|
|
106
|
-
}
|
|
107
|
-
async incrementBatch(_table, _incrementMap) {
|
|
104
|
+
async incrementBatch(_table, _entries) {
|
|
108
105
|
throw new js_lib_1.AppError('MySQLKeyValueDB.incrementBatch() is not implemented');
|
|
109
106
|
}
|
|
110
107
|
}
|
package/package.json
CHANGED
package/src/mysqlKeyValueDB.ts
CHANGED
|
@@ -4,7 +4,8 @@ import {
|
|
|
4
4
|
commonKeyValueDBFullSupport,
|
|
5
5
|
KeyValueDBTuple,
|
|
6
6
|
} from '@naturalcycles/db-lib'
|
|
7
|
-
import {
|
|
7
|
+
import { IncrementTuple } from '@naturalcycles/db-lib/dist/kv/commonKeyValueDB'
|
|
8
|
+
import { AppError, ObjectWithId, pMap } from '@naturalcycles/js-lib'
|
|
8
9
|
import { ReadableTyped } from '@naturalcycles/nodejs-lib'
|
|
9
10
|
import { QueryOptions } from 'mysql'
|
|
10
11
|
import { MysqlDB, MysqlDBCfg } from './mysql.db'
|
|
@@ -125,14 +126,7 @@ export class MySQLKeyValueDB implements CommonKeyValueDB {
|
|
|
125
126
|
return rows[0]!.cnt
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
async
|
|
129
|
-
throw new AppError('MySQLKeyValueDB.increment() is not implemented')
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
async incrementBatch(
|
|
133
|
-
_table: string,
|
|
134
|
-
_incrementMap: StringMap<number>,
|
|
135
|
-
): Promise<StringMap<number>> {
|
|
129
|
+
async incrementBatch(_table: string, _entries: IncrementTuple[]): Promise<IncrementTuple[]> {
|
|
136
130
|
throw new AppError('MySQLKeyValueDB.incrementBatch() is not implemented')
|
|
137
131
|
}
|
|
138
132
|
}
|