@naturalcycles/datastore-lib 4.12.0 → 4.13.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.
@@ -27,7 +27,7 @@ export declare class DatastoreDB extends BaseCommonDB implements CommonDB {
27
27
  private getDatastoreLib;
28
28
  ping(): Promise<void>;
29
29
  getByIds<ROW extends ObjectWithId>(table: string, ids: string[], opt?: DatastoreDBReadOptions): Promise<ROW[]>;
30
- multiGetByIds<ROW extends ObjectWithId>(map: StringMap<string[]>, opt?: DatastoreDBReadOptions): Promise<StringMap<ROW[]>>;
30
+ multiGet<ROW extends ObjectWithId>(map: StringMap<string[]>, opt?: DatastoreDBReadOptions): Promise<StringMap<ROW[]>>;
31
31
  runQuery<ROW extends ObjectWithId>(dbQuery: DBQuery<ROW>, opt?: DatastoreDBReadOptions): Promise<RunQueryResult<ROW>>;
32
32
  runQueryCount<ROW extends ObjectWithId>(dbQuery: DBQuery<ROW>, opt?: DatastoreDBReadOptions): Promise<number>;
33
33
  private runDatastoreQuery;
@@ -42,7 +42,7 @@ export declare class DatastoreDB extends BaseCommonDB implements CommonDB {
42
42
  * regardless if they were actually deleted or not.
43
43
  */
44
44
  deleteByIds(table: string, ids: string[], opt?: DatastoreDBOptions): Promise<number>;
45
- multiDeleteByIds(map: StringMap<string[]>, opt?: DatastoreDBOptions): Promise<number>;
45
+ multiDelete(map: StringMap<string[]>, opt?: DatastoreDBOptions): Promise<number>;
46
46
  createTransaction(opt?: CommonDBTransactionOptions): Promise<DatastoreDBTransaction>;
47
47
  runInTransaction(fn: DBTransactionFn, opt?: CommonDBTransactionOptions): Promise<void>;
48
48
  getAllStats(): Promise<DatastoreStats[]>;
@@ -148,7 +148,7 @@ export class DatastoreDB extends BaseCommonDB {
148
148
  // same ids are not expected here
149
149
  .sort(idComparator));
150
150
  }
151
- async multiGetByIds(map, opt = {}) {
151
+ async multiGet(map, opt = {}) {
152
152
  const result = {};
153
153
  const ds = await this.ds();
154
154
  const dsOpt = this.getRunQueryOptions(opt);
@@ -296,7 +296,7 @@ export class DatastoreDB extends BaseCommonDB {
296
296
  });
297
297
  return ids.length;
298
298
  }
299
- async multiDeleteByIds(map, opt = {}) {
299
+ async multiDelete(map, opt = {}) {
300
300
  const ds = await this.ds();
301
301
  const keys = [];
302
302
  for (const [table, ids] of _stringMapEntries(map)) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/datastore-lib",
3
3
  "type": "module",
4
- "version": "4.12.0",
4
+ "version": "4.13.0",
5
5
  "description": "Opinionated library to work with Google Datastore, implements CommonDB",
6
6
  "dependencies": {
7
7
  "@google-cloud/datastore": "^10",
@@ -229,7 +229,7 @@ export class DatastoreDB extends BaseCommonDB implements CommonDB {
229
229
  )
230
230
  }
231
231
 
232
- override async multiGetByIds<ROW extends ObjectWithId>(
232
+ override async multiGet<ROW extends ObjectWithId>(
233
233
  map: StringMap<string[]>,
234
234
  opt: DatastoreDBReadOptions = {},
235
235
  ): Promise<StringMap<ROW[]>> {
@@ -470,7 +470,7 @@ export class DatastoreDB extends BaseCommonDB implements CommonDB {
470
470
  return ids.length
471
471
  }
472
472
 
473
- override async multiDeleteByIds(
473
+ override async multiDelete(
474
474
  map: StringMap<string[]>,
475
475
  opt: DatastoreDBOptions = {},
476
476
  ): Promise<number> {