@midwayjs/tablestore 2.13.1 → 2.14.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/CHANGELOG.md ADDED
@@ -0,0 +1,30 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # [2.14.0](https://github.com/midwayjs/midway/compare/v2.13.5...v2.14.0) (2021-12-06)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * express routing middleware takes effect at the controller level ([#1364](https://github.com/midwayjs/midway/issues/1364)) ([5d5f299](https://github.com/midwayjs/midway/commit/5d5f2992be116ca71b21f01fd782e3a2ac072496))
12
+
13
+
14
+
15
+
16
+
17
+ ## [2.13.4](https://github.com/midwayjs/midway/compare/v2.13.3...v2.13.4) (2021-10-21)
18
+
19
+ **Note:** Version bump only for package @midwayjs/tablestore
20
+
21
+
22
+
23
+
24
+
25
+ ## [2.13.3](https://github.com/midwayjs/midway/compare/v2.13.2...v2.13.3) (2021-09-28)
26
+
27
+
28
+ ### Features
29
+
30
+ * add tablestore component and typescript definition ([#1302](https://github.com/midwayjs/midway/issues/1302)) ([094b027](https://github.com/midwayjs/midway/commit/094b0277ff0fed969d438e85b62cf99e06b024c3))
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2013 - Now midwayjs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  this is a sub package for midway.
7
7
 
8
- Document: [https://midwayjs.org/midway](https://midwayjs.org/midway)
8
+ Document: [https://midwayjs.org](https://midwayjs.org)
9
9
 
10
10
  ## License
11
11
 
@@ -1,4 +1,4 @@
1
- export declare class OTSConfiguration {
1
+ export declare class TableStoreConfiguration {
2
2
  onReady(container: any): Promise<void>;
3
3
  }
4
4
  //# sourceMappingURL=configuration.d.ts.map
@@ -6,20 +6,20 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.OTSConfiguration = void 0;
9
+ exports.TableStoreConfiguration = void 0;
10
10
  const decorator_1 = require("@midwayjs/decorator");
11
11
  const path_1 = require("path");
12
12
  const manager_1 = require("./manager");
13
- let OTSConfiguration = class OTSConfiguration {
13
+ let TableStoreConfiguration = class TableStoreConfiguration {
14
14
  async onReady(container) {
15
15
  await container.getAsync(manager_1.TableStoreServiceFactory);
16
16
  }
17
17
  };
18
- OTSConfiguration = __decorate([
18
+ TableStoreConfiguration = __decorate([
19
19
  (0, decorator_1.Configuration)({
20
- namespace: 'ots',
20
+ namespace: 'tableStore',
21
21
  importConfigs: [(0, path_1.join)(__dirname, './config.default')],
22
22
  })
23
- ], OTSConfiguration);
24
- exports.OTSConfiguration = OTSConfiguration;
23
+ ], TableStoreConfiguration);
24
+ exports.TableStoreConfiguration = TableStoreConfiguration;
25
25
  //# sourceMappingURL=configuration.js.map
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { OTSConfiguration as Configuration } from './configuration';
1
+ export { TableStoreConfiguration as Configuration } from './configuration';
2
2
  export * from './manager';
3
3
  export * from './proxy';
4
4
  export * from './util';
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.Configuration = void 0;
14
14
  var configuration_1 = require("./configuration");
15
- Object.defineProperty(exports, "Configuration", { enumerable: true, get: function () { return configuration_1.OTSConfiguration; } });
15
+ Object.defineProperty(exports, "Configuration", { enumerable: true, get: function () { return configuration_1.TableStoreConfiguration; } });
16
16
  __exportStar(require("./manager"), exports);
17
17
  __exportStar(require("./proxy"), exports);
18
18
  __exportStar(require("./util"), exports);
@@ -13,9 +13,9 @@ export declare type PrimaryKey = {
13
13
  * metadata
14
14
  */
15
15
  export declare enum RowExistenceExpectation {
16
- IGNORE = "IGNORE",
17
- EXPECT_EXIST = "EXPECT_EXIST",
18
- EXPECT_NOT_EXIST = "EXPECT_NOT_EXIST"
16
+ IGNORE = 0,
17
+ EXPECT_EXIST = 1,
18
+ EXPECT_NOT_EXIST = 2
19
19
  }
20
20
  export declare enum Direction {
21
21
  FORWARD = "FORWARD",
@@ -207,7 +207,11 @@ export declare type AttributeColumn = {
207
207
  [key: string]: ColumnValue;
208
208
  timestamp?: number;
209
209
  };
210
- export declare type UpdateColumn = {};
210
+ export declare type UpdateColumn = {
211
+ [key in UpdateType.DELETE_ALL]?: string[];
212
+ } & {
213
+ [key in Exclude<UpdateType, UpdateType.DELETE_ALL>]?: AttributeColumn[];
214
+ };
211
215
  export interface PutRowParams {
212
216
  tableName: string;
213
217
  primaryKey: PrimaryKey[];
@@ -278,7 +282,7 @@ export declare type BatchWriteRowItem = ({
278
282
  attributeColumns?: AttributeColumn[];
279
283
  } | {
280
284
  type: 'UPDATE';
281
- attributeColumns: UpdateColumn[];
285
+ updateOfAttributeColumns: UpdateColumn[];
282
286
  }) & {
283
287
  primaryKey: PrimaryKey[];
284
288
  condition?: TableStoreCondition | null;
@@ -323,7 +327,7 @@ export interface SearchIndexSetting {
323
327
  routingPartitionSize?: number | null;
324
328
  }
325
329
  export declare type SearchIndexQuery = {
326
- type?: QueryType.MATCH_QUERY;
330
+ queryType?: QueryType.MATCH_QUERY;
327
331
  query?: {
328
332
  fieldName: string;
329
333
  text?: string;
@@ -331,19 +335,19 @@ export declare type SearchIndexQuery = {
331
335
  operator?: QueryOperator;
332
336
  };
333
337
  } | {
334
- type?: QueryType.MATCH_PHRASE_QUERY;
338
+ queryType?: QueryType.MATCH_PHRASE_QUERY;
335
339
  query?: {
336
340
  fieldName: string;
337
341
  text?: string;
338
342
  };
339
343
  } | {
340
- type?: QueryType.TERM_QUERY;
344
+ queryType?: QueryType.TERM_QUERY;
341
345
  query?: {
342
346
  fieldName: string;
343
347
  term: ColumnValue;
344
348
  };
345
349
  } | {
346
- type?: QueryType.RANGE_QUERY;
350
+ queryType?: QueryType.RANGE_QUERY;
347
351
  query?: {
348
352
  fieldName: string;
349
353
  rangeFrom?: ColumnValue;
@@ -352,13 +356,13 @@ export declare type SearchIndexQuery = {
352
356
  includeUpper?: boolean;
353
357
  };
354
358
  } | {
355
- type?: QueryType.PREFIX_QUERY;
359
+ queryType?: QueryType.PREFIX_QUERY;
356
360
  query?: {
357
361
  fieldName: string;
358
362
  prefix?: string;
359
363
  };
360
364
  } | {
361
- type?: QueryType.BOOL_QUERY;
365
+ queryType?: QueryType.BOOL_QUERY;
362
366
  query?: {
363
367
  mustQueries?: SearchIndexQuery[];
364
368
  mustNotQueries?: SearchIndexQuery[];
@@ -367,12 +371,12 @@ export declare type SearchIndexQuery = {
367
371
  minimumShouldMatch?: number;
368
372
  };
369
373
  } | {
370
- type?: QueryType.CONST_SCORE_QUERY;
374
+ queryType?: QueryType.CONST_SCORE_QUERY;
371
375
  query?: {
372
376
  filter: SearchIndexQuery;
373
377
  };
374
378
  } | {
375
- type?: QueryType.FUNCTION_SCORE_QUERY;
379
+ queryType?: QueryType.FUNCTION_SCORE_QUERY;
376
380
  query?: {
377
381
  query: SearchIndexQuery;
378
382
  fieldValueFactor: {
@@ -391,42 +395,42 @@ export declare type SearchIndexQuery = {
391
395
  scoreMode?: ScoreMode;
392
396
  };
393
397
  } | {
394
- type?: QueryType.WILDCARD_QUERY;
398
+ queryType?: QueryType.WILDCARD_QUERY;
395
399
  query?: {
396
400
  fieldName: string;
397
401
  value?: string;
398
402
  };
399
403
  } | {
400
- type?: QueryType.MATCH_ALL_QUERY;
404
+ queryType?: QueryType.MATCH_ALL_QUERY;
401
405
  query?: {};
402
406
  } | {
403
- type?: QueryType.GEO_BOUNDING_BOX_QUERY;
407
+ queryType?: QueryType.GEO_BOUNDING_BOX_QUERY;
404
408
  query?: {
405
409
  fieldName: string;
406
410
  topLeft?: string;
407
411
  bottomRight?: string;
408
412
  };
409
413
  } | {
410
- type?: QueryType.GEO_DISTANCE_QUERY;
414
+ queryType?: QueryType.GEO_DISTANCE_QUERY;
411
415
  query?: {
412
416
  fieldName: string;
413
417
  centerPoint?: string;
414
418
  distance?: number;
415
419
  };
416
420
  } | {
417
- type?: QueryType.GEO_POLYGON_QUERY;
421
+ queryType?: QueryType.GEO_POLYGON_QUERY;
418
422
  query?: {
419
423
  fieldName: string;
420
424
  points?: string[];
421
425
  };
422
426
  } | {
423
- type?: QueryType.TERMS_QUERY;
427
+ queryType?: QueryType.TERMS_QUERY;
424
428
  query?: {
425
429
  fieldName: string;
426
430
  terms?: ColumnValue[];
427
431
  };
428
432
  } | {
429
- type?: QueryType.EXISTS_QUERY;
433
+ queryType?: QueryType.EXISTS_QUERY;
430
434
  query?: {
431
435
  fieldName: string;
432
436
  };
package/dist/interface.js CHANGED
@@ -6,9 +6,9 @@ exports.ComparatorType = exports.ColumnConditionType = exports.LogicalOperator =
6
6
  */
7
7
  var RowExistenceExpectation;
8
8
  (function (RowExistenceExpectation) {
9
- RowExistenceExpectation["IGNORE"] = "IGNORE";
10
- RowExistenceExpectation["EXPECT_EXIST"] = "EXPECT_EXIST";
11
- RowExistenceExpectation["EXPECT_NOT_EXIST"] = "EXPECT_NOT_EXIST";
9
+ RowExistenceExpectation[RowExistenceExpectation["IGNORE"] = 0] = "IGNORE";
10
+ RowExistenceExpectation[RowExistenceExpectation["EXPECT_EXIST"] = 1] = "EXPECT_EXIST";
11
+ RowExistenceExpectation[RowExistenceExpectation["EXPECT_NOT_EXIST"] = 2] = "EXPECT_NOT_EXIST";
12
12
  })(RowExistenceExpectation = exports.RowExistenceExpectation || (exports.RowExistenceExpectation = {}));
13
13
  var Direction;
14
14
  (function (Direction) {
package/dist/manager.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { ServiceFactory } from '@midwayjs/core';
2
2
  import { TableStoreClient } from './interface';
3
- export declare class TableStoreServiceFactory<T = TableStoreClient> extends ServiceFactory<T> {
3
+ export declare class TableStoreServiceFactory extends ServiceFactory<TableStoreClient> {
4
4
  tableStoreConfig: any;
5
5
  init(): Promise<void>;
6
- createClient(config: any): Promise<T>;
6
+ createClient(config: any): Promise<TableStoreClient>;
7
7
  getName(): string;
8
8
  }
9
9
  export declare class TableStoreService implements TableStoreClient {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@midwayjs/tablestore",
3
3
  "description": "midway tablestore component",
4
- "version": "2.13.1",
4
+ "version": "2.14.0",
5
5
  "main": "dist/index",
6
6
  "typings": "dist/index.d.ts",
7
7
  "files": [
@@ -9,9 +9,9 @@
9
9
  "dist/**/*.d.ts"
10
10
  ],
11
11
  "devDependencies": {
12
- "@midwayjs/core": "^2.13.2",
13
- "@midwayjs/decorator": "^2.13.2",
14
- "@midwayjs/mock": "^2.13.2"
12
+ "@midwayjs/core": "^2.14.0",
13
+ "@midwayjs/decorator": "^2.14.0",
14
+ "@midwayjs/mock": "^2.14.0"
15
15
  },
16
16
  "dependencies": {
17
17
  "tablestore": "^5.0.6"
@@ -32,5 +32,6 @@
32
32
  "repository": {
33
33
  "type": "git",
34
34
  "url": "https://github.com/midwayjs/midway.git"
35
- }
35
+ },
36
+ "gitHead": "5fd716b0e731162d8e9f0931790fde7402fb83de"
36
37
  }