@naturalcycles/datastore-lib 3.16.3 → 3.17.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.
@@ -1,10 +1,12 @@
1
1
  /// <reference types="node" />
2
2
  import { Readable } from 'stream';
3
3
  import { Query } from '@google-cloud/datastore';
4
+ import { CommonLogger } from '@naturalcycles/js-lib';
4
5
  import type { ReadableTyped } from '@naturalcycles/nodejs-lib';
5
6
  import type { DatastoreDBStreamOptions } from './datastore.model';
6
7
  export declare class DatastoreStreamReadable<T = any> extends Readable implements ReadableTyped<T> {
7
8
  private q;
9
+ private logger;
8
10
  private originalLimit;
9
11
  private rowsRetrieved;
10
12
  private endCursor?;
@@ -12,9 +14,8 @@ export declare class DatastoreStreamReadable<T = any> extends Readable implement
12
14
  private done;
13
15
  private lastQueryDone?;
14
16
  private totalWait;
15
- private log;
16
17
  private opt;
17
- constructor(q: Query, opt: DatastoreDBStreamOptions);
18
+ constructor(q: Query, opt: DatastoreDBStreamOptions, logger: CommonLogger);
18
19
  private runNextQuery;
19
20
  count: number;
20
21
  _read(): void;
@@ -4,25 +4,22 @@ exports.DatastoreStreamReadable = void 0;
4
4
  const stream_1 = require("stream");
5
5
  const js_lib_1 = require("@naturalcycles/js-lib");
6
6
  class DatastoreStreamReadable extends stream_1.Readable {
7
- constructor(q, opt) {
7
+ constructor(q, opt, logger) {
8
8
  super({ objectMode: true });
9
9
  this.q = q;
10
+ this.logger = logger;
10
11
  this.rowsRetrieved = 0;
11
12
  this.running = false;
12
13
  this.done = false;
13
14
  this.totalWait = 0;
14
- // private log = (...args: any[]): void => console.log(...args)
15
- this.log = console.log.bind(console);
16
15
  this.count = 0; // use for debugging
17
16
  this.opt = {
18
17
  rssLimitMB: 1000,
19
18
  batchSize: 1000,
20
19
  ...opt,
21
20
  };
22
- if (!opt.debug)
23
- this.log = () => { };
24
21
  this.originalLimit = q.limitVal;
25
- console.log(`!! using experimentalCursorStream !! batchSize: ${opt.batchSize}`);
22
+ logger.log(`!! using experimentalCursorStream !! batchSize: ${opt.batchSize}`);
26
23
  }
27
24
  async runNextQuery() {
28
25
  if (this.done)
@@ -45,7 +42,7 @@ class DatastoreStreamReadable extends stream_1.Readable {
45
42
  try {
46
43
  const [rows, info] = await q.run();
47
44
  this.rowsRetrieved += rows.length;
48
- this.log(`got ${rows.length} rows, ${this.rowsRetrieved} rowsRetrieved, totalWait: ${(0, js_lib_1._ms)(this.totalWait)}`, info.moreResults);
45
+ this.logger.log(`got ${rows.length} rows, ${this.rowsRetrieved} rowsRetrieved, totalWait: ${(0, js_lib_1._ms)(this.totalWait)}`, info.moreResults);
49
46
  this.endCursor = info.endCursor;
50
47
  this.running = false; // ready to take more _reads
51
48
  this.lastQueryDone = Date.now();
@@ -53,7 +50,7 @@ class DatastoreStreamReadable extends stream_1.Readable {
53
50
  if (!info.endCursor ||
54
51
  info.moreResults === 'NO_MORE_RESULTS' ||
55
52
  (this.originalLimit && this.rowsRetrieved >= this.originalLimit)) {
56
- this.log(`!!!! DONE! ${this.rowsRetrieved} rowsRetrieved, totalWait: ${(0, js_lib_1._ms)(this.totalWait)}`);
53
+ this.logger.log(`!!!! DONE! ${this.rowsRetrieved} rowsRetrieved, totalWait: ${(0, js_lib_1._ms)(this.totalWait)}`);
57
54
  this.push(null);
58
55
  this.done = true;
59
56
  }
@@ -63,7 +60,7 @@ class DatastoreStreamReadable extends stream_1.Readable {
63
60
  void this.runNextQuery();
64
61
  }
65
62
  else {
66
- this.log(`rssLimitMB reached ${rssMB} > ${this.opt.rssLimitMB}, pausing stream`);
63
+ this.logger.log(`rssLimitMB reached ${rssMB} > ${this.opt.rssLimitMB}, pausing stream`);
67
64
  }
68
65
  }
69
66
  }
@@ -76,10 +73,10 @@ class DatastoreStreamReadable extends stream_1.Readable {
76
73
  // console.log(`_read called ${++this.count}, wasRunning: ${this.running}`) // debugging
77
74
  this.count++;
78
75
  if (this.running) {
79
- this.log(`_read ${this.count}, wasRunning: true`);
76
+ this.logger.log(`_read ${this.count}, wasRunning: true`);
80
77
  }
81
78
  if (this.done) {
82
- console.warn(`!!! _read was called, but done==true`);
79
+ this.logger.warn(`!!! _read was called, but done==true`);
83
80
  return;
84
81
  }
85
82
  if (!this.running) {
@@ -1,6 +1,6 @@
1
1
  import type { Datastore, Key, Query } from '@google-cloud/datastore';
2
- import { BaseCommonDB, CommonDB, DBQuery, DBTransaction, ObjectWithId, RunQueryResult } from '@naturalcycles/db-lib';
3
- import { JsonSchemaRootObject } from '@naturalcycles/js-lib';
2
+ import { BaseCommonDB, CommonDB, DBQuery, DBTransaction, RunQueryResult } from '@naturalcycles/db-lib';
3
+ import { ObjectWithId, JsonSchemaRootObject, CommonLogger } from '@naturalcycles/js-lib';
4
4
  import { ReadableTyped } from '@naturalcycles/nodejs-lib';
5
5
  import { DatastoreDBCfg, DatastoreDBOptions, DatastoreDBSaveOptions, DatastoreDBStreamOptions, DatastorePayload, DatastorePropertyStats, DatastoreStats } from './datastore.model';
6
6
  /**
@@ -9,8 +9,10 @@ import { DatastoreDBCfg, DatastoreDBOptions, DatastoreDBSaveOptions, DatastoreDB
9
9
  * https://cloud.google.com/datastore/docs/datastore-api-tutorial
10
10
  */
11
11
  export declare class DatastoreDB extends BaseCommonDB implements CommonDB {
12
- cfg: DatastoreDBCfg;
13
12
  constructor(cfg?: DatastoreDBCfg);
13
+ cfg: DatastoreDBCfg & {
14
+ logger: CommonLogger;
15
+ };
14
16
  private cachedDatastore?;
15
17
  /**
16
18
  * Datastore.KEY
@@ -21,27 +21,27 @@ const RETRY_ON = ['GOAWAY', 'UNAVAILABLE', 'UNKNOWN'];
21
21
  class DatastoreDB extends db_lib_1.BaseCommonDB {
22
22
  constructor(cfg = {}) {
23
23
  super();
24
- this.cfg = cfg;
24
+ this.cfg = {
25
+ logger: console,
26
+ ...cfg,
27
+ };
25
28
  }
26
29
  // @memo() // not used to be able to connect to many DBs in the same server instance
27
30
  ds() {
31
+ var _a;
28
32
  if (!this.cachedDatastore) {
29
- if (process.env['APP_ENV'] === 'test') {
30
- throw new Error('DatastoreDB cannot be used in Test env, please use InMemoryDB');
31
- }
33
+ (0, js_lib_1._assert)(process.env['APP_ENV'] !== 'test', 'DatastoreDB cannot be used in Test env, please use InMemoryDB');
32
34
  // Lazy-loading
33
35
  const datastoreLib = require('@google-cloud/datastore');
34
36
  const DS = datastoreLib.Datastore;
35
- this.cfg.projectId =
36
- this.cfg.projectId ||
37
- this.cfg.credentials?.project_id ||
38
- process.env['GOOGLE_CLOUD_PROJECT'];
39
- console.log(`DatastoreDB connected to ${(0, colors_1.boldWhite)(this.cfg.projectId)}`);
37
+ (_a = this.cfg).projectId || (_a.projectId = this.cfg.credentials?.project_id || process.env['GOOGLE_CLOUD_PROJECT']);
38
+ (0, js_lib_1._assert)(this.cfg.projectId, '"projectId" is not set for DatastoreDB');
39
+ this.cfg.logger.log(`DatastoreDB connected to ${(0, colors_1.boldWhite)(this.cfg.projectId)}`);
40
40
  if (this.cfg.useLegacyGRPC) {
41
41
  this.cfg.grpc = require('grpc');
42
42
  }
43
43
  if (this.cfg.grpc) {
44
- console.log('!!! DatastoreDB using custom grpc !!!');
44
+ this.cfg.logger.log('!!! DatastoreDB using custom grpc !!!');
45
45
  }
46
46
  this.cachedDatastore = new DS(this.cfg);
47
47
  this.KEY = this.cachedDatastore.KEY;
@@ -95,7 +95,7 @@ class DatastoreDB extends db_lib_1.BaseCommonDB {
95
95
  ..._opt,
96
96
  };
97
97
  return (opt.experimentalCursorStream
98
- ? new DatastoreStreamReadable_1.DatastoreStreamReadable(q, opt)
98
+ ? new DatastoreStreamReadable_1.DatastoreStreamReadable(q, opt, (0, js_lib_1.commonLoggerMinLevel)(this.cfg.logger, opt.debug ? 'log' : 'warn'))
99
99
  : this.ds().runQueryStream(q)).pipe(new stream_1.Transform({
100
100
  objectMode: true,
101
101
  transform: (chunk, _enc, cb) => {
@@ -119,19 +119,21 @@ class DatastoreDB extends db_lib_1.BaseCommonDB {
119
119
  // Here we retry the GOAWAY errors that are somewhat common for Datastore
120
120
  // Currently only retrying them here in .saveBatch(), cause probably they're only thrown when saving
121
121
  predicate: err => RETRY_ON.some(s => err?.message.includes(s)),
122
+ name: `DatastoreLib.saveBatch(${table})`,
122
123
  maxAttempts: 5,
123
124
  delay: 5000,
124
125
  delayMultiplier: 2,
125
126
  logFirstAttempt: false,
126
127
  logFailures: true,
127
128
  // logAll: true,
129
+ logger: this.cfg.logger,
128
130
  });
129
131
  try {
130
132
  await (0, js_lib_1.pMap)((0, js_lib_1._chunk)(entities, MAX_ITEMS), async (batch) => await save(batch));
131
133
  }
132
134
  catch (err) {
133
135
  // console.log(`datastore.save ${kind}`, { obj, entity })
134
- console.error(`error in datastore.save for ${table}`, err);
136
+ this.cfg.logger.error(`error in DatastoreLib.saveBatch for ${table} (${rows.length} rows)`, err);
135
137
  // don't throw, because datastore SDK makes it in separate thread, so exception will be unhandled otherwise
136
138
  return await Promise.reject(err);
137
139
  }
@@ -1,5 +1,6 @@
1
1
  import type { DatastoreOptions, Key, Transaction } from '@google-cloud/datastore';
2
- import { CommonDBOptions, CommonDBSaveOptions, AnyObjectWithId, ObjectWithId } from '@naturalcycles/db-lib';
2
+ import { CommonDBOptions, CommonDBSaveOptions } from '@naturalcycles/db-lib';
3
+ import { AnyObjectWithId, CommonLogger, ObjectWithId } from '@naturalcycles/js-lib';
3
4
  export interface DatastorePayload<T = any> {
4
5
  key: Key;
5
6
  data: T;
@@ -29,6 +30,10 @@ export interface DatastoreDBCfg extends DatastoreOptions {
29
30
  * e.g you can globally enable `experimentalCursorStream` here, set the batchSize, etc.
30
31
  */
31
32
  streamOptions?: DatastoreDBStreamOptions;
33
+ /**
34
+ * Default to `console`
35
+ */
36
+ logger?: CommonLogger;
32
37
  }
33
38
  export interface DatastoreCredentials {
34
39
  type?: string;
@@ -1,3 +1,4 @@
1
1
  import { Query } from '@google-cloud/datastore';
2
- import { DBQuery, ObjectWithId } from '@naturalcycles/db-lib';
2
+ import { DBQuery } from '@naturalcycles/db-lib';
3
+ import { ObjectWithId } from '@naturalcycles/js-lib';
3
4
  export declare function dbQueryToDatastoreQuery<ROW extends ObjectWithId>(dbQuery: Readonly<DBQuery<ROW>>, emptyQuery: Query): Query;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/datastore-lib",
3
- "version": "3.16.3",
3
+ "version": "3.17.1",
4
4
  "description": "Opinionated library to work with Google Datastore",
5
5
  "scripts": {
6
6
  "prepare": "husky install"
@@ -31,7 +31,7 @@
31
31
  "main": "dist/index.js",
32
32
  "types": "dist/index.d.ts",
33
33
  "engines": {
34
- "node": ">=12.13.1"
34
+ "node": ">=14.15.0"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
@@ -1,6 +1,6 @@
1
1
  import { Readable } from 'stream'
2
2
  import { Query } from '@google-cloud/datastore'
3
- import { _ms } from '@naturalcycles/js-lib'
3
+ import { _ms, CommonLogger } from '@naturalcycles/js-lib'
4
4
  import type { ReadableTyped } from '@naturalcycles/nodejs-lib'
5
5
  import type { DatastoreDBStreamOptions } from './datastore.model'
6
6
 
@@ -13,12 +13,9 @@ export class DatastoreStreamReadable<T = any> extends Readable implements Readab
13
13
  private lastQueryDone?: number
14
14
  private totalWait = 0
15
15
 
16
- // private log = (...args: any[]): void => console.log(...args)
17
- private log = console.log.bind(console)
18
-
19
16
  private opt: DatastoreDBStreamOptions & { batchSize: number }
20
17
 
21
- constructor(private q: Query, opt: DatastoreDBStreamOptions) {
18
+ constructor(private q: Query, opt: DatastoreDBStreamOptions, private logger: CommonLogger) {
22
19
  super({ objectMode: true })
23
20
 
24
21
  this.opt = {
@@ -27,11 +24,9 @@ export class DatastoreStreamReadable<T = any> extends Readable implements Readab
27
24
  ...opt,
28
25
  }
29
26
 
30
- if (!opt.debug) this.log = () => {}
31
-
32
27
  this.originalLimit = q.limitVal
33
28
 
34
- console.log(`!! using experimentalCursorStream !! batchSize: ${opt.batchSize}`)
29
+ logger.log(`!! using experimentalCursorStream !! batchSize: ${opt.batchSize}`)
35
30
  }
36
31
 
37
32
  private async runNextQuery(): Promise<void> {
@@ -61,7 +56,7 @@ export class DatastoreStreamReadable<T = any> extends Readable implements Readab
61
56
  const [rows, info] = await q.run()
62
57
 
63
58
  this.rowsRetrieved += rows.length
64
- this.log(
59
+ this.logger.log(
65
60
  `got ${rows.length} rows, ${this.rowsRetrieved} rowsRetrieved, totalWait: ${_ms(
66
61
  this.totalWait,
67
62
  )}`,
@@ -79,7 +74,7 @@ export class DatastoreStreamReadable<T = any> extends Readable implements Readab
79
74
  info.moreResults === 'NO_MORE_RESULTS' ||
80
75
  (this.originalLimit && this.rowsRetrieved >= this.originalLimit)
81
76
  ) {
82
- this.log(
77
+ this.logger.log(
83
78
  `!!!! DONE! ${this.rowsRetrieved} rowsRetrieved, totalWait: ${_ms(this.totalWait)}`,
84
79
  )
85
80
  this.push(null)
@@ -90,7 +85,7 @@ export class DatastoreStreamReadable<T = any> extends Readable implements Readab
90
85
  if (rssMB <= this.opt.rssLimitMB) {
91
86
  void this.runNextQuery()
92
87
  } else {
93
- this.log(`rssLimitMB reached ${rssMB} > ${this.opt.rssLimitMB}, pausing stream`)
88
+ this.logger.log(`rssLimitMB reached ${rssMB} > ${this.opt.rssLimitMB}, pausing stream`)
94
89
  }
95
90
  }
96
91
  } catch (err) {
@@ -105,11 +100,11 @@ export class DatastoreStreamReadable<T = any> extends Readable implements Readab
105
100
  // console.log(`_read called ${++this.count}, wasRunning: ${this.running}`) // debugging
106
101
  this.count++
107
102
  if (this.running) {
108
- this.log(`_read ${this.count}, wasRunning: true`)
103
+ this.logger.log(`_read ${this.count}, wasRunning: true`)
109
104
  }
110
105
 
111
106
  if (this.done) {
112
- console.warn(`!!! _read was called, but done==true`)
107
+ this.logger.warn(`!!! _read was called, but done==true`)
113
108
  return
114
109
  }
115
110
 
@@ -6,10 +6,10 @@ import {
6
6
  DBQuery,
7
7
  DBTransaction,
8
8
  mergeDBOperations,
9
- ObjectWithId,
10
9
  RunQueryResult,
11
10
  } from '@naturalcycles/db-lib'
12
11
  import {
12
+ ObjectWithId,
13
13
  JsonSchemaAny,
14
14
  JsonSchemaBoolean,
15
15
  JsonSchemaNull,
@@ -22,6 +22,8 @@ import {
22
22
  _chunk,
23
23
  _omit,
24
24
  JsonSchemaRootObject,
25
+ CommonLogger,
26
+ commonLoggerMinLevel,
25
27
  } from '@naturalcycles/js-lib'
26
28
  import { ReadableTyped } from '@naturalcycles/nodejs-lib'
27
29
  import { boldWhite } from '@naturalcycles/nodejs-lib/dist/colors'
@@ -51,10 +53,16 @@ const RETRY_ON = ['GOAWAY', 'UNAVAILABLE', 'UNKNOWN']
51
53
  * https://cloud.google.com/datastore/docs/datastore-api-tutorial
52
54
  */
53
55
  export class DatastoreDB extends BaseCommonDB implements CommonDB {
54
- constructor(public cfg: DatastoreDBCfg = {}) {
56
+ constructor(cfg: DatastoreDBCfg = {}) {
55
57
  super()
58
+ this.cfg = {
59
+ logger: console,
60
+ ...cfg,
61
+ }
56
62
  }
57
63
 
64
+ public cfg: DatastoreDBCfg & { logger: CommonLogger }
65
+
58
66
  private cachedDatastore?: Datastore
59
67
 
60
68
  /**
@@ -65,26 +73,26 @@ export class DatastoreDB extends BaseCommonDB implements CommonDB {
65
73
  // @memo() // not used to be able to connect to many DBs in the same server instance
66
74
  ds(): Datastore {
67
75
  if (!this.cachedDatastore) {
68
- if (process.env['APP_ENV'] === 'test') {
69
- throw new Error('DatastoreDB cannot be used in Test env, please use InMemoryDB')
70
- }
76
+ _assert(
77
+ process.env['APP_ENV'] !== 'test',
78
+ 'DatastoreDB cannot be used in Test env, please use InMemoryDB',
79
+ )
71
80
 
72
81
  // Lazy-loading
73
82
  const datastoreLib = require('@google-cloud/datastore')
74
83
  const DS = datastoreLib.Datastore as typeof Datastore
75
- this.cfg.projectId =
76
- this.cfg.projectId ||
77
- this.cfg.credentials?.project_id ||
78
- process.env['GOOGLE_CLOUD_PROJECT']!
84
+ this.cfg.projectId ||= this.cfg.credentials?.project_id || process.env['GOOGLE_CLOUD_PROJECT']
85
+
86
+ _assert(this.cfg.projectId, '"projectId" is not set for DatastoreDB')
79
87
 
80
- console.log(`DatastoreDB connected to ${boldWhite(this.cfg.projectId)}`)
88
+ this.cfg.logger.log(`DatastoreDB connected to ${boldWhite(this.cfg.projectId)}`)
81
89
 
82
90
  if (this.cfg.useLegacyGRPC) {
83
91
  this.cfg.grpc = require('grpc')
84
92
  }
85
93
 
86
94
  if (this.cfg.grpc) {
87
- console.log('!!! DatastoreDB using custom grpc !!!')
95
+ this.cfg.logger.log('!!! DatastoreDB using custom grpc !!!')
88
96
  }
89
97
 
90
98
  this.cachedDatastore = new DS(this.cfg)
@@ -167,7 +175,11 @@ export class DatastoreDB extends BaseCommonDB implements CommonDB {
167
175
 
168
176
  return (
169
177
  opt.experimentalCursorStream
170
- ? new DatastoreStreamReadable(q, opt)
178
+ ? new DatastoreStreamReadable(
179
+ q,
180
+ opt,
181
+ commonLoggerMinLevel(this.cfg.logger, opt.debug ? 'log' : 'warn'),
182
+ )
171
183
  : this.ds().runQueryStream(q)
172
184
  ).pipe(
173
185
  new Transform({
@@ -209,12 +221,14 @@ export class DatastoreDB extends BaseCommonDB implements CommonDB {
209
221
  // Here we retry the GOAWAY errors that are somewhat common for Datastore
210
222
  // Currently only retrying them here in .saveBatch(), cause probably they're only thrown when saving
211
223
  predicate: err => RETRY_ON.some(s => (err as Error)?.message.includes(s)),
224
+ name: `DatastoreLib.saveBatch(${table})`,
212
225
  maxAttempts: 5,
213
226
  delay: 5000,
214
227
  delayMultiplier: 2,
215
228
  logFirstAttempt: false,
216
229
  logFailures: true,
217
230
  // logAll: true,
231
+ logger: this.cfg.logger,
218
232
  },
219
233
  )
220
234
 
@@ -222,7 +236,10 @@ export class DatastoreDB extends BaseCommonDB implements CommonDB {
222
236
  await pMap(_chunk(entities, MAX_ITEMS), async batch => await save(batch))
223
237
  } catch (err) {
224
238
  // console.log(`datastore.save ${kind}`, { obj, entity })
225
- console.error(`error in datastore.save for ${table}`, err)
239
+ this.cfg.logger.error(
240
+ `error in DatastoreLib.saveBatch for ${table} (${rows.length} rows)`,
241
+ err,
242
+ )
226
243
  // don't throw, because datastore SDK makes it in separate thread, so exception will be unhandled otherwise
227
244
  return await Promise.reject(err)
228
245
  }
@@ -1,10 +1,6 @@
1
1
  import type { DatastoreOptions, Key, Transaction } from '@google-cloud/datastore'
2
- import {
3
- CommonDBOptions,
4
- CommonDBSaveOptions,
5
- AnyObjectWithId,
6
- ObjectWithId,
7
- } from '@naturalcycles/db-lib'
2
+ import { CommonDBOptions, CommonDBSaveOptions } from '@naturalcycles/db-lib'
3
+ import { AnyObjectWithId, CommonLogger, ObjectWithId } from '@naturalcycles/js-lib'
8
4
 
9
5
  export interface DatastorePayload<T = any> {
10
6
  key: Key
@@ -40,6 +36,11 @@ export interface DatastoreDBCfg extends DatastoreOptions {
40
36
  * e.g you can globally enable `experimentalCursorStream` here, set the batchSize, etc.
41
37
  */
42
38
  streamOptions?: DatastoreDBStreamOptions
39
+
40
+ /**
41
+ * Default to `console`
42
+ */
43
+ logger?: CommonLogger
43
44
  }
44
45
 
45
46
  export interface DatastoreCredentials {
@@ -1,5 +1,5 @@
1
- import { CommonKeyValueDB, DBQuery, KeyValueDBTuple, ObjectWithId } from '@naturalcycles/db-lib'
2
- import { ErrorMode } from '@naturalcycles/js-lib'
1
+ import { CommonKeyValueDB, DBQuery, KeyValueDBTuple } from '@naturalcycles/db-lib'
2
+ import { ErrorMode, ObjectWithId } from '@naturalcycles/js-lib'
3
3
  import { ReadableTyped, transformMapSimple } from '@naturalcycles/nodejs-lib'
4
4
  import { DatastoreDB } from './datastore.db'
5
5
  import { DatastoreDBCfg } from './datastore.model'
package/src/query.util.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Query } from '@google-cloud/datastore'
2
- import { DBQuery, DBQueryFilterOperator, ObjectWithId } from '@naturalcycles/db-lib'
3
- import { StringMap } from '@naturalcycles/js-lib'
2
+ import { DBQuery, DBQueryFilterOperator } from '@naturalcycles/db-lib'
3
+ import { ObjectWithId, StringMap } from '@naturalcycles/js-lib'
4
4
  // import Operator = google.datastore.v1.CompositeFilter.Operator
5
5
 
6
6
  const FNAME_MAP: StringMap = {
package/CHANGELOG.md DELETED
@@ -1,574 +0,0 @@
1
- ## [3.16.3](https://github.com/NaturalCycles/datastore-lib/compare/v3.16.2...v3.16.3) (2021-10-17)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * types ([8ee6857](https://github.com/NaturalCycles/datastore-lib/commit/8ee6857ed14739413c7df0e9b7395fb6c9b6b85d))
7
-
8
- ## [3.16.2](https://github.com/NaturalCycles/datastore-lib/compare/v3.16.1...v3.16.2) (2021-10-17)
9
-
10
-
11
- ### Bug Fixes
12
-
13
- * adapt to latest db-lib with typed queries ([21d31ea](https://github.com/NaturalCycles/datastore-lib/commit/21d31ea7343ca0b2590950c067f6ce472dc82501))
14
-
15
- ## [3.16.1](https://github.com/NaturalCycles/datastore-lib/compare/v3.16.0...v3.16.1) (2021-10-07)
16
-
17
-
18
- ### Bug Fixes
19
-
20
- * logging ([961b485](https://github.com/NaturalCycles/datastore-lib/commit/961b485a0ff1c0268bfc491e9f7a608a1b2b77da))
21
-
22
- # [3.16.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.15.0...v3.16.0) (2021-10-07)
23
-
24
-
25
- ### Features
26
-
27
- * allow to set streamOptions in DatastoreCfg ([c9fb5f0](https://github.com/NaturalCycles/datastore-lib/commit/c9fb5f08760f113d3b563ce80579df189d06b7b1))
28
-
29
- # [3.15.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.14.1...v3.15.0) (2021-10-07)
30
-
31
-
32
- ### Features
33
-
34
- * experimentalCursorStream mode to fix backpressure ([419f8e1](https://github.com/NaturalCycles/datastore-lib/commit/419f8e16ccb9722771a01b90001ae19f2a7a8595))
35
-
36
- ## [3.14.1](https://github.com/NaturalCycles/datastore-lib/compare/v3.14.0...v3.14.1) (2021-10-04)
37
-
38
-
39
- ### Bug Fixes
40
-
41
- * adapt to db-lib ([78f7a81](https://github.com/NaturalCycles/datastore-lib/commit/78f7a81b3fc2bf263e9164a6478fb2d0c0ea9869))
42
-
43
- # [3.14.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.13.0...v3.14.0) (2021-10-04)
44
-
45
-
46
- ### Features
47
-
48
- * support $id=`${table}.schema.json` ([afe235d](https://github.com/NaturalCycles/datastore-lib/commit/afe235d2c1e556a34391f241517f87f6c52f57de))
49
-
50
- # [3.13.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.12.2...v3.13.0) (2021-10-01)
51
-
52
-
53
- ### Features
54
-
55
- * adapt to db-lib (return jsonSchema instead of CommonSchema) ([8065764](https://github.com/NaturalCycles/datastore-lib/commit/8065764e2f93ee981c1bbb5b98b50a2a965fb0c7))
56
-
57
- ## [3.12.2](https://github.com/NaturalCycles/datastore-lib/compare/v3.12.1...v3.12.2) (2021-08-24)
58
-
59
-
60
- ### Bug Fixes
61
-
62
- * deps, adapt KeyValueDB implementation ([6ef0538](https://github.com/NaturalCycles/datastore-lib/commit/6ef0538873f9e02b1b7fc5e380b6be10ea38e436))
63
-
64
- ## [3.12.1](https://github.com/NaturalCycles/datastore-lib/compare/v3.12.0...v3.12.1) (2021-08-05)
65
-
66
-
67
- ### Bug Fixes
68
-
69
- * throw explicit error on missing `id` when doing saveBatch ([1a2f29e](https://github.com/NaturalCycles/datastore-lib/commit/1a2f29e57f20d95004d2cd6a79f9f9eafe26cf56))
70
-
71
- # [3.12.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.11.1...v3.12.0) (2021-07-04)
72
-
73
-
74
- ### Features
75
-
76
- * DatastoreKeyValueDB ([d03ac8c](https://github.com/NaturalCycles/datastore-lib/commit/d03ac8c6a8febba6b5b43fe373433f15ac2659d6))
77
-
78
- ## [3.11.1](https://github.com/NaturalCycles/datastore-lib/compare/v3.11.0...v3.11.1) (2021-05-22)
79
-
80
-
81
- ### Bug Fixes
82
-
83
- * adopt eslint ([123f16c](https://github.com/NaturalCycles/datastore-lib/commit/123f16cb913e0df0f45c5c3266af01463c467217))
84
-
85
- # [3.11.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.10.0...v3.11.0) (2021-03-18)
86
-
87
-
88
- ### Features
89
-
90
- * also retry on UNKNOWN errors ([a916386](https://github.com/NaturalCycles/datastore-lib/commit/a9163866e3d87963c0c2b389079e05af4c6d56a6))
91
-
92
- # [3.10.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.9.2...v3.10.0) (2021-03-01)
93
-
94
-
95
- ### Features
96
-
97
- * also retry on UNAVAILABLE ([fb4bfdc](https://github.com/NaturalCycles/datastore-lib/commit/fb4bfdc57224f9753ef40e1db682615f172c19d7))
98
-
99
- ## [3.9.2](https://github.com/NaturalCycles/datastore-lib/compare/v3.9.1...v3.9.2) (2021-02-23)
100
-
101
-
102
- ### Bug Fixes
103
-
104
- * tune pRetry options for .saveBatch, GOAWAY test passes now! ([cac1ece](https://github.com/NaturalCycles/datastore-lib/commit/cac1ecec29afaf3bb38e382d481b09a2977c1eea))
105
-
106
- ## [3.9.1](https://github.com/NaturalCycles/datastore-lib/compare/v3.9.0...v3.9.1) (2021-02-23)
107
-
108
-
109
- ### Bug Fixes
110
-
111
- * unnecessary await in .saveBatch ([12b1b75](https://github.com/NaturalCycles/datastore-lib/commit/12b1b7528383fbf9406d91515008c51d4a08a807))
112
-
113
- # [3.9.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.8.6...v3.9.0) (2021-02-23)
114
-
115
-
116
- ### Bug Fixes
117
-
118
- * modernize ([2a4eac5](https://github.com/NaturalCycles/datastore-lib/commit/2a4eac5e521a6dc7da073e0f0d8df17df776a03d))
119
-
120
-
121
- ### Features
122
-
123
- * retry on GOAWAY in .saveBatch (experimental) ([e381ed5](https://github.com/NaturalCycles/datastore-lib/commit/e381ed58d2999b86f2035479bfbc9b759a07aa05))
124
-
125
- ## [3.8.6](https://github.com/NaturalCycles/datastore-lib/compare/v3.8.5...v3.8.6) (2020-11-10)
126
-
127
-
128
- ### Bug Fixes
129
-
130
- * use Key type from Datastore that is properly exported now ([931e978](https://github.com/NaturalCycles/datastore-lib/commit/931e97861f5075971fc3d1a5fa971f64197fefcc))
131
-
132
- ## [3.8.5](https://github.com/NaturalCycles/datastore-lib/compare/v3.8.4...v3.8.5) (2020-11-05)
133
-
134
-
135
- ### Bug Fixes
136
-
137
- * adapt to db-lib ([f0e6da9](https://github.com/NaturalCycles/datastore-lib/commit/f0e6da9b93111caec0a0178c936a16dbeacf04e2))
138
-
139
- ## [3.8.4](https://github.com/NaturalCycles/datastore-lib/compare/v3.8.3...v3.8.4) (2020-10-25)
140
-
141
-
142
- ### Bug Fixes
143
-
144
- * adapt to recent db-lib (map '==' operator to '=') ([8e36412](https://github.com/NaturalCycles/datastore-lib/commit/8e36412abbc15ed6ec0132124fa811b8393de06f))
145
-
146
- ## [3.8.3](https://github.com/NaturalCycles/datastore-lib/compare/v3.8.2...v3.8.3) (2020-10-12)
147
-
148
-
149
- ### Bug Fixes
150
-
151
- * support db-lib@8 ([f46a5bd](https://github.com/NaturalCycles/datastore-lib/commit/f46a5bdc14dbff7c062292a45f93829b1d4c4cb9))
152
-
153
- ## [3.8.2](https://github.com/NaturalCycles/datastore-lib/compare/v3.8.1...v3.8.2) (2020-09-21)
154
-
155
-
156
- ### Bug Fixes
157
-
158
- * deps ([a751b4c](https://github.com/NaturalCycles/datastore-lib/commit/a751b4c74472c2159c584de04eaf086d22a0d558))
159
-
160
- ## [3.8.1](https://github.com/NaturalCycles/datastore-lib/compare/v3.8.0...v3.8.1) (2020-08-17)
161
-
162
-
163
- ### Bug Fixes
164
-
165
- * deps ([7200862](https://github.com/NaturalCycles/datastore-lib/commit/7200862a52e07dd86d01bbea351db36b2d5fce92))
166
-
167
- # [3.8.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.7.2...v3.8.0) (2020-08-14)
168
-
169
-
170
- ### Features
171
-
172
- * allow > 500 items in save/delete by chunking the array ([c552d3a](https://github.com/NaturalCycles/datastore-lib/commit/c552d3a5ffd217690342ade090eaf2ba35855c3d))
173
-
174
- ## [3.7.2](https://github.com/NaturalCycles/datastore-lib/compare/v3.7.1...v3.7.2) (2020-08-10)
175
-
176
-
177
- ### Bug Fixes
178
-
179
- * deps ([633825d](https://github.com/NaturalCycles/datastore-lib/commit/633825d0a6be01c7f0f9755a06e08aa2281fa5dd))
180
-
181
- ## [3.7.1](https://github.com/NaturalCycles/datastore-lib/compare/v3.7.0...v3.7.1) (2020-06-03)
182
-
183
-
184
- ### Bug Fixes
185
-
186
- * deps ([9c8e024](https://github.com/NaturalCycles/datastore-lib/commit/9c8e02497a5d924edcdac779826b9a16c44a201d))
187
-
188
- # [3.7.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.6.1...v3.7.0) (2020-05-31)
189
-
190
-
191
- ### Features
192
-
193
- * adapt to db-lib@7 ([2d34fb4](https://github.com/NaturalCycles/datastore-lib/commit/2d34fb4a170b1d92c0fd23cfdd18ac3521b4a50b))
194
-
195
- ## [3.6.1](https://github.com/NaturalCycles/datastore-lib/compare/v3.6.0...v3.6.1) (2020-05-24)
196
-
197
-
198
- ### Bug Fixes
199
-
200
- * adapt to CommonDB ([abafb97](https://github.com/NaturalCycles/datastore-lib/commit/abafb9739455b0466a09920c07e23e30253f8220))
201
-
202
- # [3.6.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.5.7...v3.6.0) (2020-05-24)
203
-
204
-
205
- ### Features
206
-
207
- * CommonDB@6 (transactions) ([f44f8a4](https://github.com/NaturalCycles/datastore-lib/commit/f44f8a4e2aa7b8f405f944490aabc978c9117527))
208
-
209
- ## [3.5.7](https://github.com/NaturalCycles/datastore-lib/compare/v3.5.6...v3.5.7) (2020-04-25)
210
-
211
-
212
- ### Bug Fixes
213
-
214
- * deps ([7614462](https://github.com/NaturalCycles/datastore-lib/commit/7614462b87942eaf5bb390f67daf9a3f63add477))
215
-
216
- ## [3.5.6](https://github.com/NaturalCycles/datastore-lib/compare/v3.5.5...v3.5.6) (2020-04-23)
217
-
218
-
219
- ### Bug Fixes
220
-
221
- * deps ([44c147f](https://github.com/NaturalCycles/datastore-lib/commit/44c147fc166e183e7ae9490e8be0bd6ed3c566b6))
222
-
223
- ## [3.5.5](https://github.com/NaturalCycles/datastore-lib/compare/v3.5.4...v3.5.5) (2020-04-19)
224
-
225
-
226
- ### Bug Fixes
227
-
228
- * deps ([081b037](https://github.com/NaturalCycles/datastore-lib/commit/081b03700a2f4f286d471a3d5c30682743d68e1e))
229
-
230
- ## [3.5.4](https://github.com/NaturalCycles/datastore-lib/compare/v3.5.3...v3.5.4) (2020-04-11)
231
-
232
-
233
- ### Bug Fixes
234
-
235
- * support projection queries without 'id' field ([699191a](https://github.com/NaturalCycles/datastore-lib/commit/699191a103be78c22b07d4df97af3068d2e05d9d))
236
-
237
- ## [3.5.3](https://github.com/NaturalCycles/datastore-lib/compare/v3.5.2...v3.5.3) (2020-04-01)
238
-
239
-
240
- ### Bug Fixes
241
-
242
- * ping method, getByIds sorting ([16f5d15](https://github.com/NaturalCycles/datastore-lib/commit/16f5d15c6d283757fcf950c23654669c8e2c4746))
243
-
244
- ## [3.5.2](https://github.com/NaturalCycles/datastore-lib/compare/v3.5.1...v3.5.2) (2020-03-31)
245
-
246
-
247
- ### Bug Fixes
248
-
249
- * deps ([25b7e93](https://github.com/NaturalCycles/datastore-lib/commit/25b7e93d60abb9a858db1f3ca23c89211d62fdb3))
250
-
251
- ## [3.5.1](https://github.com/NaturalCycles/datastore-lib/compare/v3.5.0...v3.5.1) (2020-03-31)
252
-
253
-
254
- ### Bug Fixes
255
-
256
- * deps ([1cdd926](https://github.com/NaturalCycles/datastore-lib/commit/1cdd926d7afc0461b4a6056f9d115cfda40d3311))
257
-
258
- # [3.5.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.4.1...v3.5.0) (2020-03-22)
259
-
260
-
261
- ### Features
262
-
263
- * bump nodejs-lib (joi 17) ([ba337ac](https://github.com/NaturalCycles/datastore-lib/commit/ba337ac61ac2a291cd544c4dfa68fd7abc124ba9))
264
-
265
- ## [3.4.1](https://github.com/NaturalCycles/datastore-lib/compare/v3.4.0...v3.4.1) (2020-03-16)
266
-
267
-
268
- ### Bug Fixes
269
-
270
- * deps ([bdf3fe1](https://github.com/NaturalCycles/datastore-lib/commit/bdf3fe1bfeeec9649de552293bccb8c3bafb0f4e))
271
-
272
- # [3.4.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.3.1...v3.4.0) (2020-03-01)
273
-
274
-
275
- ### Features
276
-
277
- * deps ([8c8c1f2](https://github.com/NaturalCycles/datastore-lib/commit/8c8c1f2abd4b67a26ab3f775cf41f290018d99f6))
278
-
279
- ## [3.3.1](https://github.com/NaturalCycles/datastore-lib/compare/v3.3.0...v3.3.1) (2019-11-19)
280
-
281
-
282
- ### Bug Fixes
283
-
284
- * support @google-cloud/datastore@5 ([2ffd5d1](https://github.com/NaturalCycles/datastore-lib/commit/2ffd5d10f50d743c037e5bbab7e8cfcddf3f824c))
285
-
286
- # [3.3.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.2.5...v3.3.0) (2019-11-09)
287
-
288
-
289
- ### Features
290
-
291
- * getDBAdapter(), changed DatastoreDBCfg format ([0794bc2](https://github.com/NaturalCycles/datastore-lib/commit/0794bc2abf4bb25897ca73ec798dd2a3a09de513))
292
-
293
- ## [3.2.5](https://github.com/NaturalCycles/datastore-lib/compare/v3.2.4...v3.2.5) (2019-11-09)
294
-
295
-
296
- ### Bug Fixes
297
-
298
- * **schema:** order id first ([3899334](https://github.com/NaturalCycles/datastore-lib/commit/389933485f2450ed58175edd7d257664b4b5af17))
299
-
300
- ## [3.2.4](https://github.com/NaturalCycles/datastore-lib/compare/v3.2.3...v3.2.4) (2019-11-09)
301
-
302
-
303
- ### Bug Fixes
304
-
305
- * exclude dot-properties from schema ([8865867](https://github.com/NaturalCycles/datastore-lib/commit/8865867b94b77188d6c38fda1ca08292083d09d7))
306
-
307
- ## [3.2.3](https://github.com/NaturalCycles/datastore-lib/compare/v3.2.2...v3.2.3) (2019-11-09)
308
-
309
-
310
- ### Bug Fixes
311
-
312
- * createTable ([c509e75](https://github.com/NaturalCycles/datastore-lib/commit/c509e758de4acac3e2416857f166107a434505b6))
313
-
314
- ## [3.2.2](https://github.com/NaturalCycles/datastore-lib/compare/v3.2.1...v3.2.2) (2019-11-08)
315
-
316
-
317
- ### Bug Fixes
318
-
319
- * getTableSchema was missing `id` ([e080b28](https://github.com/NaturalCycles/datastore-lib/commit/e080b281635f182290312219fc7655288e05a682))
320
-
321
- ## [3.2.1](https://github.com/NaturalCycles/datastore-lib/compare/v3.2.0...v3.2.1) (2019-11-08)
322
-
323
-
324
- ### Bug Fixes
325
-
326
- * getTableSchema type merging ([3c41101](https://github.com/NaturalCycles/datastore-lib/commit/3c41101bece3f65499c19a4b8e9884dab6f5ec1e))
327
-
328
- # [3.2.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.1.0...v3.2.0) (2019-11-07)
329
-
330
-
331
- ### Features
332
-
333
- * implement getTables(), getTableSchema() ([1e5aa6b](https://github.com/NaturalCycles/datastore-lib/commit/1e5aa6b435217075c503aab243c140bef4af4feb))
334
-
335
- # [3.1.0](https://github.com/NaturalCycles/datastore-lib/compare/v3.0.1...v3.1.0) (2019-11-04)
336
-
337
-
338
- ### Features
339
-
340
- * allow passing custom grpc object to constructor ([a9e08e3](https://github.com/NaturalCycles/datastore-lib/commit/a9e08e3f382bd0ce15ae11a6d1878072bf497acf)), closes [/github.com/googleapis/nodejs-pubsub/issues/770#issuecomment-541226361](https://github.com//github.com/googleapis/nodejs-pubsub/issues/770/issues/issuecomment-541226361)
341
-
342
- ## [3.0.1](https://github.com/NaturalCycles/datastore-lib/compare/v3.0.0...v3.0.1) (2019-11-04)
343
-
344
-
345
- ### Bug Fixes
346
-
347
- * provide empty getTable() implementation ([1b3658b](https://github.com/NaturalCycles/datastore-lib/commit/1b3658bcf45f8cf10e07b274dab7023cf499d579))
348
-
349
- # [3.0.0](https://github.com/NaturalCycles/datastore-lib/compare/v2.0.2...v3.0.0) (2019-11-02)
350
-
351
-
352
- ### Features
353
-
354
- * adapt to db-lib@3 ([aa78fd1](https://github.com/NaturalCycles/datastore-lib/commit/aa78fd1240e9de1fef8ce52e4ec0c7f16ecfc114))
355
-
356
-
357
- ### BREAKING CHANGES
358
-
359
- * ^^^
360
-
361
- ## [2.0.2](https://github.com/NaturalCycles/datastore-lib/compare/v2.0.1...v2.0.2) (2019-10-20)
362
-
363
-
364
- ### Bug Fixes
365
-
366
- * adapt to db-lib ([22949ca](https://github.com/NaturalCycles/datastore-lib/commit/22949ca))
367
-
368
- ## [2.0.1](https://github.com/NaturalCycles/datastore-lib/compare/v2.0.0...v2.0.1) (2019-10-19)
369
-
370
-
371
- ### Bug Fixes
372
-
373
- * use Readable ([0935cb0](https://github.com/NaturalCycles/datastore-lib/commit/0935cb0))
374
-
375
- # [2.0.0](https://github.com/NaturalCycles/datastore-lib/compare/v1.12.2...v2.0.0) (2019-10-19)
376
-
377
-
378
- ### Features
379
-
380
- * implement CommonDB 2.0 ([dfe0992](https://github.com/NaturalCycles/datastore-lib/commit/dfe0992))
381
-
382
-
383
- ### BREAKING CHANGES
384
-
385
- * ^^^
386
-
387
- ## [1.12.2](https://github.com/NaturalCycles/datastore-lib/compare/v1.12.1...v1.12.2) (2019-09-21)
388
-
389
-
390
- ### Bug Fixes
391
-
392
- * adapt db-lib ([c12a6df](https://github.com/NaturalCycles/datastore-lib/commit/c12a6df))
393
-
394
- ## [1.12.1](https://github.com/NaturalCycles/datastore-lib/compare/v1.12.0...v1.12.1) (2019-09-21)
395
-
396
-
397
- ### Bug Fixes
398
-
399
- * adapt db-lib ([7b316e1](https://github.com/NaturalCycles/datastore-lib/commit/7b316e1))
400
-
401
- # [1.12.0](https://github.com/NaturalCycles/datastore-lib/compare/v1.11.1...v1.12.0) (2019-09-19)
402
-
403
-
404
- ### Features
405
-
406
- * adapt to db-lib ([2b38927](https://github.com/NaturalCycles/datastore-lib/commit/2b38927))
407
-
408
- ## [1.11.1](https://github.com/NaturalCycles/datastore-lib/compare/v1.11.0...v1.11.1) (2019-09-19)
409
-
410
-
411
- ### Bug Fixes
412
-
413
- * make runQueryStream public ([f8f18ed](https://github.com/NaturalCycles/datastore-lib/commit/f8f18ed))
414
-
415
- # [1.11.0](https://github.com/NaturalCycles/datastore-lib/compare/v1.10.1...v1.11.0) (2019-09-19)
416
-
417
-
418
- ### Bug Fixes
419
-
420
- * return await ([ce1b4d4](https://github.com/NaturalCycles/datastore-lib/commit/ce1b4d4))
421
-
422
-
423
- ### Features
424
-
425
- * adopt to CommonDB RunQueryResult ([188c935](https://github.com/NaturalCycles/datastore-lib/commit/188c935))
426
- * move getStats to Dao ([2851c4f](https://github.com/NaturalCycles/datastore-lib/commit/2851c4f))
427
- * use db-lib ([f6826cd](https://github.com/NaturalCycles/datastore-lib/commit/f6826cd))
428
-
429
- ## [1.10.1](https://github.com/NaturalCycles/datastore-lib/compare/v1.10.0...v1.10.1) (2019-07-29)
430
-
431
-
432
- ### Bug Fixes
433
-
434
- * allow empty datastoreOptions (for GAE env) ([2ca8464](https://github.com/NaturalCycles/datastore-lib/commit/2ca8464))
435
-
436
- # [1.10.0](https://github.com/NaturalCycles/datastore-lib/compare/v1.9.2...v1.10.0) (2019-07-16)
437
-
438
-
439
- ### Features
440
-
441
- * deps ([fb42b87](https://github.com/NaturalCycles/datastore-lib/commit/fb42b87))
442
-
443
- ## [1.9.2](https://github.com/NaturalCycles/datastore-lib/compare/v1.9.1...v1.9.2) (2019-07-04)
444
-
445
-
446
- ### Bug Fixes
447
-
448
- * anonymize only DBM ([9897ea6](https://github.com/NaturalCycles/datastore-lib/commit/9897ea6))
449
-
450
- ## [1.9.1](https://github.com/NaturalCycles/datastore-lib/compare/v1.9.0...v1.9.1) (2019-07-03)
451
-
452
-
453
- ### Bug Fixes
454
-
455
- * anonymize signature ([4ed12bd](https://github.com/NaturalCycles/datastore-lib/commit/4ed12bd))
456
-
457
- # [1.9.0](https://github.com/NaturalCycles/datastore-lib/compare/v1.8.0...v1.9.0) (2019-07-03)
458
-
459
-
460
- ### Features
461
-
462
- * allow to anonymize all ModelTypes ([a87480e](https://github.com/NaturalCycles/datastore-lib/commit/a87480e))
463
-
464
- # [1.8.0](https://github.com/NaturalCycles/datastore-lib/compare/v1.7.0...v1.8.0) (2019-07-03)
465
-
466
-
467
- ### Features
468
-
469
- * dao anonymization hook ([3160ca0](https://github.com/NaturalCycles/datastore-lib/commit/3160ca0))
470
-
471
- # [1.7.0](https://github.com/NaturalCycles/datastore-lib/compare/v1.6.1...v1.7.0) (2019-06-25)
472
-
473
-
474
- ### Features
475
-
476
- * implements runQueryStream in MemoryService ([0ececa4](https://github.com/NaturalCycles/datastore-lib/commit/0ececa4))
477
-
478
- ## [1.6.1](https://github.com/NaturalCycles/datastore-lib/compare/v1.6.0...v1.6.1) (2019-06-20)
479
-
480
-
481
- ### Bug Fixes
482
-
483
- * allow null to be used in filters as negation ([93b971b](https://github.com/NaturalCycles/datastore-lib/commit/93b971b))
484
-
485
- # [1.6.0](https://github.com/NaturalCycles/datastore-lib/compare/v1.5.1...v1.6.0) (2019-06-17)
486
-
487
-
488
- ### Features
489
-
490
- * adds support for multiple filters ([dbfaa83](https://github.com/NaturalCycles/datastore-lib/commit/dbfaa83))
491
-
492
- ## [1.5.1](https://github.com/NaturalCycles/datastore-lib/compare/v1.5.0...v1.5.1) (2019-05-27)
493
-
494
-
495
- ### Bug Fixes
496
-
497
- * console.log ([4a29620](https://github.com/NaturalCycles/datastore-lib/commit/4a29620))
498
-
499
- # [1.5.0](https://github.com/NaturalCycles/datastore-lib/compare/v1.4.0...v1.5.0) (2019-05-27)
500
-
501
-
502
- ### Features
503
-
504
- * MemoryService to support streamQuery, select, limit ([9ac0610](https://github.com/NaturalCycles/datastore-lib/commit/9ac0610))
505
-
506
- # [1.4.0](https://github.com/NaturalCycles/datastore-lib/compare/v1.3.0...v1.4.0) (2019-05-19)
507
-
508
-
509
- ### Features
510
-
511
- * bump deps, adopt ([68ab3fd](https://github.com/NaturalCycles/datastore-lib/commit/68ab3fd))
512
-
513
- # [1.3.0](https://github.com/NaturalCycles/datastore-lib/compare/v1.2.1...v1.3.0) (2019-05-02)
514
-
515
-
516
- ### Features
517
-
518
- * update deps ([8ec7a82](https://github.com/NaturalCycles/datastore-lib/commit/8ec7a82))
519
-
520
- ## [1.2.1](https://github.com/NaturalCycles/datastore-lib/compare/v1.2.0...v1.2.1) (2019-04-25)
521
-
522
-
523
- ### Bug Fixes
524
-
525
- * remove redundant try/catch that had a bug with window.name ([1e3cf48](https://github.com/NaturalCycles/datastore-lib/commit/1e3cf48))
526
-
527
- # [1.2.0](https://github.com/NaturalCycles/datastore-lib/compare/v1.1.1...v1.2.0) (2019-04-22)
528
-
529
-
530
- ### Features
531
-
532
- * upgrade ([7e6ea9f](https://github.com/NaturalCycles/datastore-lib/commit/7e6ea9f))
533
-
534
- ## [1.1.1](https://github.com/NaturalCycles/datastore-lib/compare/v1.1.0...v1.1.1) (2019-03-23)
535
-
536
-
537
- ### Bug Fixes
538
-
539
- * export DBRelation ([bde321b](https://github.com/NaturalCycles/datastore-lib/commit/bde321b))
540
-
541
- # [1.1.0](https://github.com/NaturalCycles/datastore-lib/compare/v1.0.3...v1.1.0) (2019-03-23)
542
-
543
-
544
- ### Features
545
-
546
- * DBRelation ([23bd5ce](https://github.com/NaturalCycles/datastore-lib/commit/23bd5ce))
547
-
548
- ## [1.0.3](https://github.com/NaturalCycles/datastore-lib/compare/v1.0.2...v1.0.3) (2019-03-09)
549
-
550
-
551
- ### Bug Fixes
552
-
553
- * upgrade js-lib, nodejs-lib ([cc92227](https://github.com/NaturalCycles/datastore-lib/commit/cc92227))
554
-
555
- ## [1.0.2](https://github.com/NaturalCycles/datastore-lib/compare/v1.0.1...v1.0.2) (2019-03-08)
556
-
557
-
558
- ### Bug Fixes
559
-
560
- * types ([b0afeaa](https://github.com/NaturalCycles/datastore-lib/commit/b0afeaa))
561
-
562
- ## [1.0.1](https://github.com/NaturalCycles/datastore-lib/compare/v1.0.0...v1.0.1) (2019-03-08)
563
-
564
-
565
- ### Bug Fixes
566
-
567
- * export types and src ([d64878c](https://github.com/NaturalCycles/datastore-lib/commit/d64878c))
568
-
569
- # 1.0.0 (2019-03-08)
570
-
571
-
572
- ### Features
573
-
574
- * initial version ([0b61708](https://github.com/NaturalCycles/datastore-lib/commit/0b61708))