remult 0.22.7-exp.0 → 0.22.7
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/SseSubscriptionServer.d.ts +25 -25
- package/SseSubscriptionServer.js +145 -145
- package/ably.d.ts +13 -13
- package/ably.js +59 -59
- package/assign.d.ts +1 -1
- package/assign.js +9 -9
- package/classType.d.ts +3 -3
- package/classType.js +2 -2
- package/esm/SseSubscriptionServer.d.ts +25 -25
- package/esm/SseSubscriptionServer.js +107 -104
- package/esm/ably.d.ts +13 -13
- package/esm/ably.js +30 -28
- package/esm/assign.d.ts +1 -1
- package/esm/assign.js +5 -5
- package/esm/classType.d.ts +3 -3
- package/esm/classType.js +1 -1
- package/esm/graphql.d.ts +14 -14
- package/esm/graphql.js +785 -785
- package/esm/index.d.ts +31 -31
- package/esm/index.js +25 -25
- package/esm/inputTypes.d.ts +9 -9
- package/esm/inputTypes.js +9 -9
- package/esm/live-query/data-provider-live-query-storage.d.ts +23 -23
- package/esm/live-query/data-provider-live-query-storage.js +91 -93
- package/esm/myLog.d.ts +1 -1
- package/esm/myLog.js +5 -5
- package/esm/postgres/index.d.ts +2 -2
- package/esm/postgres/index.js +2 -2
- package/esm/postgres/postgres-data-provider.d.ts +36 -36
- package/esm/postgres/postgres-data-provider.js +126 -122
- package/esm/postgres/schema-builder.d.ts +19 -19
- package/esm/postgres/schema-builder.js +197 -196
- package/esm/remult-express.d.ts +9 -9
- package/esm/remult-express.js +26 -25
- package/esm/remult-fastify.d.ts +6 -6
- package/esm/remult-fastify.js +68 -68
- package/esm/remult-fresh.d.ts +17 -17
- package/esm/remult-fresh.js +26 -26
- package/esm/remult-knex/index.d.ts +30 -30
- package/esm/remult-knex/index.js +466 -460
- package/esm/remult-mongo.d.ts +24 -24
- package/esm/remult-mongo.js +269 -262
- package/esm/remult-next.d.ts +25 -25
- package/esm/remult-next.js +114 -114
- package/esm/remult-sveltekit.d.ts +4 -4
- package/esm/remult-sveltekit.js +71 -71
- package/esm/server/JsonEntityFileStorage.d.ts +11 -11
- package/esm/server/JsonEntityFileStorage.js +27 -26
- package/esm/server/core.d.ts +4 -4
- package/esm/server/core.js +4 -4
- package/esm/server/expressBridge.d.ts +128 -128
- package/esm/server/expressBridge.js +988 -971
- package/esm/server/index.d.ts +6 -6
- package/esm/server/index.js +12 -12
- package/esm/server/initAsyncHooks.d.ts +1 -1
- package/esm/server/initAsyncHooks.js +9 -9
- package/esm/server/initDataProvider.d.ts +2 -2
- package/esm/server/initDataProvider.js +14 -14
- package/esm/src/CompoundIdField.d.ts +27 -27
- package/esm/src/CompoundIdField.js +54 -41
- package/esm/src/__EntityValueProvider.d.ts +11 -11
- package/esm/src/__EntityValueProvider.js +1 -1
- package/esm/src/__RowsOfDataForTesting.d.ts +3 -3
- package/esm/src/__RowsOfDataForTesting.js +1 -1
- package/esm/src/buildRestDataProvider.d.ts +31 -31
- package/esm/src/buildRestDataProvider.js +121 -120
- package/esm/src/column-interfaces.d.ts +160 -160
- package/esm/src/column-interfaces.js +7 -7
- package/esm/src/column.d.ts +31 -31
- package/esm/src/column.js +108 -101
- package/esm/src/context.d.ts +134 -134
- package/esm/src/context.js +287 -282
- package/esm/src/data-api.d.ts +38 -38
- package/esm/src/data-api.js +281 -279
- package/esm/src/data-interfaces.d.ts +41 -41
- package/esm/src/data-interfaces.js +12 -12
- package/esm/src/data-providers/array-entity-data-provider.d.ts +22 -22
- package/esm/src/data-providers/array-entity-data-provider.js +252 -249
- package/esm/src/data-providers/in-memory-database.d.ts +9 -9
- package/esm/src/data-providers/in-memory-database.js +16 -18
- package/esm/src/data-providers/json-data-provider.d.ts +12 -12
- package/esm/src/data-providers/json-data-provider.js +55 -52
- package/esm/src/data-providers/rest-data-provider.d.ts +39 -39
- package/esm/src/data-providers/rest-data-provider.js +272 -267
- package/esm/src/data-providers/sql-database.d.ts +33 -33
- package/esm/src/data-providers/sql-database.js +401 -394
- package/esm/src/data-providers/web-sql-data-provider.d.ts +21 -21
- package/esm/src/data-providers/web-sql-data-provider.js +145 -137
- package/esm/src/entity.d.ts +95 -95
- package/esm/src/entity.js +1 -1
- package/esm/src/filter/filter-consumer-bridge-to-sql-request.d.ts +50 -50
- package/esm/src/filter/filter-consumer-bridge-to-sql-request.js +165 -162
- package/esm/src/filter/filter-interfaces.d.ts +86 -86
- package/esm/src/filter/filter-interfaces.js +524 -515
- package/esm/src/live-query/LiveQueryClient.d.ts +1 -1
- package/esm/src/live-query/LiveQueryClient.js +196 -192
- package/esm/src/live-query/SseSubscriptionClient.d.ts +5 -5
- package/esm/src/live-query/SseSubscriptionClient.js +86 -86
- package/esm/src/live-query/SubscriptionChannel.d.ts +41 -41
- package/esm/src/live-query/SubscriptionChannel.js +126 -121
- package/esm/src/live-query/SubscriptionServer.d.ts +38 -38
- package/esm/src/live-query/SubscriptionServer.js +114 -112
- package/esm/src/remult-proxy.d.ts +2 -2
- package/esm/src/remult-proxy.js +177 -178
- package/esm/src/remult3/DecoratorReplacer.d.ts +10 -10
- package/esm/src/remult3/DecoratorReplacer.js +20 -20
- package/esm/src/remult3/RepositoryImplementation.d.ts +332 -332
- package/esm/src/remult3/RepositoryImplementation.js +2122 -2051
- package/esm/src/remult3/__updateEntityBasedOnWhere.d.ts +2 -2
- package/esm/src/remult3/__updateEntityBasedOnWhere.js +24 -24
- package/esm/src/remult3/entity.d.ts +28 -28
- package/esm/src/remult3/entity.js +70 -70
- package/esm/src/remult3/getEntityRef.d.ts +9 -9
- package/esm/src/remult3/getEntityRef.js +27 -27
- package/esm/src/remult3/remult3.d.ts +397 -397
- package/esm/src/remult3/remult3.js +1 -1
- package/esm/src/resultCompoundIdFilter.d.ts +3 -3
- package/esm/src/resultCompoundIdFilter.js +16 -16
- package/esm/src/server-action-info.d.ts +10 -10
- package/esm/src/server-action-info.js +12 -12
- package/esm/src/server-action.d.ts +79 -79
- package/esm/src/server-action.js +397 -387
- package/esm/src/sort.d.ts +16 -16
- package/esm/src/sort.js +105 -104
- package/esm/src/sql-command.d.ts +19 -19
- package/esm/src/sql-command.js +1 -1
- package/esm/src/validators.d.ts +14 -14
- package/esm/src/validators.js +36 -36
- package/esm/src/valueConverters.d.ts +13 -13
- package/esm/src/valueConverters.js +210 -210
- package/esm/urlBuilder.d.ts +6 -6
- package/esm/urlBuilder.js +20 -19
- package/graphql.d.ts +14 -14
- package/graphql.js +953 -953
- package/index.d.ts +31 -31
- package/index.js +67 -67
- package/inputTypes.d.ts +9 -9
- package/inputTypes.js +16 -16
- package/live-query/data-provider-live-query-storage.d.ts +23 -23
- package/live-query/data-provider-live-query-storage.js +263 -263
- package/myLog.d.ts +1 -1
- package/myLog.js +20 -20
- package/package.json +1 -1
- package/postgres/index.d.ts +2 -2
- package/postgres/index.js +5 -5
- package/postgres/postgres-data-provider.d.ts +36 -36
- package/postgres/postgres-data-provider.js +191 -191
- package/postgres/schema-builder.d.ts +19 -19
- package/postgres/schema-builder.js +369 -369
- package/remult-express.d.ts +9 -9
- package/remult-express.js +34 -33
- package/remult-fastify.d.ts +6 -6
- package/remult-fastify.js +79 -79
- package/remult-fresh.d.ts +17 -17
- package/remult-fresh.js +41 -41
- package/remult-knex/index.d.ts +30 -30
- package/remult-knex/index.js +917 -915
- package/remult-mongo.d.ts +24 -24
- package/remult-mongo.js +515 -515
- package/remult-next.d.ts +25 -25
- package/remult-next.js +171 -171
- package/remult-sveltekit.d.ts +4 -4
- package/remult-sveltekit.js +110 -110
- package/server/JsonEntityFileStorage.d.ts +11 -11
- package/server/JsonEntityFileStorage.js +35 -35
- package/server/core.d.ts +4 -4
- package/server/core.js +12 -12
- package/server/expressBridge.d.ts +128 -128
- package/server/expressBridge.js +1401 -1402
- package/server/index.d.ts +6 -6
- package/server/index.js +24 -24
- package/server/initAsyncHooks.d.ts +1 -1
- package/server/initAsyncHooks.js +13 -13
- package/server/initDataProvider.d.ts +2 -2
- package/server/initDataProvider.js +26 -26
- package/src/CompoundIdField.d.ts +27 -27
- package/src/CompoundIdField.js +54 -54
- package/src/__EntityValueProvider.d.ts +11 -11
- package/src/__EntityValueProvider.js +2 -2
- package/src/__RowsOfDataForTesting.d.ts +3 -3
- package/src/__RowsOfDataForTesting.js +2 -2
- package/src/buildRestDataProvider.d.ts +31 -31
- package/src/buildRestDataProvider.js +177 -174
- package/src/column-interfaces.d.ts +160 -160
- package/src/column-interfaces.js +11 -11
- package/src/column.d.ts +31 -31
- package/src/column.js +132 -132
- package/src/context.d.ts +134 -134
- package/src/context.js +451 -451
- package/src/data-api.d.ts +38 -38
- package/src/data-api.js +524 -524
- package/src/data-interfaces.d.ts +41 -41
- package/src/data-interfaces.js +16 -16
- package/src/data-providers/array-entity-data-provider.d.ts +22 -22
- package/src/data-providers/array-entity-data-provider.js +364 -364
- package/src/data-providers/in-memory-database.d.ts +9 -9
- package/src/data-providers/in-memory-database.js +33 -33
- package/src/data-providers/json-data-provider.d.ts +12 -12
- package/src/data-providers/json-data-provider.js +106 -106
- package/src/data-providers/rest-data-provider.d.ts +39 -39
- package/src/data-providers/rest-data-provider.js +388 -388
- package/src/data-providers/sql-database.d.ts +33 -33
- package/src/data-providers/sql-database.js +653 -653
- package/src/data-providers/web-sql-data-provider.d.ts +21 -21
- package/src/data-providers/web-sql-data-provider.js +229 -229
- package/src/entity.d.ts +95 -95
- package/src/entity.js +2 -2
- package/src/filter/filter-consumer-bridge-to-sql-request.d.ts +50 -50
- package/src/filter/filter-consumer-bridge-to-sql-request.js +307 -307
- package/src/filter/filter-interfaces.d.ts +86 -86
- package/src/filter/filter-interfaces.js +693 -685
- package/src/live-query/LiveQueryClient.d.ts +1 -1
- package/src/live-query/LiveQueryClient.js +293 -293
- package/src/live-query/SseSubscriptionClient.d.ts +5 -5
- package/src/live-query/SseSubscriptionClient.js +154 -154
- package/src/live-query/SubscriptionChannel.d.ts +41 -41
- package/src/live-query/SubscriptionChannel.js +189 -189
- package/src/live-query/SubscriptionServer.d.ts +38 -38
- package/src/live-query/SubscriptionServer.js +264 -264
- package/src/remult-proxy.d.ts +2 -2
- package/src/remult-proxy.js +307 -307
- package/src/remult3/DecoratorReplacer.d.ts +10 -10
- package/src/remult3/DecoratorReplacer.js +24 -24
- package/src/remult3/RepositoryImplementation.d.ts +332 -332
- package/src/remult3/RepositoryImplementation.js +3391 -3373
- package/src/remult3/__updateEntityBasedOnWhere.d.ts +2 -2
- package/src/remult3/__updateEntityBasedOnWhere.js +28 -28
- package/src/remult3/entity.d.ts +28 -28
- package/src/remult3/entity.js +88 -88
- package/src/remult3/getEntityRef.d.ts +9 -9
- package/src/remult3/getEntityRef.js +35 -35
- package/src/remult3/remult3.d.ts +397 -397
- package/src/remult3/remult3.js +2 -2
- package/src/resultCompoundIdFilter.d.ts +3 -3
- package/src/resultCompoundIdFilter.js +20 -20
- package/src/server-action-info.d.ts +10 -10
- package/src/server-action-info.js +15 -15
- package/src/server-action.d.ts +79 -79
- package/src/server-action.js +632 -632
- package/src/sort.d.ts +16 -16
- package/src/sort.js +161 -161
- package/src/sql-command.d.ts +19 -19
- package/src/sql-command.js +2 -2
- package/src/validators.d.ts +14 -14
- package/src/validators.js +71 -69
- package/src/valueConverters.d.ts +13 -13
- package/src/valueConverters.js +213 -213
- package/urlBuilder.d.ts +6 -6
- package/urlBuilder.js +25 -25
|
@@ -1,307 +1,307 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dbNamesOf = exports.isDbReadonly = exports.CustomSqlFilterBuilder = exports.FilterConsumerBridgeToSqlRequest = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var sql_database_1 = require("../data-providers/sql-database");
|
|
6
|
-
var RepositoryImplementation_1 = require("../remult3/RepositoryImplementation");
|
|
7
|
-
var FilterConsumerBridgeToSqlRequest = /** @class */ (function () {
|
|
8
|
-
function FilterConsumerBridgeToSqlRequest(r, nameProvider) {
|
|
9
|
-
this.r = r;
|
|
10
|
-
this.nameProvider = nameProvider;
|
|
11
|
-
this.where = '';
|
|
12
|
-
this._addWhere = true;
|
|
13
|
-
this.promises = [];
|
|
14
|
-
}
|
|
15
|
-
FilterConsumerBridgeToSqlRequest.prototype.resolveWhere = function () {
|
|
16
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
17
|
-
var p, p_1, p_1_1, pr, e_1_1;
|
|
18
|
-
var e_1, _a;
|
|
19
|
-
return tslib_1.__generator(this, function (_b) {
|
|
20
|
-
switch (_b.label) {
|
|
21
|
-
case 0:
|
|
22
|
-
if (!(this.promises.length > 0)) return [3 /*break*/, 9];
|
|
23
|
-
p = this.promises;
|
|
24
|
-
this.promises = [];
|
|
25
|
-
_b.label = 1;
|
|
26
|
-
case 1:
|
|
27
|
-
_b.trys.push([1, 6, 7, 8]);
|
|
28
|
-
p_1 = (e_1 = void 0, tslib_1.__values(p)), p_1_1 = p_1.next();
|
|
29
|
-
_b.label = 2;
|
|
30
|
-
case 2:
|
|
31
|
-
if (!!p_1_1.done) return [3 /*break*/, 5];
|
|
32
|
-
pr = p_1_1.value;
|
|
33
|
-
return [4 /*yield*/, pr];
|
|
34
|
-
case 3:
|
|
35
|
-
_b.sent();
|
|
36
|
-
_b.label = 4;
|
|
37
|
-
case 4:
|
|
38
|
-
p_1_1 = p_1.next();
|
|
39
|
-
return [3 /*break*/, 2];
|
|
40
|
-
case 5: return [3 /*break*/, 8];
|
|
41
|
-
case 6:
|
|
42
|
-
e_1_1 = _b.sent();
|
|
43
|
-
e_1 = { error: e_1_1 };
|
|
44
|
-
return [3 /*break*/, 8];
|
|
45
|
-
case 7:
|
|
46
|
-
try {
|
|
47
|
-
if (p_1_1 && !p_1_1.done && (_a = p_1.return)) _a.call(p_1);
|
|
48
|
-
}
|
|
49
|
-
finally { if (e_1) throw e_1.error; }
|
|
50
|
-
return [7 /*endfinally*/];
|
|
51
|
-
case 8: return [3 /*break*/, 0];
|
|
52
|
-
case 9: return [2 /*return*/, this.where];
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
FilterConsumerBridgeToSqlRequest.prototype.custom = function (key, customItem) {
|
|
58
|
-
throw new Error('Custom filter should be translated before it gets here');
|
|
59
|
-
};
|
|
60
|
-
FilterConsumerBridgeToSqlRequest.prototype.or = function (orElements) {
|
|
61
|
-
var _this = this;
|
|
62
|
-
var statement = '';
|
|
63
|
-
this.promises.push((function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
64
|
-
var orElements_1, orElements_1_1, element, f, where, e_2_1;
|
|
65
|
-
var e_2, _a;
|
|
66
|
-
return tslib_1.__generator(this, function (_b) {
|
|
67
|
-
switch (_b.label) {
|
|
68
|
-
case 0:
|
|
69
|
-
_b.trys.push([0, 5, 6, 7]);
|
|
70
|
-
orElements_1 = tslib_1.__values(orElements), orElements_1_1 = orElements_1.next();
|
|
71
|
-
_b.label = 1;
|
|
72
|
-
case 1:
|
|
73
|
-
if (!!orElements_1_1.done) return [3 /*break*/, 4];
|
|
74
|
-
element = orElements_1_1.value;
|
|
75
|
-
f = new FilterConsumerBridgeToSqlRequest(this.r, this.nameProvider);
|
|
76
|
-
f._addWhere = false;
|
|
77
|
-
element.__applyToConsumer(f);
|
|
78
|
-
return [4 /*yield*/, f.resolveWhere()];
|
|
79
|
-
case 2:
|
|
80
|
-
where = _b.sent();
|
|
81
|
-
if (!where)
|
|
82
|
-
return [2 /*return*/]; //since if any member of or is empty, then the entire or is irrelevant
|
|
83
|
-
if (where.length > 0) {
|
|
84
|
-
if (statement.length > 0) {
|
|
85
|
-
statement += ' or ';
|
|
86
|
-
}
|
|
87
|
-
if (orElements.length > 1) {
|
|
88
|
-
statement += '(' + where + ')';
|
|
89
|
-
}
|
|
90
|
-
else
|
|
91
|
-
statement += where;
|
|
92
|
-
}
|
|
93
|
-
_b.label = 3;
|
|
94
|
-
case 3:
|
|
95
|
-
orElements_1_1 = orElements_1.next();
|
|
96
|
-
return [3 /*break*/, 1];
|
|
97
|
-
case 4: return [3 /*break*/, 7];
|
|
98
|
-
case 5:
|
|
99
|
-
e_2_1 = _b.sent();
|
|
100
|
-
e_2 = { error: e_2_1 };
|
|
101
|
-
return [3 /*break*/, 7];
|
|
102
|
-
case 6:
|
|
103
|
-
try {
|
|
104
|
-
if (orElements_1_1 && !orElements_1_1.done && (_a = orElements_1.return)) _a.call(orElements_1);
|
|
105
|
-
}
|
|
106
|
-
finally { if (e_2) throw e_2.error; }
|
|
107
|
-
return [7 /*endfinally*/];
|
|
108
|
-
case 7:
|
|
109
|
-
this.addToWhere('(' + statement + ')');
|
|
110
|
-
return [2 /*return*/];
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
}); })());
|
|
114
|
-
};
|
|
115
|
-
FilterConsumerBridgeToSqlRequest.prototype.isNull = function (col) {
|
|
116
|
-
var _this = this;
|
|
117
|
-
this.promises.push((function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
|
|
118
|
-
return [2 /*return*/, this.addToWhere(this.nameProvider.$dbNameOf(col) + ' is null')];
|
|
119
|
-
}); }); })());
|
|
120
|
-
};
|
|
121
|
-
FilterConsumerBridgeToSqlRequest.prototype.isNotNull = function (col) {
|
|
122
|
-
var _this = this;
|
|
123
|
-
this.promises.push((function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
|
|
124
|
-
return [2 /*return*/, this.addToWhere(this.nameProvider.$dbNameOf(col) + ' is not null')];
|
|
125
|
-
}); }); })());
|
|
126
|
-
};
|
|
127
|
-
FilterConsumerBridgeToSqlRequest.prototype.isIn = function (col, val) {
|
|
128
|
-
var _this = this;
|
|
129
|
-
this.promises.push((function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
130
|
-
var _this = this;
|
|
131
|
-
return tslib_1.__generator(this, function (_a) {
|
|
132
|
-
if (val && val.length > 0)
|
|
133
|
-
this.addToWhere(this.nameProvider.$dbNameOf(col) +
|
|
134
|
-
' in (' +
|
|
135
|
-
val
|
|
136
|
-
.map(function (x) {
|
|
137
|
-
return _this.r.addParameterAndReturnSqlToken(col.valueConverter.toDb(x));
|
|
138
|
-
})
|
|
139
|
-
.join(',') +
|
|
140
|
-
')');
|
|
141
|
-
else
|
|
142
|
-
this.addToWhere('1 = 0 /*isIn with no values*/');
|
|
143
|
-
return [2 /*return*/];
|
|
144
|
-
});
|
|
145
|
-
}); })());
|
|
146
|
-
};
|
|
147
|
-
FilterConsumerBridgeToSqlRequest.prototype.isEqualTo = function (col, val) {
|
|
148
|
-
this.add(col, val, '=');
|
|
149
|
-
};
|
|
150
|
-
FilterConsumerBridgeToSqlRequest.prototype.isDifferentFrom = function (col, val) {
|
|
151
|
-
this.add(col, val, '<>');
|
|
152
|
-
};
|
|
153
|
-
FilterConsumerBridgeToSqlRequest.prototype.isGreaterOrEqualTo = function (col, val) {
|
|
154
|
-
this.add(col, val, '>=');
|
|
155
|
-
};
|
|
156
|
-
FilterConsumerBridgeToSqlRequest.prototype.isGreaterThan = function (col, val) {
|
|
157
|
-
this.add(col, val, '>');
|
|
158
|
-
};
|
|
159
|
-
FilterConsumerBridgeToSqlRequest.prototype.isLessOrEqualTo = function (col, val) {
|
|
160
|
-
this.add(col, val, '<=');
|
|
161
|
-
};
|
|
162
|
-
FilterConsumerBridgeToSqlRequest.prototype.isLessThan = function (col, val) {
|
|
163
|
-
this.add(col, val, '<');
|
|
164
|
-
};
|
|
165
|
-
FilterConsumerBridgeToSqlRequest.prototype.containsCaseInsensitive = function (col, val) {
|
|
166
|
-
var _this = this;
|
|
167
|
-
this.promises.push((function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
168
|
-
return tslib_1.__generator(this, function (_a) {
|
|
169
|
-
this.addToWhere('lower (' +
|
|
170
|
-
this.nameProvider.$dbNameOf(col) +
|
|
171
|
-
") like lower ('%" +
|
|
172
|
-
val.replace(/'/g, "''") +
|
|
173
|
-
"%')");
|
|
174
|
-
return [2 /*return*/];
|
|
175
|
-
});
|
|
176
|
-
}); })());
|
|
177
|
-
};
|
|
178
|
-
FilterConsumerBridgeToSqlRequest.prototype.add = function (col, val, operator) {
|
|
179
|
-
var _this = this;
|
|
180
|
-
this.promises.push((function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
181
|
-
var x;
|
|
182
|
-
return tslib_1.__generator(this, function (_a) {
|
|
183
|
-
x = this.nameProvider.$dbNameOf(col) +
|
|
184
|
-
' ' +
|
|
185
|
-
operator +
|
|
186
|
-
' ' +
|
|
187
|
-
this.r.addParameterAndReturnSqlToken(col.valueConverter.toDb(val));
|
|
188
|
-
this.addToWhere(x);
|
|
189
|
-
return [2 /*return*/];
|
|
190
|
-
});
|
|
191
|
-
}); })());
|
|
192
|
-
};
|
|
193
|
-
FilterConsumerBridgeToSqlRequest.prototype.addToWhere = function (x) {
|
|
194
|
-
if (this.where.length == 0) {
|
|
195
|
-
if (this._addWhere)
|
|
196
|
-
this.where += ' where ';
|
|
197
|
-
}
|
|
198
|
-
else
|
|
199
|
-
this.where += ' and ';
|
|
200
|
-
this.where += x;
|
|
201
|
-
};
|
|
202
|
-
FilterConsumerBridgeToSqlRequest.prototype.databaseCustom = function (databaseCustom) {
|
|
203
|
-
var _this = this;
|
|
204
|
-
this.promises.push((function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
205
|
-
var item;
|
|
206
|
-
return tslib_1.__generator(this, function (_a) {
|
|
207
|
-
switch (_a.label) {
|
|
208
|
-
case 0:
|
|
209
|
-
if (!(databaseCustom === null || databaseCustom === void 0 ? void 0 : databaseCustom.buildSql)) return [3 /*break*/, 2];
|
|
210
|
-
item = new CustomSqlFilterBuilder(this.r);
|
|
211
|
-
return [4 /*yield*/, databaseCustom.buildSql(item)];
|
|
212
|
-
case 1:
|
|
213
|
-
_a.sent();
|
|
214
|
-
if (item.sql) {
|
|
215
|
-
this.addToWhere('(' + item.sql + ')');
|
|
216
|
-
}
|
|
217
|
-
_a.label = 2;
|
|
218
|
-
case 2: return [2 /*return*/];
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
}); })());
|
|
222
|
-
};
|
|
223
|
-
return FilterConsumerBridgeToSqlRequest;
|
|
224
|
-
}());
|
|
225
|
-
exports.FilterConsumerBridgeToSqlRequest = FilterConsumerBridgeToSqlRequest;
|
|
226
|
-
var CustomSqlFilterBuilder = /** @class */ (function () {
|
|
227
|
-
function CustomSqlFilterBuilder(r) {
|
|
228
|
-
this.r = r;
|
|
229
|
-
this.sql = '';
|
|
230
|
-
}
|
|
231
|
-
CustomSqlFilterBuilder.prototype.addParameterAndReturnSqlToken = function (val, field) {
|
|
232
|
-
if (field)
|
|
233
|
-
val = field.valueConverter.toDb(val);
|
|
234
|
-
return this.r.addParameterAndReturnSqlToken(val);
|
|
235
|
-
};
|
|
236
|
-
CustomSqlFilterBuilder.prototype.filterToRaw = function (repo, condition) {
|
|
237
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
238
|
-
return tslib_1.__generator(this, function (_a) {
|
|
239
|
-
return [2 /*return*/, sql_database_1.SqlDatabase.filterToRaw(repo, condition, this)];
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
};
|
|
243
|
-
return CustomSqlFilterBuilder;
|
|
244
|
-
}());
|
|
245
|
-
exports.CustomSqlFilterBuilder = CustomSqlFilterBuilder;
|
|
246
|
-
function isDbReadonly(field, dbNames) {
|
|
247
|
-
return (field.dbReadOnly ||
|
|
248
|
-
field.isServerExpression ||
|
|
249
|
-
dbNames.$dbNameOf(field) != field.options.dbName);
|
|
250
|
-
}
|
|
251
|
-
exports.isDbReadonly = isDbReadonly;
|
|
252
|
-
function dbNamesOf(repo) {
|
|
253
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
254
|
-
var meta, result, _a, _b, field, _c, _d, e_3_1;
|
|
255
|
-
var _e, e_3, _f;
|
|
256
|
-
return tslib_1.__generator(this, function (_g) {
|
|
257
|
-
switch (_g.label) {
|
|
258
|
-
case 0:
|
|
259
|
-
meta = RepositoryImplementation_1.getEntityMetadata(repo);
|
|
260
|
-
_e = {};
|
|
261
|
-
return [4 /*yield*/, meta.getDbName()];
|
|
262
|
-
case 1:
|
|
263
|
-
result = (_e.$entityName = _g.sent(),
|
|
264
|
-
_e.toString = function () { return result.$entityName; },
|
|
265
|
-
_e.$dbNameOf = function (field) {
|
|
266
|
-
var key;
|
|
267
|
-
if (typeof field === 'string')
|
|
268
|
-
key = field;
|
|
269
|
-
else
|
|
270
|
-
key = field.key;
|
|
271
|
-
return result[key];
|
|
272
|
-
},
|
|
273
|
-
_e);
|
|
274
|
-
_g.label = 2;
|
|
275
|
-
case 2:
|
|
276
|
-
_g.trys.push([2, 7, 8, 9]);
|
|
277
|
-
_a = tslib_1.__values(meta.fields), _b = _a.next();
|
|
278
|
-
_g.label = 3;
|
|
279
|
-
case 3:
|
|
280
|
-
if (!!_b.done) return [3 /*break*/, 6];
|
|
281
|
-
field = _b.value;
|
|
282
|
-
_c = result;
|
|
283
|
-
_d = field.key;
|
|
284
|
-
return [4 /*yield*/, field.getDbName()];
|
|
285
|
-
case 4:
|
|
286
|
-
_c[_d] = _g.sent();
|
|
287
|
-
_g.label = 5;
|
|
288
|
-
case 5:
|
|
289
|
-
_b = _a.next();
|
|
290
|
-
return [3 /*break*/, 3];
|
|
291
|
-
case 6: return [3 /*break*/, 9];
|
|
292
|
-
case 7:
|
|
293
|
-
e_3_1 = _g.sent();
|
|
294
|
-
e_3 = { error: e_3_1 };
|
|
295
|
-
return [3 /*break*/, 9];
|
|
296
|
-
case 8:
|
|
297
|
-
try {
|
|
298
|
-
if (_b && !_b.done && (_f = _a.return)) _f.call(_a);
|
|
299
|
-
}
|
|
300
|
-
finally { if (e_3) throw e_3.error; }
|
|
301
|
-
return [7 /*endfinally*/];
|
|
302
|
-
case 9: return [2 /*return*/, result];
|
|
303
|
-
}
|
|
304
|
-
});
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
exports.dbNamesOf = dbNamesOf;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dbNamesOf = exports.isDbReadonly = exports.CustomSqlFilterBuilder = exports.FilterConsumerBridgeToSqlRequest = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var sql_database_1 = require("../data-providers/sql-database");
|
|
6
|
+
var RepositoryImplementation_1 = require("../remult3/RepositoryImplementation");
|
|
7
|
+
var FilterConsumerBridgeToSqlRequest = /** @class */ (function () {
|
|
8
|
+
function FilterConsumerBridgeToSqlRequest(r, nameProvider) {
|
|
9
|
+
this.r = r;
|
|
10
|
+
this.nameProvider = nameProvider;
|
|
11
|
+
this.where = '';
|
|
12
|
+
this._addWhere = true;
|
|
13
|
+
this.promises = [];
|
|
14
|
+
}
|
|
15
|
+
FilterConsumerBridgeToSqlRequest.prototype.resolveWhere = function () {
|
|
16
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
17
|
+
var p, p_1, p_1_1, pr, e_1_1;
|
|
18
|
+
var e_1, _a;
|
|
19
|
+
return tslib_1.__generator(this, function (_b) {
|
|
20
|
+
switch (_b.label) {
|
|
21
|
+
case 0:
|
|
22
|
+
if (!(this.promises.length > 0)) return [3 /*break*/, 9];
|
|
23
|
+
p = this.promises;
|
|
24
|
+
this.promises = [];
|
|
25
|
+
_b.label = 1;
|
|
26
|
+
case 1:
|
|
27
|
+
_b.trys.push([1, 6, 7, 8]);
|
|
28
|
+
p_1 = (e_1 = void 0, tslib_1.__values(p)), p_1_1 = p_1.next();
|
|
29
|
+
_b.label = 2;
|
|
30
|
+
case 2:
|
|
31
|
+
if (!!p_1_1.done) return [3 /*break*/, 5];
|
|
32
|
+
pr = p_1_1.value;
|
|
33
|
+
return [4 /*yield*/, pr];
|
|
34
|
+
case 3:
|
|
35
|
+
_b.sent();
|
|
36
|
+
_b.label = 4;
|
|
37
|
+
case 4:
|
|
38
|
+
p_1_1 = p_1.next();
|
|
39
|
+
return [3 /*break*/, 2];
|
|
40
|
+
case 5: return [3 /*break*/, 8];
|
|
41
|
+
case 6:
|
|
42
|
+
e_1_1 = _b.sent();
|
|
43
|
+
e_1 = { error: e_1_1 };
|
|
44
|
+
return [3 /*break*/, 8];
|
|
45
|
+
case 7:
|
|
46
|
+
try {
|
|
47
|
+
if (p_1_1 && !p_1_1.done && (_a = p_1.return)) _a.call(p_1);
|
|
48
|
+
}
|
|
49
|
+
finally { if (e_1) throw e_1.error; }
|
|
50
|
+
return [7 /*endfinally*/];
|
|
51
|
+
case 8: return [3 /*break*/, 0];
|
|
52
|
+
case 9: return [2 /*return*/, this.where];
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
FilterConsumerBridgeToSqlRequest.prototype.custom = function (key, customItem) {
|
|
58
|
+
throw new Error('Custom filter should be translated before it gets here');
|
|
59
|
+
};
|
|
60
|
+
FilterConsumerBridgeToSqlRequest.prototype.or = function (orElements) {
|
|
61
|
+
var _this = this;
|
|
62
|
+
var statement = '';
|
|
63
|
+
this.promises.push((function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
64
|
+
var orElements_1, orElements_1_1, element, f, where, e_2_1;
|
|
65
|
+
var e_2, _a;
|
|
66
|
+
return tslib_1.__generator(this, function (_b) {
|
|
67
|
+
switch (_b.label) {
|
|
68
|
+
case 0:
|
|
69
|
+
_b.trys.push([0, 5, 6, 7]);
|
|
70
|
+
orElements_1 = tslib_1.__values(orElements), orElements_1_1 = orElements_1.next();
|
|
71
|
+
_b.label = 1;
|
|
72
|
+
case 1:
|
|
73
|
+
if (!!orElements_1_1.done) return [3 /*break*/, 4];
|
|
74
|
+
element = orElements_1_1.value;
|
|
75
|
+
f = new FilterConsumerBridgeToSqlRequest(this.r, this.nameProvider);
|
|
76
|
+
f._addWhere = false;
|
|
77
|
+
element.__applyToConsumer(f);
|
|
78
|
+
return [4 /*yield*/, f.resolveWhere()];
|
|
79
|
+
case 2:
|
|
80
|
+
where = _b.sent();
|
|
81
|
+
if (!where)
|
|
82
|
+
return [2 /*return*/]; //since if any member of or is empty, then the entire or is irrelevant
|
|
83
|
+
if (where.length > 0) {
|
|
84
|
+
if (statement.length > 0) {
|
|
85
|
+
statement += ' or ';
|
|
86
|
+
}
|
|
87
|
+
if (orElements.length > 1) {
|
|
88
|
+
statement += '(' + where + ')';
|
|
89
|
+
}
|
|
90
|
+
else
|
|
91
|
+
statement += where;
|
|
92
|
+
}
|
|
93
|
+
_b.label = 3;
|
|
94
|
+
case 3:
|
|
95
|
+
orElements_1_1 = orElements_1.next();
|
|
96
|
+
return [3 /*break*/, 1];
|
|
97
|
+
case 4: return [3 /*break*/, 7];
|
|
98
|
+
case 5:
|
|
99
|
+
e_2_1 = _b.sent();
|
|
100
|
+
e_2 = { error: e_2_1 };
|
|
101
|
+
return [3 /*break*/, 7];
|
|
102
|
+
case 6:
|
|
103
|
+
try {
|
|
104
|
+
if (orElements_1_1 && !orElements_1_1.done && (_a = orElements_1.return)) _a.call(orElements_1);
|
|
105
|
+
}
|
|
106
|
+
finally { if (e_2) throw e_2.error; }
|
|
107
|
+
return [7 /*endfinally*/];
|
|
108
|
+
case 7:
|
|
109
|
+
this.addToWhere('(' + statement + ')');
|
|
110
|
+
return [2 /*return*/];
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}); })());
|
|
114
|
+
};
|
|
115
|
+
FilterConsumerBridgeToSqlRequest.prototype.isNull = function (col) {
|
|
116
|
+
var _this = this;
|
|
117
|
+
this.promises.push((function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
|
|
118
|
+
return [2 /*return*/, this.addToWhere(this.nameProvider.$dbNameOf(col) + ' is null')];
|
|
119
|
+
}); }); })());
|
|
120
|
+
};
|
|
121
|
+
FilterConsumerBridgeToSqlRequest.prototype.isNotNull = function (col) {
|
|
122
|
+
var _this = this;
|
|
123
|
+
this.promises.push((function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
|
|
124
|
+
return [2 /*return*/, this.addToWhere(this.nameProvider.$dbNameOf(col) + ' is not null')];
|
|
125
|
+
}); }); })());
|
|
126
|
+
};
|
|
127
|
+
FilterConsumerBridgeToSqlRequest.prototype.isIn = function (col, val) {
|
|
128
|
+
var _this = this;
|
|
129
|
+
this.promises.push((function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
130
|
+
var _this = this;
|
|
131
|
+
return tslib_1.__generator(this, function (_a) {
|
|
132
|
+
if (val && val.length > 0)
|
|
133
|
+
this.addToWhere(this.nameProvider.$dbNameOf(col) +
|
|
134
|
+
' in (' +
|
|
135
|
+
val
|
|
136
|
+
.map(function (x) {
|
|
137
|
+
return _this.r.addParameterAndReturnSqlToken(col.valueConverter.toDb(x));
|
|
138
|
+
})
|
|
139
|
+
.join(',') +
|
|
140
|
+
')');
|
|
141
|
+
else
|
|
142
|
+
this.addToWhere('1 = 0 /*isIn with no values*/');
|
|
143
|
+
return [2 /*return*/];
|
|
144
|
+
});
|
|
145
|
+
}); })());
|
|
146
|
+
};
|
|
147
|
+
FilterConsumerBridgeToSqlRequest.prototype.isEqualTo = function (col, val) {
|
|
148
|
+
this.add(col, val, '=');
|
|
149
|
+
};
|
|
150
|
+
FilterConsumerBridgeToSqlRequest.prototype.isDifferentFrom = function (col, val) {
|
|
151
|
+
this.add(col, val, '<>');
|
|
152
|
+
};
|
|
153
|
+
FilterConsumerBridgeToSqlRequest.prototype.isGreaterOrEqualTo = function (col, val) {
|
|
154
|
+
this.add(col, val, '>=');
|
|
155
|
+
};
|
|
156
|
+
FilterConsumerBridgeToSqlRequest.prototype.isGreaterThan = function (col, val) {
|
|
157
|
+
this.add(col, val, '>');
|
|
158
|
+
};
|
|
159
|
+
FilterConsumerBridgeToSqlRequest.prototype.isLessOrEqualTo = function (col, val) {
|
|
160
|
+
this.add(col, val, '<=');
|
|
161
|
+
};
|
|
162
|
+
FilterConsumerBridgeToSqlRequest.prototype.isLessThan = function (col, val) {
|
|
163
|
+
this.add(col, val, '<');
|
|
164
|
+
};
|
|
165
|
+
FilterConsumerBridgeToSqlRequest.prototype.containsCaseInsensitive = function (col, val) {
|
|
166
|
+
var _this = this;
|
|
167
|
+
this.promises.push((function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
168
|
+
return tslib_1.__generator(this, function (_a) {
|
|
169
|
+
this.addToWhere('lower (' +
|
|
170
|
+
this.nameProvider.$dbNameOf(col) +
|
|
171
|
+
") like lower ('%" +
|
|
172
|
+
val.replace(/'/g, "''") +
|
|
173
|
+
"%')");
|
|
174
|
+
return [2 /*return*/];
|
|
175
|
+
});
|
|
176
|
+
}); })());
|
|
177
|
+
};
|
|
178
|
+
FilterConsumerBridgeToSqlRequest.prototype.add = function (col, val, operator) {
|
|
179
|
+
var _this = this;
|
|
180
|
+
this.promises.push((function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
181
|
+
var x;
|
|
182
|
+
return tslib_1.__generator(this, function (_a) {
|
|
183
|
+
x = this.nameProvider.$dbNameOf(col) +
|
|
184
|
+
' ' +
|
|
185
|
+
operator +
|
|
186
|
+
' ' +
|
|
187
|
+
this.r.addParameterAndReturnSqlToken(col.valueConverter.toDb(val));
|
|
188
|
+
this.addToWhere(x);
|
|
189
|
+
return [2 /*return*/];
|
|
190
|
+
});
|
|
191
|
+
}); })());
|
|
192
|
+
};
|
|
193
|
+
FilterConsumerBridgeToSqlRequest.prototype.addToWhere = function (x) {
|
|
194
|
+
if (this.where.length == 0) {
|
|
195
|
+
if (this._addWhere)
|
|
196
|
+
this.where += ' where ';
|
|
197
|
+
}
|
|
198
|
+
else
|
|
199
|
+
this.where += ' and ';
|
|
200
|
+
this.where += x;
|
|
201
|
+
};
|
|
202
|
+
FilterConsumerBridgeToSqlRequest.prototype.databaseCustom = function (databaseCustom) {
|
|
203
|
+
var _this = this;
|
|
204
|
+
this.promises.push((function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
205
|
+
var item;
|
|
206
|
+
return tslib_1.__generator(this, function (_a) {
|
|
207
|
+
switch (_a.label) {
|
|
208
|
+
case 0:
|
|
209
|
+
if (!(databaseCustom === null || databaseCustom === void 0 ? void 0 : databaseCustom.buildSql)) return [3 /*break*/, 2];
|
|
210
|
+
item = new CustomSqlFilterBuilder(this.r);
|
|
211
|
+
return [4 /*yield*/, databaseCustom.buildSql(item)];
|
|
212
|
+
case 1:
|
|
213
|
+
_a.sent();
|
|
214
|
+
if (item.sql) {
|
|
215
|
+
this.addToWhere('(' + item.sql + ')');
|
|
216
|
+
}
|
|
217
|
+
_a.label = 2;
|
|
218
|
+
case 2: return [2 /*return*/];
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}); })());
|
|
222
|
+
};
|
|
223
|
+
return FilterConsumerBridgeToSqlRequest;
|
|
224
|
+
}());
|
|
225
|
+
exports.FilterConsumerBridgeToSqlRequest = FilterConsumerBridgeToSqlRequest;
|
|
226
|
+
var CustomSqlFilterBuilder = /** @class */ (function () {
|
|
227
|
+
function CustomSqlFilterBuilder(r) {
|
|
228
|
+
this.r = r;
|
|
229
|
+
this.sql = '';
|
|
230
|
+
}
|
|
231
|
+
CustomSqlFilterBuilder.prototype.addParameterAndReturnSqlToken = function (val, field) {
|
|
232
|
+
if (field)
|
|
233
|
+
val = field.valueConverter.toDb(val);
|
|
234
|
+
return this.r.addParameterAndReturnSqlToken(val);
|
|
235
|
+
};
|
|
236
|
+
CustomSqlFilterBuilder.prototype.filterToRaw = function (repo, condition) {
|
|
237
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
238
|
+
return tslib_1.__generator(this, function (_a) {
|
|
239
|
+
return [2 /*return*/, sql_database_1.SqlDatabase.filterToRaw(repo, condition, this)];
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
return CustomSqlFilterBuilder;
|
|
244
|
+
}());
|
|
245
|
+
exports.CustomSqlFilterBuilder = CustomSqlFilterBuilder;
|
|
246
|
+
function isDbReadonly(field, dbNames) {
|
|
247
|
+
return (field.dbReadOnly ||
|
|
248
|
+
field.isServerExpression ||
|
|
249
|
+
dbNames.$dbNameOf(field) != field.options.dbName);
|
|
250
|
+
}
|
|
251
|
+
exports.isDbReadonly = isDbReadonly;
|
|
252
|
+
function dbNamesOf(repo) {
|
|
253
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
254
|
+
var meta, result, _a, _b, field, _c, _d, e_3_1;
|
|
255
|
+
var _e, e_3, _f;
|
|
256
|
+
return tslib_1.__generator(this, function (_g) {
|
|
257
|
+
switch (_g.label) {
|
|
258
|
+
case 0:
|
|
259
|
+
meta = (0, RepositoryImplementation_1.getEntityMetadata)(repo);
|
|
260
|
+
_e = {};
|
|
261
|
+
return [4 /*yield*/, meta.getDbName()];
|
|
262
|
+
case 1:
|
|
263
|
+
result = (_e.$entityName = _g.sent(),
|
|
264
|
+
_e.toString = function () { return result.$entityName; },
|
|
265
|
+
_e.$dbNameOf = function (field) {
|
|
266
|
+
var key;
|
|
267
|
+
if (typeof field === 'string')
|
|
268
|
+
key = field;
|
|
269
|
+
else
|
|
270
|
+
key = field.key;
|
|
271
|
+
return result[key];
|
|
272
|
+
},
|
|
273
|
+
_e);
|
|
274
|
+
_g.label = 2;
|
|
275
|
+
case 2:
|
|
276
|
+
_g.trys.push([2, 7, 8, 9]);
|
|
277
|
+
_a = tslib_1.__values(meta.fields), _b = _a.next();
|
|
278
|
+
_g.label = 3;
|
|
279
|
+
case 3:
|
|
280
|
+
if (!!_b.done) return [3 /*break*/, 6];
|
|
281
|
+
field = _b.value;
|
|
282
|
+
_c = result;
|
|
283
|
+
_d = field.key;
|
|
284
|
+
return [4 /*yield*/, field.getDbName()];
|
|
285
|
+
case 4:
|
|
286
|
+
_c[_d] = _g.sent();
|
|
287
|
+
_g.label = 5;
|
|
288
|
+
case 5:
|
|
289
|
+
_b = _a.next();
|
|
290
|
+
return [3 /*break*/, 3];
|
|
291
|
+
case 6: return [3 /*break*/, 9];
|
|
292
|
+
case 7:
|
|
293
|
+
e_3_1 = _g.sent();
|
|
294
|
+
e_3 = { error: e_3_1 };
|
|
295
|
+
return [3 /*break*/, 9];
|
|
296
|
+
case 8:
|
|
297
|
+
try {
|
|
298
|
+
if (_b && !_b.done && (_f = _a.return)) _f.call(_a);
|
|
299
|
+
}
|
|
300
|
+
finally { if (e_3) throw e_3.error; }
|
|
301
|
+
return [7 /*endfinally*/];
|
|
302
|
+
case 9: return [2 /*return*/, result];
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
exports.dbNamesOf = dbNamesOf;
|