@midwayjs/tablestore 3.19.2 → 4.0.0-alpha.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.
- package/dist/configuration.js +2 -2
- package/dist/interface.d.ts +1 -0
- package/dist/interface.js +22 -22
- package/dist/manager.js +5 -6
- package/package.json +6 -6
package/dist/configuration.js
CHANGED
|
@@ -14,10 +14,10 @@ let TableStoreConfiguration = class TableStoreConfiguration {
|
|
|
14
14
|
await container.getAsync(manager_1.TableStoreServiceFactory);
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
|
-
TableStoreConfiguration =
|
|
17
|
+
exports.TableStoreConfiguration = TableStoreConfiguration;
|
|
18
|
+
exports.TableStoreConfiguration = TableStoreConfiguration = __decorate([
|
|
18
19
|
(0, core_1.Configuration)({
|
|
19
20
|
namespace: 'tableStore',
|
|
20
21
|
})
|
|
21
22
|
], TableStoreConfiguration);
|
|
22
|
-
exports.TableStoreConfiguration = TableStoreConfiguration;
|
|
23
23
|
//# sourceMappingURL=configuration.js.map
|
package/dist/interface.d.ts
CHANGED
package/dist/interface.js
CHANGED
|
@@ -10,52 +10,52 @@ var RowExistenceExpectation;
|
|
|
10
10
|
RowExistenceExpectation[RowExistenceExpectation["IGNORE"] = 0] = "IGNORE";
|
|
11
11
|
RowExistenceExpectation[RowExistenceExpectation["EXPECT_EXIST"] = 1] = "EXPECT_EXIST";
|
|
12
12
|
RowExistenceExpectation[RowExistenceExpectation["EXPECT_NOT_EXIST"] = 2] = "EXPECT_NOT_EXIST";
|
|
13
|
-
})(RowExistenceExpectation
|
|
13
|
+
})(RowExistenceExpectation || (exports.RowExistenceExpectation = RowExistenceExpectation = {}));
|
|
14
14
|
var Direction;
|
|
15
15
|
(function (Direction) {
|
|
16
16
|
Direction["FORWARD"] = "FORWARD";
|
|
17
17
|
Direction["BACKWARD"] = "BACKWARD";
|
|
18
|
-
})(Direction
|
|
18
|
+
})(Direction || (exports.Direction = Direction = {}));
|
|
19
19
|
var UpdateType;
|
|
20
20
|
(function (UpdateType) {
|
|
21
21
|
UpdateType["PUT"] = "PUT";
|
|
22
22
|
UpdateType["DELETE"] = "DELETE";
|
|
23
23
|
UpdateType["DELETE_ALL"] = "DELETE_ALL";
|
|
24
24
|
UpdateType["INCREMENT"] = "INCREMENT";
|
|
25
|
-
})(UpdateType
|
|
25
|
+
})(UpdateType || (exports.UpdateType = UpdateType = {}));
|
|
26
26
|
var ReturnType;
|
|
27
27
|
(function (ReturnType) {
|
|
28
28
|
ReturnType[ReturnType["NONE"] = 0] = "NONE";
|
|
29
29
|
ReturnType[ReturnType["Primarykey"] = 1] = "Primarykey";
|
|
30
30
|
ReturnType[ReturnType["AfterModify"] = 2] = "AfterModify";
|
|
31
|
-
})(ReturnType
|
|
31
|
+
})(ReturnType || (exports.ReturnType = ReturnType = {}));
|
|
32
32
|
var DefinedColumnType;
|
|
33
33
|
(function (DefinedColumnType) {
|
|
34
34
|
DefinedColumnType[DefinedColumnType["DCT_INTEGER"] = 1] = "DCT_INTEGER";
|
|
35
35
|
DefinedColumnType[DefinedColumnType["DCT_DOUBLE"] = 2] = "DCT_DOUBLE";
|
|
36
36
|
DefinedColumnType[DefinedColumnType["DCT_BOOLEAN"] = 3] = "DCT_BOOLEAN";
|
|
37
37
|
DefinedColumnType[DefinedColumnType["DCT_STRING"] = 4] = "DCT_STRING";
|
|
38
|
-
})(DefinedColumnType
|
|
38
|
+
})(DefinedColumnType || (exports.DefinedColumnType = DefinedColumnType = {}));
|
|
39
39
|
var PrimaryKeyType;
|
|
40
40
|
(function (PrimaryKeyType) {
|
|
41
41
|
PrimaryKeyType[PrimaryKeyType["INTEGER"] = 1] = "INTEGER";
|
|
42
42
|
PrimaryKeyType[PrimaryKeyType["STRING"] = 2] = "STRING";
|
|
43
43
|
PrimaryKeyType[PrimaryKeyType["BINARY"] = 3] = "BINARY";
|
|
44
|
-
})(PrimaryKeyType
|
|
44
|
+
})(PrimaryKeyType || (exports.PrimaryKeyType = PrimaryKeyType = {}));
|
|
45
45
|
var PrimaryKeyOption;
|
|
46
46
|
(function (PrimaryKeyOption) {
|
|
47
47
|
PrimaryKeyOption[PrimaryKeyOption["AUTO_INCREMENT"] = 1] = "AUTO_INCREMENT";
|
|
48
|
-
})(PrimaryKeyOption
|
|
48
|
+
})(PrimaryKeyOption || (exports.PrimaryKeyOption = PrimaryKeyOption = {}));
|
|
49
49
|
var IndexUpdateMode;
|
|
50
50
|
(function (IndexUpdateMode) {
|
|
51
51
|
IndexUpdateMode[IndexUpdateMode["IUM_ASYNC_INDEX"] = 0] = "IUM_ASYNC_INDEX";
|
|
52
52
|
IndexUpdateMode[IndexUpdateMode["IUM_SYNC_INDEX"] = 1] = "IUM_SYNC_INDEX";
|
|
53
|
-
})(IndexUpdateMode
|
|
53
|
+
})(IndexUpdateMode || (exports.IndexUpdateMode = IndexUpdateMode = {}));
|
|
54
54
|
var IndexType;
|
|
55
55
|
(function (IndexType) {
|
|
56
56
|
IndexType[IndexType["IT_GLOBAL_INDEX"] = 0] = "IT_GLOBAL_INDEX";
|
|
57
57
|
IndexType[IndexType["IT_LOCAL_INDEX"] = 1] = "IT_LOCAL_INDEX";
|
|
58
|
-
})(IndexType
|
|
58
|
+
})(IndexType || (exports.IndexType = IndexType = {}));
|
|
59
59
|
exports.INF_MIN = TableStore.INF_MIN;
|
|
60
60
|
exports.INF_MAX = TableStore.INF_MAX;
|
|
61
61
|
exports.PK_AUTO_INCR = TableStore.PK_AUTO_INCR;
|
|
@@ -81,7 +81,7 @@ var QueryType;
|
|
|
81
81
|
QueryType[QueryType["GEO_POLYGON_QUERY"] = 14] = "GEO_POLYGON_QUERY";
|
|
82
82
|
QueryType[QueryType["TERMS_QUERY"] = 15] = "TERMS_QUERY";
|
|
83
83
|
QueryType[QueryType["EXISTS_QUERY"] = 16] = "EXISTS_QUERY";
|
|
84
|
-
})(QueryType
|
|
84
|
+
})(QueryType || (exports.QueryType = QueryType = {}));
|
|
85
85
|
var ScoreMode;
|
|
86
86
|
(function (ScoreMode) {
|
|
87
87
|
ScoreMode[ScoreMode["SCORE_MODE_NONE"] = 1] = "SCORE_MODE_NONE";
|
|
@@ -89,18 +89,18 @@ var ScoreMode;
|
|
|
89
89
|
ScoreMode[ScoreMode["SCORE_MODE_MAX"] = 3] = "SCORE_MODE_MAX";
|
|
90
90
|
ScoreMode[ScoreMode["SCORE_MODE_TOTAL"] = 4] = "SCORE_MODE_TOTAL";
|
|
91
91
|
ScoreMode[ScoreMode["SCORE_MODE_MIN"] = 5] = "SCORE_MODE_MIN";
|
|
92
|
-
})(ScoreMode
|
|
92
|
+
})(ScoreMode || (exports.ScoreMode = ScoreMode = {}));
|
|
93
93
|
var SortOrder;
|
|
94
94
|
(function (SortOrder) {
|
|
95
95
|
SortOrder[SortOrder["SORT_ORDER_ASC"] = 0] = "SORT_ORDER_ASC";
|
|
96
96
|
SortOrder[SortOrder["SORT_ORDER_DESC"] = 1] = "SORT_ORDER_DESC";
|
|
97
|
-
})(SortOrder
|
|
97
|
+
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
98
98
|
var SortMode;
|
|
99
99
|
(function (SortMode) {
|
|
100
100
|
SortMode[SortMode["SORT_MODE_MIN"] = 0] = "SORT_MODE_MIN";
|
|
101
101
|
SortMode[SortMode["SORT_MODE_MAX"] = 1] = "SORT_MODE_MAX";
|
|
102
102
|
SortMode[SortMode["SORT_MODE_AVG"] = 2] = "SORT_MODE_AVG";
|
|
103
|
-
})(SortMode
|
|
103
|
+
})(SortMode || (exports.SortMode = SortMode = {}));
|
|
104
104
|
var FieldType;
|
|
105
105
|
(function (FieldType) {
|
|
106
106
|
FieldType[FieldType["LONG"] = 1] = "LONG";
|
|
@@ -110,47 +110,47 @@ var FieldType;
|
|
|
110
110
|
FieldType[FieldType["TEXT"] = 5] = "TEXT";
|
|
111
111
|
FieldType[FieldType["NESTED"] = 6] = "NESTED";
|
|
112
112
|
FieldType[FieldType["GEO_POINT"] = 7] = "GEO_POINT";
|
|
113
|
-
})(FieldType
|
|
113
|
+
})(FieldType || (exports.FieldType = FieldType = {}));
|
|
114
114
|
var ColumnReturnType;
|
|
115
115
|
(function (ColumnReturnType) {
|
|
116
116
|
ColumnReturnType[ColumnReturnType["RETURN_ALL"] = 1] = "RETURN_ALL";
|
|
117
117
|
ColumnReturnType[ColumnReturnType["RETURN_SPECIFIED"] = 2] = "RETURN_SPECIFIED";
|
|
118
118
|
ColumnReturnType[ColumnReturnType["RETURN_NONE"] = 3] = "RETURN_NONE";
|
|
119
|
-
})(ColumnReturnType
|
|
119
|
+
})(ColumnReturnType || (exports.ColumnReturnType = ColumnReturnType = {}));
|
|
120
120
|
var GeoDistanceType;
|
|
121
121
|
(function (GeoDistanceType) {
|
|
122
122
|
GeoDistanceType[GeoDistanceType["GEO_DISTANCE_ARC"] = 0] = "GEO_DISTANCE_ARC";
|
|
123
123
|
GeoDistanceType[GeoDistanceType["GEO_DISTANCE_PLANE"] = 1] = "GEO_DISTANCE_PLANE";
|
|
124
|
-
})(GeoDistanceType
|
|
124
|
+
})(GeoDistanceType || (exports.GeoDistanceType = GeoDistanceType = {}));
|
|
125
125
|
var IndexOptions;
|
|
126
126
|
(function (IndexOptions) {
|
|
127
127
|
IndexOptions[IndexOptions["DOCS"] = 1] = "DOCS";
|
|
128
128
|
IndexOptions[IndexOptions["FREQS"] = 2] = "FREQS";
|
|
129
129
|
IndexOptions[IndexOptions["POSITIONS"] = 3] = "POSITIONS";
|
|
130
130
|
IndexOptions[IndexOptions["OFFSETS"] = 4] = "OFFSETS";
|
|
131
|
-
})(IndexOptions
|
|
131
|
+
})(IndexOptions || (exports.IndexOptions = IndexOptions = {}));
|
|
132
132
|
var QueryOperator;
|
|
133
133
|
(function (QueryOperator) {
|
|
134
134
|
QueryOperator[QueryOperator["OR"] = 1] = "OR";
|
|
135
135
|
QueryOperator[QueryOperator["AND"] = 2] = "AND";
|
|
136
|
-
})(QueryOperator
|
|
136
|
+
})(QueryOperator || (exports.QueryOperator = QueryOperator = {}));
|
|
137
137
|
var FilterType;
|
|
138
138
|
(function (FilterType) {
|
|
139
139
|
FilterType[FilterType["FT_SINGLE_COLUMN_VALUE"] = 1] = "FT_SINGLE_COLUMN_VALUE";
|
|
140
140
|
FilterType[FilterType["FT_COMPOSITE_COLUMN_VALUE"] = 2] = "FT_COMPOSITE_COLUMN_VALUE";
|
|
141
141
|
FilterType[FilterType["FT_COLUMN_PAGINATION"] = 3] = "FT_COLUMN_PAGINATION";
|
|
142
|
-
})(FilterType
|
|
142
|
+
})(FilterType || (exports.FilterType = FilterType = {}));
|
|
143
143
|
var LogicalOperator;
|
|
144
144
|
(function (LogicalOperator) {
|
|
145
145
|
LogicalOperator[LogicalOperator["NOT"] = 1] = "NOT";
|
|
146
146
|
LogicalOperator[LogicalOperator["AND"] = 2] = "AND";
|
|
147
147
|
LogicalOperator[LogicalOperator["OR"] = 3] = "OR";
|
|
148
|
-
})(LogicalOperator
|
|
148
|
+
})(LogicalOperator || (exports.LogicalOperator = LogicalOperator = {}));
|
|
149
149
|
var ColumnConditionType;
|
|
150
150
|
(function (ColumnConditionType) {
|
|
151
151
|
ColumnConditionType[ColumnConditionType["COMPOSITE_COLUMN_CONDITION"] = 0] = "COMPOSITE_COLUMN_CONDITION";
|
|
152
152
|
ColumnConditionType[ColumnConditionType["SINGLE_COLUMN_CONDITION"] = 1] = "SINGLE_COLUMN_CONDITION";
|
|
153
|
-
})(ColumnConditionType
|
|
153
|
+
})(ColumnConditionType || (exports.ColumnConditionType = ColumnConditionType = {}));
|
|
154
154
|
var ComparatorType;
|
|
155
155
|
(function (ComparatorType) {
|
|
156
156
|
ComparatorType[ComparatorType["EQUAL"] = 1] = "EQUAL";
|
|
@@ -159,5 +159,5 @@ var ComparatorType;
|
|
|
159
159
|
ComparatorType[ComparatorType["GREATER_EQUAL"] = 4] = "GREATER_EQUAL";
|
|
160
160
|
ComparatorType[ComparatorType["LESS_THAN"] = 5] = "LESS_THAN";
|
|
161
161
|
ComparatorType[ComparatorType["LESS_EQUAL"] = 6] = "LESS_EQUAL";
|
|
162
|
-
})(ComparatorType
|
|
162
|
+
})(ComparatorType || (exports.ComparatorType = ComparatorType = {}));
|
|
163
163
|
//# sourceMappingURL=interface.js.map
|
package/dist/manager.js
CHANGED
|
@@ -23,6 +23,7 @@ let TableStoreServiceFactory = class TableStoreServiceFactory extends core_1.Ser
|
|
|
23
23
|
return 'tableStore';
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
+
exports.TableStoreServiceFactory = TableStoreServiceFactory;
|
|
26
27
|
__decorate([
|
|
27
28
|
(0, core_1.Config)('tableStore'),
|
|
28
29
|
__metadata("design:type", Object)
|
|
@@ -33,20 +34,19 @@ __decorate([
|
|
|
33
34
|
__metadata("design:paramtypes", []),
|
|
34
35
|
__metadata("design:returntype", Promise)
|
|
35
36
|
], TableStoreServiceFactory.prototype, "init", null);
|
|
36
|
-
TableStoreServiceFactory = __decorate([
|
|
37
|
+
exports.TableStoreServiceFactory = TableStoreServiceFactory = __decorate([
|
|
37
38
|
(0, core_1.Provide)(),
|
|
38
39
|
(0, core_1.Scope)(core_1.ScopeEnum.Singleton)
|
|
39
40
|
], TableStoreServiceFactory);
|
|
40
|
-
exports.TableStoreServiceFactory = TableStoreServiceFactory;
|
|
41
41
|
let TableStoreService = class TableStoreService {
|
|
42
42
|
async init() {
|
|
43
|
-
|
|
44
|
-
this.instance = this.serviceFactory.get(((_b = (_a = this.serviceFactory).getDefaultClientName) === null || _b === void 0 ? void 0 : _b.call(_a)) || 'default');
|
|
43
|
+
this.instance = this.serviceFactory.get(this.serviceFactory.getDefaultClientName?.() || 'default');
|
|
45
44
|
if (!this.instance) {
|
|
46
45
|
throw new core_1.MidwayCommonError('TableStore default instance not found.');
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
48
|
};
|
|
49
|
+
exports.TableStoreService = TableStoreService;
|
|
50
50
|
__decorate([
|
|
51
51
|
(0, core_1.Inject)(),
|
|
52
52
|
__metadata("design:type", TableStoreServiceFactory)
|
|
@@ -57,10 +57,9 @@ __decorate([
|
|
|
57
57
|
__metadata("design:paramtypes", []),
|
|
58
58
|
__metadata("design:returntype", Promise)
|
|
59
59
|
], TableStoreService.prototype, "init", null);
|
|
60
|
-
TableStoreService = __decorate([
|
|
60
|
+
exports.TableStoreService = TableStoreService = __decorate([
|
|
61
61
|
(0, core_1.Provide)(),
|
|
62
62
|
(0, core_1.Scope)(core_1.ScopeEnum.Singleton)
|
|
63
63
|
], TableStoreService);
|
|
64
|
-
exports.TableStoreService = TableStoreService;
|
|
65
64
|
(0, core_1.delegateTargetPrototypeMethod)(TableStoreService, [TableStore.Client]);
|
|
66
65
|
//# sourceMappingURL=manager.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/tablestore",
|
|
3
3
|
"description": "midway tablestore component",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.0-alpha.1",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"index.d.ts"
|
|
11
11
|
],
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@midwayjs/core": "^
|
|
14
|
-
"@midwayjs/mock": "^
|
|
13
|
+
"@midwayjs/core": "^4.0.0-alpha.1",
|
|
14
|
+
"@midwayjs/mock": "^4.0.0-alpha.1"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"int64-buffer": "1.0.1",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "tsc",
|
|
28
|
-
"test": "node
|
|
29
|
-
"cov": "node
|
|
28
|
+
"test": "node -r ts-node/register ../../node_modules/jest/bin/jest.js --runInBand",
|
|
29
|
+
"cov": "node -r ts-node/register ../../node_modules/jest/bin/jest.js --runInBand --coverage --forceExit",
|
|
30
30
|
"ci": "npm run test",
|
|
31
31
|
"lint": "mwts check"
|
|
32
32
|
},
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"type": "git",
|
|
38
38
|
"url": "https://github.com/midwayjs/midway.git"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "14bb4da91805a1cf52f190c0d37a74b395dd6372"
|
|
41
41
|
}
|