@naturalcycles/db-lib 8.34.1 → 8.36.0
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/adapter/cachedb/cache.db.d.ts +9 -9
- package/dist/adapter/cachedb/cache.db.js +3 -1
- package/dist/adapter/cachedb/cache.db.model.d.ts +5 -3
- package/dist/adapter/file/file.db.d.ts +2 -2
- package/dist/adapter/inmemory/inMemory.db.d.ts +2 -2
- package/dist/adapter/inmemory/inMemory.db.js +6 -3
- package/dist/base.common.db.d.ts +2 -2
- package/dist/common.db.d.ts +3 -3
- package/dist/commondao/common.dao.d.ts +21 -21
- package/dist/commondao/common.dao.js +24 -22
- package/dist/commondao/common.dao.model.d.ts +22 -22
- package/dist/db.model.d.ts +2 -17
- package/dist/index.d.ts +4 -5
- package/dist/index.js +2 -4
- package/dist/pipeline/dbPipelineBackup.js +1 -2
- package/dist/pipeline/dbPipelineCopy.js +1 -2
- package/dist/pipeline/dbPipelineRestore.js +1 -2
- package/dist/query/dbQuery.d.ts +6 -6
- package/dist/validation/index.d.ts +3 -3
- package/package.json +1 -2
- package/src/adapter/cachedb/cache.db.model.ts +8 -7
- package/src/adapter/cachedb/cache.db.ts +20 -17
- package/src/adapter/file/file.db.ts +2 -2
- package/src/adapter/inmemory/inMemory.db.ts +9 -5
- package/src/base.common.db.ts +2 -2
- package/src/common.db.ts +7 -3
- package/src/commondao/common.dao.model.ts +31 -24
- package/src/commondao/common.dao.ts +78 -76
- package/src/db.model.ts +2 -18
- package/src/index.ts +2 -22
- package/src/pipeline/dbPipelineBackup.ts +9 -3
- package/src/pipeline/dbPipelineCopy.ts +2 -3
- package/src/pipeline/dbPipelineRestore.ts +2 -2
- package/src/query/dbQuery.ts +8 -7
- package/dist/adapter/inmemory/index.d.ts +0 -3
- package/dist/adapter/inmemory/index.js +0 -8
- package/dist/getDB.d.ts +0 -19
- package/dist/getDB.js +0 -32
- package/src/adapter/inmemory/index.ts +0 -9
- package/src/getDB.ts +0 -50
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CommonDBOptions, CommonDBSaveOptions } from '../db.model';
|
|
2
2
|
import { DBQuery, DBQueryFilter, DBQueryOrder } from '../query/dbQuery';
|
|
3
3
|
export declare const commonDBOptionsSchema: import("@naturalcycles/nodejs-lib").ObjectSchemaTyped<CommonDBOptions, CommonDBOptions>;
|
|
4
|
-
export declare const commonDBSaveOptionsSchema: import("@naturalcycles/nodejs-lib").ObjectSchemaTyped<CommonDBSaveOptions<import("@naturalcycles/js-lib").AnyObjectWithId<string>>, CommonDBSaveOptions<import("@naturalcycles/js-lib").AnyObjectWithId<string>>>;
|
|
4
|
+
export declare const commonDBSaveOptionsSchema: import("@naturalcycles/nodejs-lib").ObjectSchemaTyped<CommonDBSaveOptions<import("@naturalcycles/js-lib").AnyObjectWithId<string | number>>, CommonDBSaveOptions<import("@naturalcycles/js-lib").AnyObjectWithId<string | number>>>;
|
|
5
5
|
export declare const dbQueryFilterOperatorSchema: import("@naturalcycles/nodejs-lib/dist/validation/joi/string.extensions").ExtendedStringSchema;
|
|
6
|
-
export declare const dbQueryFilterSchema: import("@naturalcycles/nodejs-lib").ObjectSchemaTyped<DBQueryFilter<import("@naturalcycles/js-lib").AnyObjectWithId<string>>, DBQueryFilter<import("@naturalcycles/js-lib").AnyObjectWithId<string>>>;
|
|
7
|
-
export declare const dbQueryOrderSchema: import("@naturalcycles/nodejs-lib").ObjectSchemaTyped<DBQueryOrder<import("@naturalcycles/js-lib").AnyObjectWithId<string>>, DBQueryOrder<import("@naturalcycles/js-lib").AnyObjectWithId<string>>>;
|
|
6
|
+
export declare const dbQueryFilterSchema: import("@naturalcycles/nodejs-lib").ObjectSchemaTyped<DBQueryFilter<import("@naturalcycles/js-lib").AnyObjectWithId<string | number>>, DBQueryFilter<import("@naturalcycles/js-lib").AnyObjectWithId<string | number>>>;
|
|
7
|
+
export declare const dbQueryOrderSchema: import("@naturalcycles/nodejs-lib").ObjectSchemaTyped<DBQueryOrder<import("@naturalcycles/js-lib").AnyObjectWithId<string | number>>, DBQueryOrder<import("@naturalcycles/js-lib").AnyObjectWithId<string | number>>>;
|
|
8
8
|
export declare const dbQuerySchema: import("@naturalcycles/nodejs-lib").ObjectSchemaTyped<DBQuery<any>, DBQuery<any>>;
|
package/package.json
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@naturalcycles/js-lib": "^14.0.0",
|
|
8
8
|
"@naturalcycles/nodejs-lib": "^12.0.0",
|
|
9
|
-
"@naturalcycles/time-lib": "^3.0.1",
|
|
10
9
|
"fs-extra": "^10.0.0"
|
|
11
10
|
},
|
|
12
11
|
"devDependencies": {
|
|
@@ -43,7 +42,7 @@
|
|
|
43
42
|
"engines": {
|
|
44
43
|
"node": ">=14.15"
|
|
45
44
|
},
|
|
46
|
-
"version": "8.
|
|
45
|
+
"version": "8.36.0",
|
|
47
46
|
"description": "Lowest Common Denominator API to supported Databases",
|
|
48
47
|
"keywords": [
|
|
49
48
|
"db",
|
|
@@ -45,7 +45,7 @@ export interface CacheDBCfg {
|
|
|
45
45
|
logger?: CommonLogger
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export interface CacheDBOptions
|
|
48
|
+
export interface CacheDBOptions {
|
|
49
49
|
/**
|
|
50
50
|
* @default false
|
|
51
51
|
*/
|
|
@@ -57,9 +57,10 @@ export interface CacheDBOptions<ROW extends ObjectWithId> extends CommonDBSaveOp
|
|
|
57
57
|
onlyCache?: boolean
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
export interface
|
|
61
|
-
extends CacheDBOptions
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
export interface CacheDBSaveOptions<ROW extends ObjectWithId>
|
|
61
|
+
extends CacheDBOptions,
|
|
62
|
+
CommonDBSaveOptions<ROW> {}
|
|
63
|
+
|
|
64
|
+
export interface CacheDBStreamOptions extends CacheDBOptions, CommonDBStreamOptions {}
|
|
65
|
+
|
|
66
|
+
export interface CacheDBCreateOptions extends CacheDBOptions, CommonDBCreateOptions {}
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
CacheDBCfg,
|
|
14
14
|
CacheDBCreateOptions,
|
|
15
15
|
CacheDBOptions,
|
|
16
|
+
CacheDBSaveOptions,
|
|
16
17
|
CacheDBStreamOptions,
|
|
17
18
|
} from './cache.db.model'
|
|
18
19
|
|
|
@@ -59,7 +60,7 @@ export class CacheDB extends BaseCommonDB implements CommonDB {
|
|
|
59
60
|
override async createTable<ROW extends ObjectWithId>(
|
|
60
61
|
table: string,
|
|
61
62
|
schema: JsonSchemaObject<ROW>,
|
|
62
|
-
opt: CacheDBCreateOptions
|
|
63
|
+
opt: CacheDBCreateOptions = {},
|
|
63
64
|
): Promise<void> {
|
|
64
65
|
if (!opt.onlyCache && !this.cfg.onlyCache) {
|
|
65
66
|
await this.cfg.downstreamDB.createTable(table, schema, opt)
|
|
@@ -72,11 +73,11 @@ export class CacheDB extends BaseCommonDB implements CommonDB {
|
|
|
72
73
|
|
|
73
74
|
override async getByIds<ROW extends ObjectWithId>(
|
|
74
75
|
table: string,
|
|
75
|
-
ids:
|
|
76
|
-
opt:
|
|
76
|
+
ids: ROW['id'][],
|
|
77
|
+
opt: CacheDBSaveOptions<ROW> = {},
|
|
77
78
|
): Promise<ROW[]> {
|
|
78
79
|
const resultMap: StringMap<ROW> = {}
|
|
79
|
-
const missingIds:
|
|
80
|
+
const missingIds: ROW['id'][] = []
|
|
80
81
|
|
|
81
82
|
if (!opt.skipCache && !this.cfg.skipCache) {
|
|
82
83
|
const results = await this.cfg.cacheDB.getByIds<ROW>(table, ids, opt)
|
|
@@ -118,13 +119,13 @@ export class CacheDB extends BaseCommonDB implements CommonDB {
|
|
|
118
119
|
|
|
119
120
|
override async deleteByIds<ROW extends ObjectWithId>(
|
|
120
121
|
table: string,
|
|
121
|
-
ids:
|
|
122
|
-
opt: CacheDBOptions
|
|
122
|
+
ids: ROW['id'][],
|
|
123
|
+
opt: CacheDBOptions = {},
|
|
123
124
|
): Promise<number> {
|
|
124
125
|
let deletedIds = 0
|
|
125
126
|
|
|
126
127
|
if (!opt.onlyCache && !this.cfg.onlyCache) {
|
|
127
|
-
deletedIds = await this.cfg.downstreamDB.deleteByIds(table, ids, opt)
|
|
128
|
+
deletedIds = await this.cfg.downstreamDB.deleteByIds<ROW>(table, ids, opt)
|
|
128
129
|
|
|
129
130
|
if (this.cfg.logDownstream) {
|
|
130
131
|
this.cfg.logger?.log(`${table}.deleteByIds ${deletedIds} rows from downstream`)
|
|
@@ -132,11 +133,13 @@ export class CacheDB extends BaseCommonDB implements CommonDB {
|
|
|
132
133
|
}
|
|
133
134
|
|
|
134
135
|
if (!opt.skipCache && !this.cfg.skipCache) {
|
|
135
|
-
const cacheResult = this.cfg.cacheDB
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
const cacheResult = this.cfg.cacheDB
|
|
137
|
+
.deleteByIds<ROW>(table, ids, opt)
|
|
138
|
+
.then(deletedFromCache => {
|
|
139
|
+
if (this.cfg.logCached) {
|
|
140
|
+
this.cfg.logger?.log(`${table}.deleteByIds ${deletedFromCache} rows from cache`)
|
|
141
|
+
}
|
|
142
|
+
})
|
|
140
143
|
if (this.cfg.awaitCache) await cacheResult
|
|
141
144
|
}
|
|
142
145
|
|
|
@@ -146,7 +149,7 @@ export class CacheDB extends BaseCommonDB implements CommonDB {
|
|
|
146
149
|
override async saveBatch<ROW extends ObjectWithId>(
|
|
147
150
|
table: string,
|
|
148
151
|
rows: ROW[],
|
|
149
|
-
opt:
|
|
152
|
+
opt: CacheDBSaveOptions<ROW> = {},
|
|
150
153
|
): Promise<void> {
|
|
151
154
|
if (!opt.onlyCache && !this.cfg.onlyCache) {
|
|
152
155
|
await this.cfg.downstreamDB.saveBatch(table, rows, opt)
|
|
@@ -174,7 +177,7 @@ export class CacheDB extends BaseCommonDB implements CommonDB {
|
|
|
174
177
|
|
|
175
178
|
override async runQuery<ROW extends ObjectWithId>(
|
|
176
179
|
q: DBQuery<ROW>,
|
|
177
|
-
opt:
|
|
180
|
+
opt: CacheDBSaveOptions<ROW> = {},
|
|
178
181
|
): Promise<RunQueryResult<ROW>> {
|
|
179
182
|
if (!opt.onlyCache && !this.cfg.onlyCache) {
|
|
180
183
|
const { rows, ...queryResult } = await this.cfg.downstreamDB.runQuery(q, opt)
|
|
@@ -204,7 +207,7 @@ export class CacheDB extends BaseCommonDB implements CommonDB {
|
|
|
204
207
|
|
|
205
208
|
override async runQueryCount<ROW extends ObjectWithId>(
|
|
206
209
|
q: DBQuery<ROW>,
|
|
207
|
-
opt: CacheDBOptions
|
|
210
|
+
opt: CacheDBOptions = {},
|
|
208
211
|
): Promise<number> {
|
|
209
212
|
if (!opt.onlyCache && !this.cfg.onlyCache) {
|
|
210
213
|
return await this.cfg.downstreamDB.runQueryCount(q, opt)
|
|
@@ -221,7 +224,7 @@ export class CacheDB extends BaseCommonDB implements CommonDB {
|
|
|
221
224
|
|
|
222
225
|
override streamQuery<ROW extends ObjectWithId>(
|
|
223
226
|
q: DBQuery<ROW>,
|
|
224
|
-
opt: CacheDBStreamOptions
|
|
227
|
+
opt: CacheDBStreamOptions = {},
|
|
225
228
|
): Readable {
|
|
226
229
|
if (!opt.onlyCache && !this.cfg.onlyCache) {
|
|
227
230
|
const stream = this.cfg.downstreamDB.streamQuery<ROW>(q, opt)
|
|
@@ -260,7 +263,7 @@ export class CacheDB extends BaseCommonDB implements CommonDB {
|
|
|
260
263
|
|
|
261
264
|
override async deleteByQuery<ROW extends ObjectWithId>(
|
|
262
265
|
q: DBQuery<ROW>,
|
|
263
|
-
opt: CacheDBOptions
|
|
266
|
+
opt: CacheDBOptions = {},
|
|
264
267
|
): Promise<number> {
|
|
265
268
|
if (!opt.onlyCache && !this.cfg.onlyCache) {
|
|
266
269
|
const deletedIds = await this.cfg.downstreamDB.deleteByQuery(q, opt)
|
|
@@ -64,7 +64,7 @@ export class FileDB extends BaseCommonDB implements CommonDB {
|
|
|
64
64
|
|
|
65
65
|
override async getByIds<ROW extends ObjectWithId>(
|
|
66
66
|
table: string,
|
|
67
|
-
ids:
|
|
67
|
+
ids: ROW['id'][],
|
|
68
68
|
_opt?: CommonDBOptions,
|
|
69
69
|
): Promise<ROW[]> {
|
|
70
70
|
const byId = _by(await this.loadFile<ROW>(table), r => r.id)
|
|
@@ -173,7 +173,7 @@ export class FileDB extends BaseCommonDB implements CommonDB {
|
|
|
173
173
|
|
|
174
174
|
override async deleteByIds<ROW extends ObjectWithId>(
|
|
175
175
|
table: string,
|
|
176
|
-
ids:
|
|
176
|
+
ids: ROW['id'][],
|
|
177
177
|
_opt?: CommonDBOptions,
|
|
178
178
|
): Promise<number> {
|
|
179
179
|
if (!ids.length) return 0
|
|
@@ -137,17 +137,17 @@ export class InMemoryDB implements CommonDB {
|
|
|
137
137
|
if (opt.dropIfExists) {
|
|
138
138
|
this.data[table] = {}
|
|
139
139
|
} else {
|
|
140
|
-
this.data[table]
|
|
140
|
+
this.data[table] ||= {}
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
async getByIds<ROW extends ObjectWithId>(
|
|
145
145
|
_table: string,
|
|
146
|
-
ids:
|
|
146
|
+
ids: ROW['id'][],
|
|
147
147
|
_opt?: CommonDBOptions,
|
|
148
148
|
): Promise<ROW[]> {
|
|
149
149
|
const table = this.cfg.tablesPrefix + _table
|
|
150
|
-
this.data[table]
|
|
150
|
+
this.data[table] ||= {}
|
|
151
151
|
return ids.map(id => this.data[table]![id]).filter(Boolean) as ROW[]
|
|
152
152
|
}
|
|
153
153
|
|
|
@@ -157,7 +157,7 @@ export class InMemoryDB implements CommonDB {
|
|
|
157
157
|
_opt?: CommonDBSaveOptions<ROW>,
|
|
158
158
|
): Promise<void> {
|
|
159
159
|
const table = this.cfg.tablesPrefix + _table
|
|
160
|
-
this.data[table]
|
|
160
|
+
this.data[table] ||= {}
|
|
161
161
|
|
|
162
162
|
rows.forEach(r => {
|
|
163
163
|
if (!r.id) {
|
|
@@ -179,7 +179,11 @@ export class InMemoryDB implements CommonDB {
|
|
|
179
179
|
})
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
async deleteByIds
|
|
182
|
+
async deleteByIds<ROW extends ObjectWithId>(
|
|
183
|
+
_table: string,
|
|
184
|
+
ids: ROW['id'][],
|
|
185
|
+
_opt?: CommonDBOptions,
|
|
186
|
+
): Promise<number> {
|
|
183
187
|
const table = this.cfg.tablesPrefix + _table
|
|
184
188
|
this.data[table] = this.data[table] || {}
|
|
185
189
|
|
package/src/base.common.db.ts
CHANGED
|
@@ -35,7 +35,7 @@ export class BaseCommonDB implements CommonDB {
|
|
|
35
35
|
_schema: JsonSchemaObject<ROW>,
|
|
36
36
|
): Promise<void> {}
|
|
37
37
|
|
|
38
|
-
async deleteByIds(_table: string, _ids:
|
|
38
|
+
async deleteByIds<ROW extends ObjectWithId>(_table: string, _ids: ROW['id'][]): Promise<number> {
|
|
39
39
|
return 0
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -43,7 +43,7 @@ export class BaseCommonDB implements CommonDB {
|
|
|
43
43
|
return 0
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
async getByIds<ROW extends ObjectWithId>(_table: string, _ids:
|
|
46
|
+
async getByIds<ROW extends ObjectWithId>(_table: string, _ids: ROW['id'][]): Promise<ROW[]> {
|
|
47
47
|
return []
|
|
48
48
|
}
|
|
49
49
|
|
package/src/common.db.ts
CHANGED
|
@@ -49,7 +49,7 @@ export interface CommonDB {
|
|
|
49
49
|
*/
|
|
50
50
|
getByIds<ROW extends ObjectWithId>(
|
|
51
51
|
table: string,
|
|
52
|
-
ids:
|
|
52
|
+
ids: ROW['id'][],
|
|
53
53
|
opt?: CommonDBOptions,
|
|
54
54
|
): Promise<ROW[]>
|
|
55
55
|
|
|
@@ -78,10 +78,14 @@ export interface CommonDB {
|
|
|
78
78
|
|
|
79
79
|
// DELETE
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* Returns number of deleted items.
|
|
82
82
|
* Not supported by all implementations (e.g Datastore will always return same number as number of ids).
|
|
83
83
|
*/
|
|
84
|
-
deleteByIds
|
|
84
|
+
deleteByIds<ROW extends ObjectWithId>(
|
|
85
|
+
table: string,
|
|
86
|
+
ids: ROW['id'][],
|
|
87
|
+
opt?: CommonDBOptions,
|
|
88
|
+
): Promise<number>
|
|
85
89
|
|
|
86
90
|
deleteByQuery<ROW extends ObjectWithId>(q: DBQuery<ROW>, opt?: CommonDBOptions): Promise<number>
|
|
87
91
|
|
|
@@ -10,27 +10,21 @@ import {
|
|
|
10
10
|
import { CommonDB } from '../common.db'
|
|
11
11
|
import { CommonDBCreateOptions, CommonDBOptions, CommonDBSaveOptions } from '../db.model'
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
beforeDBMValidate: CommonDaoBeforeDBMValidateHook<DBM>
|
|
29
|
-
beforeDBMToBM: CommonDaoBeforeDBMToBMHook<BM, DBM>
|
|
30
|
-
beforeBMToDBM: CommonDaoBeforeBMToDBMHook<BM, DBM>
|
|
31
|
-
beforeTMToBM: CommonDaoBeforeTMToBMHook<BM, TM>
|
|
32
|
-
beforeBMToTM: CommonDaoBeforeBMToTMHook<BM, TM>
|
|
33
|
-
anonymize: CommonDaoAnonymizeHook<DBM>
|
|
13
|
+
export interface CommonDaoHooks<
|
|
14
|
+
BM extends Partial<ObjectWithId<ID>>,
|
|
15
|
+
DBM extends ObjectWithId<ID>,
|
|
16
|
+
TM,
|
|
17
|
+
ID extends string | number,
|
|
18
|
+
> {
|
|
19
|
+
createId: (obj: DBM | BM) => ID
|
|
20
|
+
parseNaturalId: (id: ID) => Partial<DBM>
|
|
21
|
+
beforeCreate: (bm: Partial<BM>) => Partial<BM>
|
|
22
|
+
beforeDBMValidate: (dbm: Partial<DBM>) => Partial<DBM>
|
|
23
|
+
beforeDBMToBM: (dbm: DBM) => Partial<BM> | Promise<Partial<BM>>
|
|
24
|
+
beforeBMToDBM: (bm: BM) => Partial<DBM> | Promise<Partial<DBM>>
|
|
25
|
+
beforeTMToBM: (tm: TM) => Partial<BM>
|
|
26
|
+
beforeBMToTM: (bm: BM) => Partial<TM>
|
|
27
|
+
anonymize: (dbm: DBM) => DBM
|
|
34
28
|
|
|
35
29
|
/**
|
|
36
30
|
* If hook is defined - allows to prevent or modify the error thrown.
|
|
@@ -61,9 +55,10 @@ export enum CommonDaoLogLevel {
|
|
|
61
55
|
}
|
|
62
56
|
|
|
63
57
|
export interface CommonDaoCfg<
|
|
64
|
-
BM extends Partial<ObjectWithId
|
|
65
|
-
DBM extends ObjectWithId = Saved<BM>,
|
|
58
|
+
BM extends Partial<ObjectWithId<ID>>,
|
|
59
|
+
DBM extends ObjectWithId<ID> = Saved<BM>,
|
|
66
60
|
TM = BM,
|
|
61
|
+
ID extends string | number = DBM['id'],
|
|
67
62
|
> {
|
|
68
63
|
db: CommonDB
|
|
69
64
|
table: string
|
|
@@ -109,7 +104,19 @@ export interface CommonDaoCfg<
|
|
|
109
104
|
logStarted?: boolean
|
|
110
105
|
|
|
111
106
|
// Hooks are designed with inspiration from got/ky interface
|
|
112
|
-
hooks?: Partial<CommonDaoHooks<BM, DBM, TM>>
|
|
107
|
+
hooks?: Partial<CommonDaoHooks<BM, DBM, TM, ID>>
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Defaults to 'string'
|
|
111
|
+
*/
|
|
112
|
+
idType?: 'string' | 'number'
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Defaults to true.
|
|
116
|
+
* Set to false to disable auto-generation of `id`.
|
|
117
|
+
* Useful e.g when your DB is generating ids by itself (e.g mysql auto_increment).
|
|
118
|
+
*/
|
|
119
|
+
createId?: boolean
|
|
113
120
|
|
|
114
121
|
/**
|
|
115
122
|
* Defaults to true
|