taon-type-sql 21.0.21 → 21.0.23
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/browser/package.json +1 -1
- package/browser-prod/package.json +1 -1
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/package.json +1 -1
- package/lib-prod/build-info._auto-generated_.js +14 -30
- package/lib-prod/builder/column/basic-column.js +12 -14
- package/lib-prod/builder/column/boolean-column.js +13 -14
- package/lib-prod/builder/column/comparable-column.js +41 -41
- package/lib-prod/builder/column/date-column.js +13 -14
- package/lib-prod/builder/column/number-column.js +18 -19
- package/lib-prod/builder/column/query-column.js +22 -24
- package/lib-prod/builder/column/string-column.js +35 -36
- package/lib-prod/builder/column/value-column.js +27 -28
- package/lib-prod/builder/condition/query-column-condition.js +21 -22
- package/lib-prod/builder/condition/query-condition-chain.js +32 -33
- package/lib-prod/builder/condition/query-condition.js +4 -5
- package/lib-prod/builder/condition/query-join-condition.js +21 -22
- package/lib-prod/builder/helpers/generics-helper.js +3 -5
- package/lib-prod/builder/helpers/internal-types.js +0 -4
- package/lib-prod/builder/join/joined-tables-chain.js +12 -16
- package/lib-prod/builder/join/joined-tables.js +20 -23
- package/lib-prod/builder/other/query-ordering.js +18 -19
- package/lib-prod/builder/query/select-query.js +49 -52
- package/lib-prod/builder/query/table-condition-query.js +25 -29
- package/lib-prod/builder/query/table-query.js +52 -58
- package/lib-prod/builder/query-source.js +16 -20
- package/lib-prod/builder/query-table.js +25 -26
- package/lib-prod/client/mysql.js +9 -10
- package/lib-prod/client/pg.js +9 -10
- package/lib-prod/client/query-processor.js +39 -68
- package/lib-prod/converter/param-converter.js +19 -27
- package/lib-prod/converter/parameterized-converter.js +13 -14
- package/lib-prod/converter/query-converter.js +243 -259
- package/lib-prod/converter/result-converter.js +61 -73
- package/lib-prod/converter/sql-converter.js +6 -7
- package/lib-prod/converter/type-converter.js +24 -35
- package/lib-prod/converter/types.js +0 -3
- package/lib-prod/env/env.angular-node-app.js +130 -71
- package/lib-prod/env/env.docs-webapp.js +130 -71
- package/lib-prod/env/env.electron-app.js +130 -71
- package/lib-prod/env/env.mobile-app.js +130 -71
- package/lib-prod/env/env.npm-lib-and-cli-tool.js +130 -71
- package/lib-prod/env/env.vscode-plugin.js +130 -71
- package/lib-prod/env/index.js +6 -23
- package/lib-prod/index._auto-generated_.js +0 -6
- package/lib-prod/index.js +46 -48
- package/lib-prod/migrations/index.js +1 -19
- package/lib-prod/migrations/migrations_index._auto-generated_.js +0 -4
- package/lib-prod/package.json +1 -1
- package/package.json +1 -1
- package/websql/package.json +1 -1
- package/websql-prod/package.json +1 -1
- package/lib-prod/build-info._auto-generated_.d.ts +0 -24
- package/lib-prod/build-info._auto-generated_.js.map +0 -1
- package/lib-prod/builder/column/basic-column.d.ts +0 -8
- package/lib-prod/builder/column/basic-column.js.map +0 -1
- package/lib-prod/builder/column/boolean-column.d.ts +0 -9
- package/lib-prod/builder/column/boolean-column.js.map +0 -1
- package/lib-prod/builder/column/comparable-column.d.ts +0 -18
- package/lib-prod/builder/column/comparable-column.js.map +0 -1
- package/lib-prod/builder/column/date-column.d.ts +0 -9
- package/lib-prod/builder/column/date-column.js.map +0 -1
- package/lib-prod/builder/column/number-column.d.ts +0 -10
- package/lib-prod/builder/column/number-column.js.map +0 -1
- package/lib-prod/builder/column/query-column.d.ts +0 -18
- package/lib-prod/builder/column/query-column.js.map +0 -1
- package/lib-prod/builder/column/string-column.d.ts +0 -17
- package/lib-prod/builder/column/string-column.js.map +0 -1
- package/lib-prod/builder/column/value-column.d.ts +0 -15
- package/lib-prod/builder/column/value-column.js.map +0 -1
- package/lib-prod/builder/condition/query-column-condition.d.ts +0 -13
- package/lib-prod/builder/condition/query-column-condition.js.map +0 -1
- package/lib-prod/builder/condition/query-condition-chain.d.ts +0 -17
- package/lib-prod/builder/condition/query-condition-chain.js.map +0 -1
- package/lib-prod/builder/condition/query-condition.d.ts +0 -7
- package/lib-prod/builder/condition/query-condition.js.map +0 -1
- package/lib-prod/builder/condition/query-join-condition.d.ts +0 -12
- package/lib-prod/builder/condition/query-join-condition.js.map +0 -1
- package/lib-prod/builder/helpers/generics-helper.d.ts +0 -2
- package/lib-prod/builder/helpers/generics-helper.js.map +0 -1
- package/lib-prod/builder/helpers/internal-types.d.ts +0 -15
- package/lib-prod/builder/helpers/internal-types.js.map +0 -1
- package/lib-prod/builder/join/joined-tables-chain.d.ts +0 -11
- package/lib-prod/builder/join/joined-tables-chain.js.map +0 -1
- package/lib-prod/builder/join/joined-tables.d.ts +0 -12
- package/lib-prod/builder/join/joined-tables.js.map +0 -1
- package/lib-prod/builder/other/query-ordering.d.ts +0 -10
- package/lib-prod/builder/other/query-ordering.js.map +0 -1
- package/lib-prod/builder/query/select-query.d.ts +0 -29
- package/lib-prod/builder/query/select-query.js.map +0 -1
- package/lib-prod/builder/query/table-condition-query.d.ts +0 -16
- package/lib-prod/builder/query/table-condition-query.js.map +0 -1
- package/lib-prod/builder/query/table-query.d.ts +0 -23
- package/lib-prod/builder/query/table-query.js.map +0 -1
- package/lib-prod/builder/query-source.d.ts +0 -14
- package/lib-prod/builder/query-source.js.map +0 -1
- package/lib-prod/builder/query-table.d.ts +0 -15
- package/lib-prod/builder/query-table.js.map +0 -1
- package/lib-prod/client/mysql.d.ts +0 -5
- package/lib-prod/client/mysql.js.map +0 -1
- package/lib-prod/client/pg.d.ts +0 -5
- package/lib-prod/client/pg.js.map +0 -1
- package/lib-prod/client/query-processor.d.ts +0 -10
- package/lib-prod/client/query-processor.js.map +0 -1
- package/lib-prod/converter/param-converter.d.ts +0 -2
- package/lib-prod/converter/param-converter.js.map +0 -1
- package/lib-prod/converter/parameterized-converter.d.ts +0 -5
- package/lib-prod/converter/parameterized-converter.js.map +0 -1
- package/lib-prod/converter/query-converter.d.ts +0 -2
- package/lib-prod/converter/query-converter.js.map +0 -1
- package/lib-prod/converter/result-converter.d.ts +0 -2
- package/lib-prod/converter/result-converter.js.map +0 -1
- package/lib-prod/converter/sql-converter.d.ts +0 -2
- package/lib-prod/converter/sql-converter.js.map +0 -1
- package/lib-prod/converter/type-converter.d.ts +0 -4
- package/lib-prod/converter/type-converter.js.map +0 -1
- package/lib-prod/converter/types.d.ts +0 -5
- package/lib-prod/converter/types.js.map +0 -1
- package/lib-prod/env/env.angular-node-app.d.ts +0 -64
- package/lib-prod/env/env.angular-node-app.js.map +0 -1
- package/lib-prod/env/env.docs-webapp.d.ts +0 -64
- package/lib-prod/env/env.docs-webapp.js.map +0 -1
- package/lib-prod/env/env.electron-app.d.ts +0 -64
- package/lib-prod/env/env.electron-app.js.map +0 -1
- package/lib-prod/env/env.mobile-app.d.ts +0 -64
- package/lib-prod/env/env.mobile-app.js.map +0 -1
- package/lib-prod/env/env.npm-lib-and-cli-tool.d.ts +0 -64
- package/lib-prod/env/env.npm-lib-and-cli-tool.js.map +0 -1
- package/lib-prod/env/env.vscode-plugin.d.ts +0 -64
- package/lib-prod/env/env.vscode-plugin.js.map +0 -1
- package/lib-prod/env/index.d.ts +0 -6
- package/lib-prod/env/index.js.map +0 -1
- package/lib-prod/index._auto-generated_.d.ts +0 -0
- package/lib-prod/index._auto-generated_.js.map +0 -1
- package/lib-prod/index.d.ts +0 -25
- package/lib-prod/index.js.map +0 -1
- package/lib-prod/migrations/index.d.ts +0 -1
- package/lib-prod/migrations/index.js.map +0 -1
- package/lib-prod/migrations/migrations_index._auto-generated_.d.ts +0 -0
- package/lib-prod/migrations/migrations_index._auto-generated_.js.map +0 -1
package/browser/package.json
CHANGED
|
@@ -25,6 +25,6 @@ exports.CURRENT_PACKAGE_TAON_VERSION = 'v21';
|
|
|
25
25
|
/**
|
|
26
26
|
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
27
27
|
*/
|
|
28
|
-
exports.CURRENT_PACKAGE_VERSION = '21.0.
|
|
28
|
+
exports.CURRENT_PACKAGE_VERSION = '21.0.23';
|
|
29
29
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
30
30
|
//# sourceMappingURL=build-info._auto-generated_.js.map
|
package/lib/package.json
CHANGED
|
@@ -1,30 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
exports.BUILD_BASE_HREF = '';
|
|
17
|
-
/**
|
|
18
|
-
* This value can be change in taon.jsonc (overrideNpmName)
|
|
19
|
-
*/
|
|
20
|
-
exports.PROJECT_NPM_NAME = 'taon-type-sql';
|
|
21
|
-
/**
|
|
22
|
-
* Taon version from you project taon.json
|
|
23
|
-
*/
|
|
24
|
-
exports.CURRENT_PACKAGE_TAON_VERSION = 'v21';
|
|
25
|
-
/**
|
|
26
|
-
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
27
|
-
*/
|
|
28
|
-
exports.CURRENT_PACKAGE_VERSION = '21.0.21';
|
|
29
|
-
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
30
|
-
//# sourceMappingURL=build-info._auto-generated_.js.map
|
|
1
|
+
const BUILD_FRAMEWORK_CLI_NAME = "tnp";
|
|
2
|
+
const APP_ID = "com.domain.example.taon-type-sql";
|
|
3
|
+
const BUILD_BASE_HREF = "";
|
|
4
|
+
const PROJECT_NPM_NAME = "taon-type-sql";
|
|
5
|
+
const CURRENT_PACKAGE_TAON_VERSION = "v21";
|
|
6
|
+
const CURRENT_PACKAGE_VERSION = "21.0.23";
|
|
7
|
+
export {
|
|
8
|
+
APP_ID,
|
|
9
|
+
BUILD_BASE_HREF,
|
|
10
|
+
BUILD_FRAMEWORK_CLI_NAME,
|
|
11
|
+
CURRENT_PACKAGE_TAON_VERSION,
|
|
12
|
+
CURRENT_PACKAGE_VERSION,
|
|
13
|
+
PROJECT_NPM_NAME
|
|
14
|
+
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
count() {
|
|
11
|
-
return new number_column_1.default(this._table, this._name, this._modifiers.concat({ name: 'count' }));
|
|
12
|
-
}
|
|
1
|
+
import QueryColumn from "./query-column";
|
|
2
|
+
import NumberColumn from "./number-column";
|
|
3
|
+
class BasicColumn extends QueryColumn {
|
|
4
|
+
constructor(table, name, modifiers = []) {
|
|
5
|
+
super(table, name, modifiers);
|
|
6
|
+
}
|
|
7
|
+
count() {
|
|
8
|
+
return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: "count" }));
|
|
9
|
+
}
|
|
13
10
|
}
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
export {
|
|
12
|
+
BasicColumn as default
|
|
13
|
+
};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return new number_column_1.default(this._table, this._name, this._modifiers.concat({ name: 'count' }));
|
|
12
|
-
}
|
|
1
|
+
import NumberColumn from "./number-column";
|
|
2
|
+
import ValueColumn from "./value-column";
|
|
3
|
+
class BooleanColumn extends ValueColumn {
|
|
4
|
+
_type = "boolean";
|
|
5
|
+
constructor(table, name, modifiers = []) {
|
|
6
|
+
super(table, name, modifiers);
|
|
7
|
+
}
|
|
8
|
+
count() {
|
|
9
|
+
return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: "count" }));
|
|
10
|
+
}
|
|
13
11
|
}
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
export {
|
|
13
|
+
BooleanColumn as default
|
|
14
|
+
};
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return new this.constructor(this._table, this._name, this._modifiers.concat({ name: 'max' }));
|
|
39
|
-
}
|
|
1
|
+
import QueryColumnCondition from "../condition/query-column-condition";
|
|
2
|
+
import ValueColumn from "./value-column";
|
|
3
|
+
class ComparableColumn extends ValueColumn {
|
|
4
|
+
constructor(table, name, modifiers = []) {
|
|
5
|
+
super(table, name, modifiers);
|
|
6
|
+
}
|
|
7
|
+
lt(value) {
|
|
8
|
+
return new QueryColumnCondition(this, "lt", value);
|
|
9
|
+
}
|
|
10
|
+
gt(value) {
|
|
11
|
+
return new QueryColumnCondition(this, "gt", value);
|
|
12
|
+
}
|
|
13
|
+
lte(value) {
|
|
14
|
+
return new QueryColumnCondition(this, "lte", value);
|
|
15
|
+
}
|
|
16
|
+
gte(value) {
|
|
17
|
+
return new QueryColumnCondition(this, "gte", value);
|
|
18
|
+
}
|
|
19
|
+
in(values) {
|
|
20
|
+
return new QueryColumnCondition(this, "in", ...values);
|
|
21
|
+
}
|
|
22
|
+
notIn(values) {
|
|
23
|
+
return new QueryColumnCondition(this, "not-in", ...values);
|
|
24
|
+
}
|
|
25
|
+
between(value1, value2) {
|
|
26
|
+
return new QueryColumnCondition(this, "between", value1, value2);
|
|
27
|
+
}
|
|
28
|
+
notBetween(value1, value2) {
|
|
29
|
+
return new QueryColumnCondition(this, "not-between", value1, value2);
|
|
30
|
+
}
|
|
31
|
+
// min/max exists for text columns too, not just numeric and date
|
|
32
|
+
min() {
|
|
33
|
+
return new this.constructor(this._table, this._name, this._modifiers.concat({ name: "min" }));
|
|
34
|
+
}
|
|
35
|
+
max() {
|
|
36
|
+
return new this.constructor(this._table, this._name, this._modifiers.concat({ name: "max" }));
|
|
37
|
+
}
|
|
40
38
|
}
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
var comparable_column_default = ComparableColumn;
|
|
40
|
+
export {
|
|
41
|
+
comparable_column_default as default
|
|
42
|
+
};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return new number_column_1.default(this._table, this._name, this._modifiers.concat({ name: 'count' }));
|
|
12
|
-
}
|
|
1
|
+
import ComparableColumn from "./comparable-column";
|
|
2
|
+
import NumberColumn from "./number-column";
|
|
3
|
+
class DateColumn extends ComparableColumn {
|
|
4
|
+
_type = "date";
|
|
5
|
+
constructor(table, name, modifiers = []) {
|
|
6
|
+
super(table, name, modifiers);
|
|
7
|
+
}
|
|
8
|
+
count() {
|
|
9
|
+
return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: "count" }));
|
|
10
|
+
}
|
|
13
11
|
}
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
export {
|
|
13
|
+
DateColumn as default
|
|
14
|
+
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: 'avg' }));
|
|
17
|
-
}
|
|
1
|
+
import ComparableColumn from "./comparable-column";
|
|
2
|
+
class NumberColumn extends ComparableColumn {
|
|
3
|
+
_type = "number";
|
|
4
|
+
constructor(table, name, modifiers = []) {
|
|
5
|
+
super(table, name, modifiers);
|
|
6
|
+
}
|
|
7
|
+
count() {
|
|
8
|
+
return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: "count" }));
|
|
9
|
+
}
|
|
10
|
+
sum() {
|
|
11
|
+
return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: "sum" }));
|
|
12
|
+
}
|
|
13
|
+
avg() {
|
|
14
|
+
return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: "avg" }));
|
|
15
|
+
}
|
|
18
16
|
}
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
export {
|
|
18
|
+
NumberColumn as default
|
|
19
|
+
};
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const query_column_condition_1 = require("../condition/query-column-condition");
|
|
1
|
+
import QueryColumnCondition from "../condition/query-column-condition";
|
|
4
2
|
class QueryColumn {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return new query_column_condition_1.default(this, 'is-not-null');
|
|
23
|
-
}
|
|
3
|
+
constructor(_table, _name, _modifiers = []) {
|
|
4
|
+
this._table = _table;
|
|
5
|
+
this._name = _name;
|
|
6
|
+
this._modifiers = _modifiers;
|
|
7
|
+
}
|
|
8
|
+
_$type;
|
|
9
|
+
_type;
|
|
10
|
+
// TODO I had to copy-paste the implementation to every child class to avoid a circular dependency
|
|
11
|
+
as(alias) {
|
|
12
|
+
return new this.constructor(this._table, this._name, this._modifiers.concat({ name: "as", params: alias }));
|
|
13
|
+
}
|
|
14
|
+
isNull() {
|
|
15
|
+
return new QueryColumnCondition(this, "is-null");
|
|
16
|
+
}
|
|
17
|
+
isNotNull() {
|
|
18
|
+
return new QueryColumnCondition(this, "is-not-null");
|
|
19
|
+
}
|
|
24
20
|
}
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
var query_column_default = QueryColumn;
|
|
22
|
+
export {
|
|
23
|
+
query_column_default as default
|
|
24
|
+
};
|
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return new query_column_condition_1.default(this, 'not-like', value);
|
|
34
|
-
}
|
|
1
|
+
import ComparableColumn from "./comparable-column";
|
|
2
|
+
import NumberColumn from "./number-column";
|
|
3
|
+
import QueryColumnCondition from "../condition/query-column-condition";
|
|
4
|
+
class StringColumn extends ComparableColumn {
|
|
5
|
+
_type = "string";
|
|
6
|
+
constructor(table, name, modifiers = []) {
|
|
7
|
+
super(table, name, modifiers);
|
|
8
|
+
}
|
|
9
|
+
count() {
|
|
10
|
+
return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: "count" }));
|
|
11
|
+
}
|
|
12
|
+
lower() {
|
|
13
|
+
return new this.constructor(this._table, this._name, this._modifiers.concat({ name: "lower" }));
|
|
14
|
+
}
|
|
15
|
+
upper() {
|
|
16
|
+
return new this.constructor(this._table, this._name, this._modifiers.concat({ name: "upper" }));
|
|
17
|
+
}
|
|
18
|
+
contains(value) {
|
|
19
|
+
return this.like("%" + value + "%");
|
|
20
|
+
}
|
|
21
|
+
startsWith(value) {
|
|
22
|
+
return this.like(value + "%");
|
|
23
|
+
}
|
|
24
|
+
endsWith(value) {
|
|
25
|
+
return this.like("%" + value);
|
|
26
|
+
}
|
|
27
|
+
like(value) {
|
|
28
|
+
return new QueryColumnCondition(this, "like", value);
|
|
29
|
+
}
|
|
30
|
+
notLike(value) {
|
|
31
|
+
return new QueryColumnCondition(this, "not-like", value);
|
|
32
|
+
}
|
|
35
33
|
}
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
export {
|
|
35
|
+
StringColumn as default
|
|
36
|
+
};
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
return new query_column_condition_1.default(this, 'eq', value);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
ne(value) {
|
|
26
|
-
return new query_column_condition_1.default(this, 'ne', value);
|
|
1
|
+
import QueryColumnCondition from "../condition/query-column-condition";
|
|
2
|
+
import QueryOrdering from "../other/query-ordering";
|
|
3
|
+
import QueryColumn from "./query-column";
|
|
4
|
+
import QueryJoinCondition from "../condition/query-join-condition";
|
|
5
|
+
class ValueColumn extends QueryColumn {
|
|
6
|
+
constructor(table, name, modifiers = []) {
|
|
7
|
+
super(table, name, modifiers);
|
|
8
|
+
}
|
|
9
|
+
asc() {
|
|
10
|
+
return new QueryOrdering(this, "ASC");
|
|
11
|
+
}
|
|
12
|
+
desc() {
|
|
13
|
+
return new QueryOrdering(this, "DESC");
|
|
14
|
+
}
|
|
15
|
+
eq(value) {
|
|
16
|
+
if (value instanceof QueryColumn) {
|
|
17
|
+
return new QueryJoinCondition(this, "eq", value);
|
|
18
|
+
} else {
|
|
19
|
+
return new QueryColumnCondition(this, "eq", value);
|
|
27
20
|
}
|
|
21
|
+
}
|
|
22
|
+
ne(value) {
|
|
23
|
+
return new QueryColumnCondition(this, "ne", value);
|
|
24
|
+
}
|
|
28
25
|
}
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
var value_column_default = ValueColumn;
|
|
27
|
+
export {
|
|
28
|
+
value_column_default as default
|
|
29
|
+
};
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return new query_condition_chain_1.default(this, condition, 'or');
|
|
20
|
-
}
|
|
1
|
+
import QueryCondition from "./query-condition";
|
|
2
|
+
import QueryConditionChain from "./query-condition-chain";
|
|
3
|
+
class QueryColumnCondition extends QueryCondition {
|
|
4
|
+
_column;
|
|
5
|
+
_type;
|
|
6
|
+
_values;
|
|
7
|
+
constructor(column, type, ...values) {
|
|
8
|
+
super();
|
|
9
|
+
this._column = column;
|
|
10
|
+
this._type = type;
|
|
11
|
+
this._values = values;
|
|
12
|
+
}
|
|
13
|
+
and(condition) {
|
|
14
|
+
return new QueryConditionChain(this, condition, "and");
|
|
15
|
+
}
|
|
16
|
+
or(condition) {
|
|
17
|
+
return new QueryConditionChain(this, condition, "or");
|
|
18
|
+
}
|
|
21
19
|
}
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
export {
|
|
21
|
+
QueryColumnCondition as default
|
|
22
|
+
};
|
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return new QueryConditionChain(this, condition, 'or');
|
|
31
|
-
}
|
|
1
|
+
import QueryCondition from "./query-condition";
|
|
2
|
+
class QueryConditionChain extends QueryCondition {
|
|
3
|
+
_$type;
|
|
4
|
+
_sibling;
|
|
5
|
+
_child;
|
|
6
|
+
_chainType;
|
|
7
|
+
_parenthesis = false;
|
|
8
|
+
_negation = false;
|
|
9
|
+
constructor(sibling, child, chainType) {
|
|
10
|
+
super();
|
|
11
|
+
this._sibling = sibling;
|
|
12
|
+
this._child = child;
|
|
13
|
+
this._chainType = chainType;
|
|
14
|
+
}
|
|
15
|
+
// TODO how to call this
|
|
16
|
+
$() {
|
|
17
|
+
this._parenthesis = true;
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
not() {
|
|
21
|
+
this._negation = true;
|
|
22
|
+
return this;
|
|
23
|
+
}
|
|
24
|
+
and(condition) {
|
|
25
|
+
return new QueryConditionChain(this, condition, "and");
|
|
26
|
+
}
|
|
27
|
+
or(condition) {
|
|
28
|
+
return new QueryConditionChain(this, condition, "or");
|
|
29
|
+
}
|
|
32
30
|
}
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
export {
|
|
32
|
+
QueryConditionChain as default
|
|
33
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// TODO I had to copy-paste the method implementations to every child class to avoid circular dependencies
|
|
4
1
|
class QueryCondition {
|
|
5
2
|
}
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
var query_condition_default = QueryCondition;
|
|
4
|
+
export {
|
|
5
|
+
query_condition_default as default
|
|
6
|
+
};
|