@riao/dbal 3.8.0 → 3.9.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 +3 -3
- package/LICENSE.md +20 -20
- package/README.md +148 -148
- package/builder/builder.d.ts +7 -7
- package/builder/builder.js +19 -19
- package/builder/index.d.ts +2 -2
- package/builder/index.js +7 -7
- package/builder/sql-builder.d.ts +54 -53
- package/builder/sql-builder.js +161 -157
- package/builder/sql-builder.js.map +1 -1
- package/builder/statement-builder.d.ts +12 -12
- package/builder/statement-builder.js +32 -32
- package/column/column-options.d.ts +156 -156
- package/column/column-options.js +2 -2
- package/column/column-type.d.ts +18 -18
- package/column/column-type.js +27 -27
- package/column/column-values.d.ts +34 -34
- package/column/column-values.js +2 -2
- package/column/create-column-template.d.ts +11 -0
- package/column/create-column-template.js +57 -0
- package/column/create-column-template.js.map +1 -0
- package/column/index.d.ts +4 -3
- package/column/index.js +20 -19
- package/column/index.js.map +1 -1
- package/column-pack/date-time/create-timestamp-column.d.ts +2 -2
- package/column-pack/date-time/create-timestamp-column.js +10 -10
- package/column-pack/date-time/index.d.ts +2 -2
- package/column-pack/date-time/index.js +7 -7
- package/column-pack/date-time/update-timestamp-column.d.ts +2 -2
- package/column-pack/date-time/update-timestamp-column.js +14 -14
- package/column-pack/index.d.ts +6 -6
- package/column-pack/index.js +22 -22
- package/column-pack/keys/big-int-key-column.d.ts +2 -2
- package/column-pack/keys/big-int-key-column.js +10 -10
- package/column-pack/keys/index.d.ts +3 -3
- package/column-pack/keys/index.js +9 -9
- package/column-pack/keys/int-key-column.d.ts +2 -2
- package/column-pack/keys/int-key-column.js +10 -10
- package/column-pack/keys/uuid-key-column.d.ts +2 -2
- package/column-pack/keys/uuid-key-column.js +11 -11
- package/column-pack/person/date-of-birth-column.d.ts +2 -2
- package/column-pack/person/date-of-birth-column.js +8 -8
- package/column-pack/person/first-name-column.d.ts +2 -2
- package/column-pack/person/first-name-column.js +9 -9
- package/column-pack/person/index.d.ts +3 -3
- package/column-pack/person/index.js +9 -9
- package/column-pack/person/last-name-column.d.ts +2 -2
- package/column-pack/person/last-name-column.js +9 -9
- package/column-pack/resource/content-column.d.ts +2 -2
- package/column-pack/resource/content-column.js +9 -9
- package/column-pack/resource/description-column.d.ts +2 -2
- package/column-pack/resource/description-column.js +9 -9
- package/column-pack/resource/index.d.ts +6 -6
- package/column-pack/resource/index.js +15 -15
- package/column-pack/resource/is-active-column.d.ts +2 -2
- package/column-pack/resource/is-active-column.js +9 -9
- package/column-pack/resource/name-column.d.ts +2 -2
- package/column-pack/resource/name-column.js +10 -10
- package/column-pack/resource/path-column.d.ts +2 -2
- package/column-pack/resource/path-column.js +11 -11
- package/column-pack/resource/title-column.d.ts +2 -2
- package/column-pack/resource/title-column.js +10 -10
- package/column-pack/system/filename-column.d.ts +2 -2
- package/column-pack/system/filename-column.js +9 -9
- package/column-pack/system/filepath-column.d.ts +2 -2
- package/column-pack/system/filepath-column.js +9 -9
- package/column-pack/system/index.d.ts +4 -4
- package/column-pack/system/index.js +11 -11
- package/column-pack/system/ip-address-column.d.ts +2 -2
- package/column-pack/system/ip-address-column.js +9 -9
- package/column-pack/system/url-column.d.ts +3 -3
- package/column-pack/system/url-column.js +13 -13
- package/column-pack/user/email-column.d.ts +2 -2
- package/column-pack/user/email-column.js +11 -11
- package/column-pack/user/index.d.ts +4 -4
- package/column-pack/user/index.js +11 -11
- package/column-pack/user/password-column.d.ts +2 -2
- package/column-pack/user/password-column.js +10 -10
- package/column-pack/user/temp-email-column.d.ts +2 -2
- package/column-pack/user/temp-email-column.js +5 -5
- package/column-pack/user/username-column.d.ts +2 -2
- package/column-pack/user/username-column.js +11 -11
- package/comparison/comparison-aliases.d.ts +10 -10
- package/comparison/comparison-aliases.js +40 -40
- package/comparison/comparison-token.d.ts +17 -17
- package/comparison/comparison-token.js +15 -15
- package/comparison/comparison.d.ts +13 -13
- package/comparison/comparison.js +71 -71
- package/comparison/index.d.ts +4 -4
- package/comparison/index.js +24 -24
- package/comparison/is-comparison-token.d.ts +2 -2
- package/comparison/is-comparison-token.js +8 -8
- package/config/configure-db.d.ts +14 -14
- package/config/configure-db.js +18 -18
- package/config/database-env.d.ts +16 -16
- package/config/database-env.js +14 -14
- package/config/index.d.ts +2 -2
- package/config/index.js +7 -7
- package/database/connection-options.d.ts +7 -7
- package/database/connection-options.js +2 -2
- package/database/database.d.ts +204 -204
- package/database/database.js +330 -330
- package/database/driver-query.d.ts +10 -10
- package/database/driver-query.js +2 -2
- package/database/driver.d.ts +12 -12
- package/database/driver.js +47 -47
- package/database/get-database-path.d.ts +6 -6
- package/database/get-database-path.js +12 -12
- package/database/index.d.ts +7 -7
- package/database/index.js +26 -26
- package/database/load-database.d.ts +9 -9
- package/database/load-database.js +36 -36
- package/database/transaction.d.ts +8 -8
- package/database/transaction.js +2 -2
- package/ddl/alter-table.d.ts +26 -26
- package/ddl/alter-table.js +2 -2
- package/ddl/create-database.d.ts +3 -3
- package/ddl/create-database.js +2 -2
- package/ddl/create-index.d.ts +5 -5
- package/ddl/create-index.js +2 -2
- package/ddl/create-table.d.ts +8 -8
- package/ddl/create-table.js +2 -2
- package/ddl/create-user.d.ts +4 -4
- package/ddl/create-user.js +2 -2
- package/ddl/ddl-builder.d.ts +96 -96
- package/ddl/ddl-builder.js +565 -565
- package/ddl/ddl-repository.d.ts +135 -135
- package/ddl/ddl-repository.js +228 -228
- package/ddl/drop-database.d.ts +4 -4
- package/ddl/drop-database.js +2 -2
- package/ddl/drop-table.d.ts +4 -4
- package/ddl/drop-table.js +2 -2
- package/ddl/drop-user.d.ts +4 -4
- package/ddl/drop-user.js +2 -2
- package/ddl/foreign-key-constraint.d.ts +19 -19
- package/ddl/foreign-key-constraint.js +2 -2
- package/ddl/grant.d.ts +12 -12
- package/ddl/grant.js +2 -2
- package/ddl/index.d.ts +13 -13
- package/ddl/index.js +23 -23
- package/ddl/truncate.d.ts +3 -3
- package/ddl/truncate.js +2 -2
- package/dml/case-expression.d.ts +16 -16
- package/dml/case-expression.js +11 -11
- package/dml/delete.d.ts +8 -8
- package/dml/delete.js +2 -2
- package/dml/from.d.ts +4 -4
- package/dml/from.js +2 -2
- package/dml/group-by.d.ts +4 -4
- package/dml/group-by.js +2 -2
- package/dml/index.d.ts +11 -11
- package/dml/index.js +30 -30
- package/dml/insert.d.ts +14 -14
- package/dml/insert.js +2 -2
- package/dml/join.d.ts +7 -7
- package/dml/join.js +2 -2
- package/dml/order-by.d.ts +2 -2
- package/dml/order-by.js +2 -2
- package/dml/query-builder.d.ts +125 -106
- package/dml/query-builder.js +991 -793
- package/dml/query-builder.js.map +1 -1
- package/dml/query-repository.d.ts +84 -84
- package/dml/query-repository.js +239 -225
- package/dml/query-repository.js.map +1 -1
- package/dml/select.d.ts +44 -29
- package/dml/select.js +2 -2
- package/dml/set-options.d.ts +5 -5
- package/dml/set-options.js +2 -2
- package/dml/subquery.d.ts +5 -5
- package/dml/subquery.js +10 -10
- package/dml/update.d.ts +11 -11
- package/dml/update.js +2 -2
- package/expression/expression-token.d.ts +11 -11
- package/expression/expression-token.js +12 -12
- package/expression/expression.d.ts +6 -6
- package/expression/expression.js +2 -2
- package/expression/identifier.d.ts +7 -7
- package/expression/identifier.js +15 -15
- package/expression/index.d.ts +7 -7
- package/expression/index.js +25 -25
- package/expression/is-expression-token.d.ts +2 -2
- package/expression/is-expression-token.js +7 -7
- package/expression/key-val-expression.d.ts +7 -7
- package/expression/key-val-expression.js +2 -2
- package/expression/literal.d.ts +3 -3
- package/expression/literal.js +2 -2
- package/expression/logical.d.ts +28 -18
- package/expression/logical.js +54 -30
- package/expression/logical.js.map +1 -1
- package/expression/math.d.ts +17 -17
- package/expression/math.js +36 -36
- package/expression/raw.d.ts +8 -8
- package/expression/raw.js +16 -16
- package/expression/simple-expression.d.ts +8 -8
- package/expression/simple-expression.js +2 -2
- package/functions/function-aliases.d.ts +6 -4
- package/functions/function-aliases.js +16 -12
- package/functions/function-aliases.js.map +1 -1
- package/functions/function-token.d.ts +33 -29
- package/functions/function-token.js +19 -15
- package/functions/function-token.js.map +1 -1
- package/functions/functions.d.ts +23 -19
- package/functions/functions.js +126 -94
- package/functions/functions.js.map +1 -1
- package/functions/index.d.ts +4 -4
- package/functions/index.js +22 -22
- package/functions/is-database-function.d.ts +8 -8
- package/functions/is-database-function.js +14 -14
- package/functions/signatures/count.d.ts +14 -11
- package/functions/signatures/count.js +2 -2
- package/index.d.ts +16 -16
- package/index.js +32 -32
- package/migration/index.d.ts +3 -3
- package/migration/index.js +9 -9
- package/migration/migration-package.d.ts +14 -14
- package/migration/migration-package.js +10 -10
- package/migration/migration-record.d.ts +10 -10
- package/migration/migration-record.js +2 -2
- package/migration/migration-runner.d.ts +33 -33
- package/migration/migration-runner.js +180 -180
- package/migration/migration.d.ts +12 -12
- package/migration/migration.js +27 -27
- package/migration/migrations/001-create-migration-table.d.ts +8 -8
- package/migration/migrations/001-create-migration-table.js +54 -54
- package/migration/migrations/002-add-migration-package-column.d.ts +9 -9
- package/migration/migrations/002-add-migration-package-column.js +44 -44
- package/package.json +1 -1
- package/record/index.d.ts +1 -1
- package/record/index.js +17 -17
- package/record/record.d.ts +2 -2
- package/record/record.js +2 -2
- package/repository/index.d.ts +2 -2
- package/repository/index.js +5 -5
- package/repository/repository-options.d.ts +6 -6
- package/repository/repository-options.js +2 -2
- package/repository/repository.d.ts +29 -29
- package/repository/repository.js +68 -68
- package/schema/index.d.ts +3 -3
- package/schema/index.js +5 -5
- package/schema/schema-query-repository.d.ts +54 -54
- package/schema/schema-query-repository.js +159 -159
- package/schema/schema-table.d.ts +9 -9
- package/schema/schema-table.js +2 -2
- package/schema/schema.d.ts +4 -4
- package/schema/schema.js +2 -2
- package/seed/auto-seed.d.ts +9 -9
- package/seed/auto-seed.js +61 -61
- package/seed/create-seed-table.d.ts +8 -8
- package/seed/create-seed-table.js +64 -64
- package/seed/index.d.ts +4 -4
- package/seed/index.js +9 -9
- package/seed/seed-record.d.ts +11 -11
- package/seed/seed-record.js +2 -2
- package/seed/seed-runner.d.ts +20 -20
- package/seed/seed-runner.js +91 -91
- package/seed/seed.d.ts +12 -12
- package/seed/seed.js +27 -27
- package/tokens/index.d.ts +1 -1
- package/tokens/index.js +5 -5
- package/triggers/index.d.ts +2 -2
- package/triggers/index.js +18 -18
- package/triggers/prebuilt/index.d.ts +1 -1
- package/triggers/prebuilt/index.js +5 -5
- package/triggers/prebuilt/update-timestamp-trigger.d.ts +16 -16
- package/triggers/prebuilt/update-timestamp-trigger.js +24 -24
- package/triggers/trigger-options.d.ts +22 -22
- package/triggers/trigger-options.js +2 -2
- package/triggers/trigger.d.ts +19 -19
- package/triggers/trigger.js +23 -23
package/dml/update.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Expression } from '../expression';
|
|
2
|
-
import { DatabaseRecord } from '../record';
|
|
3
|
-
import { From } from './from';
|
|
4
|
-
import { Join } from './join';
|
|
5
|
-
export interface UpdateOptions<T extends DatabaseRecord = DatabaseRecord> {
|
|
6
|
-
table?: string;
|
|
7
|
-
from?: From;
|
|
8
|
-
join?: Join[];
|
|
9
|
-
set: Partial<T>;
|
|
10
|
-
where?: Expression<T>;
|
|
11
|
-
}
|
|
1
|
+
import { Expression } from '../expression';
|
|
2
|
+
import { DatabaseRecord } from '../record';
|
|
3
|
+
import { From } from './from';
|
|
4
|
+
import { Join } from './join';
|
|
5
|
+
export interface UpdateOptions<T extends DatabaseRecord = DatabaseRecord> {
|
|
6
|
+
table?: string;
|
|
7
|
+
from?: From;
|
|
8
|
+
join?: Join[];
|
|
9
|
+
set: Partial<T>;
|
|
10
|
+
where?: Expression<T>;
|
|
11
|
+
}
|
package/dml/update.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=update.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare enum ExpressionTokenKey {
|
|
2
|
-
IDENTIFIER = "identifier",
|
|
3
|
-
FUNCTION_CALL = "function",
|
|
4
|
-
COMPARISON = "comparison",
|
|
5
|
-
LOGICAL = "logical",
|
|
6
|
-
MATH = "math",
|
|
7
|
-
RAW = "raw"
|
|
8
|
-
}
|
|
9
|
-
export interface ExpressionToken {
|
|
10
|
-
riao_expr: ExpressionTokenKey;
|
|
11
|
-
}
|
|
1
|
+
export declare enum ExpressionTokenKey {
|
|
2
|
+
IDENTIFIER = "identifier",
|
|
3
|
+
FUNCTION_CALL = "function",
|
|
4
|
+
COMPARISON = "comparison",
|
|
5
|
+
LOGICAL = "logical",
|
|
6
|
+
MATH = "math",
|
|
7
|
+
RAW = "raw"
|
|
8
|
+
}
|
|
9
|
+
export interface ExpressionToken {
|
|
10
|
+
riao_expr: ExpressionTokenKey;
|
|
11
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExpressionTokenKey = void 0;
|
|
4
|
-
var ExpressionTokenKey;
|
|
5
|
-
(function (ExpressionTokenKey) {
|
|
6
|
-
ExpressionTokenKey["IDENTIFIER"] = "identifier";
|
|
7
|
-
ExpressionTokenKey["FUNCTION_CALL"] = "function";
|
|
8
|
-
ExpressionTokenKey["COMPARISON"] = "comparison";
|
|
9
|
-
ExpressionTokenKey["LOGICAL"] = "logical";
|
|
10
|
-
ExpressionTokenKey["MATH"] = "math";
|
|
11
|
-
ExpressionTokenKey["RAW"] = "raw";
|
|
12
|
-
})(ExpressionTokenKey = exports.ExpressionTokenKey || (exports.ExpressionTokenKey = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExpressionTokenKey = void 0;
|
|
4
|
+
var ExpressionTokenKey;
|
|
5
|
+
(function (ExpressionTokenKey) {
|
|
6
|
+
ExpressionTokenKey["IDENTIFIER"] = "identifier";
|
|
7
|
+
ExpressionTokenKey["FUNCTION_CALL"] = "function";
|
|
8
|
+
ExpressionTokenKey["COMPARISON"] = "comparison";
|
|
9
|
+
ExpressionTokenKey["LOGICAL"] = "logical";
|
|
10
|
+
ExpressionTokenKey["MATH"] = "math";
|
|
11
|
+
ExpressionTokenKey["RAW"] = "raw";
|
|
12
|
+
})(ExpressionTokenKey = exports.ExpressionTokenKey || (exports.ExpressionTokenKey = {}));
|
|
13
13
|
//# sourceMappingURL=expression-token.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComparisonToken } from '../comparison';
|
|
2
|
-
import { DatabaseRecord } from '../record';
|
|
3
|
-
import { KeyValExpression } from './key-val-expression';
|
|
4
|
-
import { LogicalToken, NotToken } from './logical';
|
|
5
|
-
import { SimpleExpression } from './simple-expression';
|
|
6
|
-
export type Expression<T extends DatabaseRecord = DatabaseRecord> = SimpleExpression | LogicalToken | NotToken | ComparisonToken | KeyValExpression<T> | Expression<T>[];
|
|
1
|
+
import { ComparisonToken } from '../comparison';
|
|
2
|
+
import { DatabaseRecord } from '../record';
|
|
3
|
+
import { KeyValExpression } from './key-val-expression';
|
|
4
|
+
import { ExistsToken, LogicalToken, NotToken } from './logical';
|
|
5
|
+
import { SimpleExpression } from './simple-expression';
|
|
6
|
+
export type Expression<T extends DatabaseRecord = DatabaseRecord> = SimpleExpression | LogicalToken | NotToken | ExistsToken | ComparisonToken | KeyValExpression<T> | Expression<T>[];
|
package/expression/expression.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=expression.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ExpressionToken } from './expression-token';
|
|
2
|
-
export interface Identifier {
|
|
3
|
-
name: string;
|
|
4
|
-
}
|
|
5
|
-
export type IdentifierToken = ExpressionToken & Identifier;
|
|
6
|
-
export declare function identifier(name: string): IdentifierToken;
|
|
7
|
-
export declare function isIdentifierToken(token: ExpressionToken): boolean;
|
|
1
|
+
import { ExpressionToken } from './expression-token';
|
|
2
|
+
export interface Identifier {
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
export type IdentifierToken = ExpressionToken & Identifier;
|
|
6
|
+
export declare function identifier(name: string): IdentifierToken;
|
|
7
|
+
export declare function isIdentifierToken(token: ExpressionToken): boolean;
|
package/expression/identifier.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isIdentifierToken = exports.identifier = void 0;
|
|
4
|
-
const expression_token_1 = require("./expression-token");
|
|
5
|
-
function identifier(name) {
|
|
6
|
-
return {
|
|
7
|
-
riao_expr: expression_token_1.ExpressionTokenKey.IDENTIFIER,
|
|
8
|
-
name,
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
exports.identifier = identifier;
|
|
12
|
-
function isIdentifierToken(token) {
|
|
13
|
-
return token.riao_expr === expression_token_1.ExpressionTokenKey.IDENTIFIER;
|
|
14
|
-
}
|
|
15
|
-
exports.isIdentifierToken = isIdentifierToken;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isIdentifierToken = exports.identifier = void 0;
|
|
4
|
+
const expression_token_1 = require("./expression-token");
|
|
5
|
+
function identifier(name) {
|
|
6
|
+
return {
|
|
7
|
+
riao_expr: expression_token_1.ExpressionTokenKey.IDENTIFIER,
|
|
8
|
+
name,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.identifier = identifier;
|
|
12
|
+
function isIdentifierToken(token) {
|
|
13
|
+
return token.riao_expr === expression_token_1.ExpressionTokenKey.IDENTIFIER;
|
|
14
|
+
}
|
|
15
|
+
exports.isIdentifierToken = isIdentifierToken;
|
|
16
16
|
//# sourceMappingURL=identifier.js.map
|
package/expression/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { Expression } from './expression';
|
|
2
|
-
export { isExpressionToken } from './is-expression-token';
|
|
3
|
-
export { identifier as Identifier, isIdentifierToken } from './identifier';
|
|
4
|
-
export * from './logical';
|
|
5
|
-
export * from './math';
|
|
6
|
-
export * from './raw';
|
|
7
|
-
export { SimpleExpression } from './simple-expression';
|
|
1
|
+
export { Expression } from './expression';
|
|
2
|
+
export { isExpressionToken } from './is-expression-token';
|
|
3
|
+
export { identifier as Identifier, isIdentifierToken } from './identifier';
|
|
4
|
+
export * from './logical';
|
|
5
|
+
export * from './math';
|
|
6
|
+
export * from './raw';
|
|
7
|
+
export { SimpleExpression } from './simple-expression';
|
package/expression/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.isIdentifierToken = exports.Identifier = exports.isExpressionToken = void 0;
|
|
18
|
-
var is_expression_token_1 = require("./is-expression-token");
|
|
19
|
-
Object.defineProperty(exports, "isExpressionToken", { enumerable: true, get: function () { return is_expression_token_1.isExpressionToken; } });
|
|
20
|
-
var identifier_1 = require("./identifier");
|
|
21
|
-
Object.defineProperty(exports, "Identifier", { enumerable: true, get: function () { return identifier_1.identifier; } });
|
|
22
|
-
Object.defineProperty(exports, "isIdentifierToken", { enumerable: true, get: function () { return identifier_1.isIdentifierToken; } });
|
|
23
|
-
__exportStar(require("./logical"), exports);
|
|
24
|
-
__exportStar(require("./math"), exports);
|
|
25
|
-
__exportStar(require("./raw"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.isIdentifierToken = exports.Identifier = exports.isExpressionToken = void 0;
|
|
18
|
+
var is_expression_token_1 = require("./is-expression-token");
|
|
19
|
+
Object.defineProperty(exports, "isExpressionToken", { enumerable: true, get: function () { return is_expression_token_1.isExpressionToken; } });
|
|
20
|
+
var identifier_1 = require("./identifier");
|
|
21
|
+
Object.defineProperty(exports, "Identifier", { enumerable: true, get: function () { return identifier_1.identifier; } });
|
|
22
|
+
Object.defineProperty(exports, "isIdentifierToken", { enumerable: true, get: function () { return identifier_1.isIdentifierToken; } });
|
|
23
|
+
__exportStar(require("./logical"), exports);
|
|
24
|
+
__exportStar(require("./math"), exports);
|
|
25
|
+
__exportStar(require("./raw"), exports);
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ExpressionToken } from './expression-token';
|
|
2
|
-
export declare function isExpressionToken(val: any | ExpressionToken): boolean;
|
|
1
|
+
import { ExpressionToken } from './expression-token';
|
|
2
|
+
export declare function isExpressionToken(val: any | ExpressionToken): boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isExpressionToken = void 0;
|
|
4
|
-
function isExpressionToken(val) {
|
|
5
|
-
return val && typeof val === 'object' && 'riao_expr' in val;
|
|
6
|
-
}
|
|
7
|
-
exports.isExpressionToken = isExpressionToken;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isExpressionToken = void 0;
|
|
4
|
+
function isExpressionToken(val) {
|
|
5
|
+
return val && typeof val === 'object' && 'riao_expr' in val;
|
|
6
|
+
}
|
|
7
|
+
exports.isExpressionToken = isExpressionToken;
|
|
8
8
|
//# sourceMappingURL=is-expression-token.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ComparisonToken } from '../comparison';
|
|
2
|
-
import { DatabaseRecord } from '../record';
|
|
3
|
-
import { NotToken } from './logical';
|
|
4
|
-
import { SimpleExpression } from './simple-expression';
|
|
5
|
-
export type KeyValExpression<T extends DatabaseRecord = DatabaseRecord> = {
|
|
6
|
-
[key in keyof Partial<T>]: SimpleExpression | ComparisonToken | NotToken;
|
|
7
|
-
};
|
|
1
|
+
import { ComparisonToken } from '../comparison';
|
|
2
|
+
import { DatabaseRecord } from '../record';
|
|
3
|
+
import { NotToken } from './logical';
|
|
4
|
+
import { SimpleExpression } from './simple-expression';
|
|
5
|
+
export type KeyValExpression<T extends DatabaseRecord = DatabaseRecord> = {
|
|
6
|
+
[key in keyof Partial<T>]: SimpleExpression | ComparisonToken | NotToken;
|
|
7
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=key-val-expression.js.map
|
package/expression/literal.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
export type Literal = null | boolean | number | bigint | string | Buffer | Date;
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
export type Literal = null | boolean | number | bigint | string | Buffer | Date;
|
package/expression/literal.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=literal.js.map
|
package/expression/logical.d.ts
CHANGED
|
@@ -1,18 +1,28 @@
|
|
|
1
|
-
import { Expression } from './expression';
|
|
2
|
-
import { ExpressionToken } from './expression-token';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { Expression } from './expression';
|
|
2
|
+
import { ExpressionToken } from './expression-token';
|
|
3
|
+
import { Subquery } from '../dml/subquery';
|
|
4
|
+
export declare enum LogicalOperator {
|
|
5
|
+
AND = "AND",
|
|
6
|
+
OR = "OR",
|
|
7
|
+
NOT = "NOT",
|
|
8
|
+
EXISTS = "EXISTS",
|
|
9
|
+
NOT_EXISTS = "NOT_EXISTS"
|
|
10
|
+
}
|
|
11
|
+
export interface LogicalToken extends ExpressionToken {
|
|
12
|
+
op: LogicalOperator;
|
|
13
|
+
}
|
|
14
|
+
export declare function isLogicalToken(token: ExpressionToken): boolean;
|
|
15
|
+
export declare const and: LogicalToken;
|
|
16
|
+
export declare const or: LogicalToken;
|
|
17
|
+
export interface NotToken extends ExpressionToken {
|
|
18
|
+
op: LogicalOperator.NOT;
|
|
19
|
+
expr: Expression;
|
|
20
|
+
}
|
|
21
|
+
export declare function not(expr: Expression): NotToken;
|
|
22
|
+
export interface ExistsToken extends ExpressionToken {
|
|
23
|
+
op: LogicalOperator.EXISTS | LogicalOperator.NOT_EXISTS;
|
|
24
|
+
query: Subquery;
|
|
25
|
+
}
|
|
26
|
+
export declare function exists(query: Subquery): ExistsToken;
|
|
27
|
+
export declare function notExists(query: Subquery): ExistsToken;
|
|
28
|
+
export declare function isExistsToken(token: ExpressionToken): boolean;
|
package/expression/logical.js
CHANGED
|
@@ -1,31 +1,55 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.not = exports.or = exports.and = exports.isLogicalToken = exports.LogicalOperator = void 0;
|
|
4
|
-
const expression_token_1 = require("./expression-token");
|
|
5
|
-
var LogicalOperator;
|
|
6
|
-
(function (LogicalOperator) {
|
|
7
|
-
LogicalOperator["AND"] = "AND";
|
|
8
|
-
LogicalOperator["OR"] = "OR";
|
|
9
|
-
LogicalOperator["NOT"] = "NOT";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isExistsToken = exports.notExists = exports.exists = exports.not = exports.or = exports.and = exports.isLogicalToken = exports.LogicalOperator = void 0;
|
|
4
|
+
const expression_token_1 = require("./expression-token");
|
|
5
|
+
var LogicalOperator;
|
|
6
|
+
(function (LogicalOperator) {
|
|
7
|
+
LogicalOperator["AND"] = "AND";
|
|
8
|
+
LogicalOperator["OR"] = "OR";
|
|
9
|
+
LogicalOperator["NOT"] = "NOT";
|
|
10
|
+
LogicalOperator["EXISTS"] = "EXISTS";
|
|
11
|
+
LogicalOperator["NOT_EXISTS"] = "NOT_EXISTS";
|
|
12
|
+
})(LogicalOperator = exports.LogicalOperator || (exports.LogicalOperator = {}));
|
|
13
|
+
function isLogicalToken(token) {
|
|
14
|
+
return token.riao_expr === expression_token_1.ExpressionTokenKey.LOGICAL;
|
|
15
|
+
}
|
|
16
|
+
exports.isLogicalToken = isLogicalToken;
|
|
17
|
+
exports.and = {
|
|
18
|
+
riao_expr: expression_token_1.ExpressionTokenKey.LOGICAL,
|
|
19
|
+
op: LogicalOperator.AND,
|
|
20
|
+
};
|
|
21
|
+
exports.or = {
|
|
22
|
+
riao_expr: expression_token_1.ExpressionTokenKey.LOGICAL,
|
|
23
|
+
op: LogicalOperator.OR,
|
|
24
|
+
};
|
|
25
|
+
function not(expr) {
|
|
26
|
+
return {
|
|
27
|
+
riao_expr: expression_token_1.ExpressionTokenKey.LOGICAL,
|
|
28
|
+
op: LogicalOperator.NOT,
|
|
29
|
+
expr,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
exports.not = not;
|
|
33
|
+
function exists(query) {
|
|
34
|
+
return {
|
|
35
|
+
riao_expr: expression_token_1.ExpressionTokenKey.LOGICAL,
|
|
36
|
+
op: LogicalOperator.EXISTS,
|
|
37
|
+
query,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
exports.exists = exists;
|
|
41
|
+
function notExists(query) {
|
|
42
|
+
return {
|
|
43
|
+
riao_expr: expression_token_1.ExpressionTokenKey.LOGICAL,
|
|
44
|
+
op: LogicalOperator.NOT_EXISTS,
|
|
45
|
+
query,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
exports.notExists = notExists;
|
|
49
|
+
function isExistsToken(token) {
|
|
50
|
+
return (token.riao_expr === expression_token_1.ExpressionTokenKey.LOGICAL &&
|
|
51
|
+
(token.op === LogicalOperator.EXISTS ||
|
|
52
|
+
token.op === LogicalOperator.NOT_EXISTS));
|
|
53
|
+
}
|
|
54
|
+
exports.isExistsToken = isExistsToken;
|
|
31
55
|
//# sourceMappingURL=logical.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logical.js","sourceRoot":"","sources":["../../../src/expression/logical.ts"],"names":[],"mappings":";;;AACA,yDAAyE;
|
|
1
|
+
{"version":3,"file":"logical.js","sourceRoot":"","sources":["../../../src/expression/logical.ts"],"names":[],"mappings":";;;AACA,yDAAyE;AAGzE,IAAY,eAMX;AAND,WAAY,eAAe;IAC1B,8BAAW,CAAA;IACX,4BAAS,CAAA;IACT,8BAAW,CAAA;IACX,oCAAiB,CAAA;IACjB,4CAAyB,CAAA;AAC1B,CAAC,EANW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAM1B;AAMD,SAAgB,cAAc,CAAC,KAAsB;IACpD,OAAO,KAAK,CAAC,SAAS,KAAK,qCAAkB,CAAC,OAAO,CAAC;AACvD,CAAC;AAFD,wCAEC;AAEY,QAAA,GAAG,GAAiB;IAChC,SAAS,EAAE,qCAAkB,CAAC,OAAO;IACrC,EAAE,EAAE,eAAe,CAAC,GAAG;CACvB,CAAC;AAEW,QAAA,EAAE,GAAiB;IAC/B,SAAS,EAAE,qCAAkB,CAAC,OAAO;IACrC,EAAE,EAAE,eAAe,CAAC,EAAE;CACtB,CAAC;AAOF,SAAgB,GAAG,CAAC,IAAgB;IACnC,OAAO;QACN,SAAS,EAAE,qCAAkB,CAAC,OAAO;QACrC,EAAE,EAAE,eAAe,CAAC,GAAG;QACvB,IAAI;KACJ,CAAC;AACH,CAAC;AAND,kBAMC;AAOD,SAAgB,MAAM,CAAC,KAAe;IACrC,OAAO;QACN,SAAS,EAAE,qCAAkB,CAAC,OAAO;QACrC,EAAE,EAAE,eAAe,CAAC,MAAM;QAC1B,KAAK;KACL,CAAC;AACH,CAAC;AAND,wBAMC;AAED,SAAgB,SAAS,CAAC,KAAe;IACxC,OAAO;QACN,SAAS,EAAE,qCAAkB,CAAC,OAAO;QACrC,EAAE,EAAE,eAAe,CAAC,UAAU;QAC9B,KAAK;KACL,CAAC;AACH,CAAC;AAND,8BAMC;AAED,SAAgB,aAAa,CAAC,KAAsB;IACnD,OAAO,CACN,KAAK,CAAC,SAAS,KAAK,qCAAkB,CAAC,OAAO;QAC9C,CAAE,KAAqB,CAAC,EAAE,KAAK,eAAe,CAAC,MAAM;YACnD,KAAqB,CAAC,EAAE,KAAK,eAAe,CAAC,UAAU,CAAC,CAC1D,CAAC;AACH,CAAC;AAND,sCAMC"}
|
package/expression/math.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ExpressionToken } from './expression-token';
|
|
2
|
-
export declare enum MathOperation {
|
|
3
|
-
ADD = 0,
|
|
4
|
-
SUB = 1,
|
|
5
|
-
MUL = 2,
|
|
6
|
-
DIV = 3,
|
|
7
|
-
MOD = 4
|
|
8
|
-
}
|
|
9
|
-
export interface MathToken extends ExpressionToken {
|
|
10
|
-
op: MathOperation;
|
|
11
|
-
}
|
|
12
|
-
export declare function isMathToken(token: ExpressionToken): boolean;
|
|
13
|
-
export declare const plus: MathToken;
|
|
14
|
-
export declare const minus: MathToken;
|
|
15
|
-
export declare const times: MathToken;
|
|
16
|
-
export declare const divide: MathToken;
|
|
17
|
-
export declare const modulo: MathToken;
|
|
1
|
+
import { ExpressionToken } from './expression-token';
|
|
2
|
+
export declare enum MathOperation {
|
|
3
|
+
ADD = 0,
|
|
4
|
+
SUB = 1,
|
|
5
|
+
MUL = 2,
|
|
6
|
+
DIV = 3,
|
|
7
|
+
MOD = 4
|
|
8
|
+
}
|
|
9
|
+
export interface MathToken extends ExpressionToken {
|
|
10
|
+
op: MathOperation;
|
|
11
|
+
}
|
|
12
|
+
export declare function isMathToken(token: ExpressionToken): boolean;
|
|
13
|
+
export declare const plus: MathToken;
|
|
14
|
+
export declare const minus: MathToken;
|
|
15
|
+
export declare const times: MathToken;
|
|
16
|
+
export declare const divide: MathToken;
|
|
17
|
+
export declare const modulo: MathToken;
|
package/expression/math.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.modulo = exports.divide = exports.times = exports.minus = exports.plus = exports.isMathToken = exports.MathOperation = void 0;
|
|
4
|
-
const expression_token_1 = require("./expression-token");
|
|
5
|
-
var MathOperation;
|
|
6
|
-
(function (MathOperation) {
|
|
7
|
-
MathOperation[MathOperation["ADD"] = 0] = "ADD";
|
|
8
|
-
MathOperation[MathOperation["SUB"] = 1] = "SUB";
|
|
9
|
-
MathOperation[MathOperation["MUL"] = 2] = "MUL";
|
|
10
|
-
MathOperation[MathOperation["DIV"] = 3] = "DIV";
|
|
11
|
-
MathOperation[MathOperation["MOD"] = 4] = "MOD";
|
|
12
|
-
})(MathOperation = exports.MathOperation || (exports.MathOperation = {}));
|
|
13
|
-
function isMathToken(token) {
|
|
14
|
-
return token.riao_expr === expression_token_1.ExpressionTokenKey.MATH;
|
|
15
|
-
}
|
|
16
|
-
exports.isMathToken = isMathToken;
|
|
17
|
-
exports.plus = {
|
|
18
|
-
riao_expr: expression_token_1.ExpressionTokenKey.MATH,
|
|
19
|
-
op: MathOperation.ADD,
|
|
20
|
-
};
|
|
21
|
-
exports.minus = {
|
|
22
|
-
riao_expr: expression_token_1.ExpressionTokenKey.MATH,
|
|
23
|
-
op: MathOperation.SUB,
|
|
24
|
-
};
|
|
25
|
-
exports.times = {
|
|
26
|
-
riao_expr: expression_token_1.ExpressionTokenKey.MATH,
|
|
27
|
-
op: MathOperation.MUL,
|
|
28
|
-
};
|
|
29
|
-
exports.divide = {
|
|
30
|
-
riao_expr: expression_token_1.ExpressionTokenKey.MATH,
|
|
31
|
-
op: MathOperation.DIV,
|
|
32
|
-
};
|
|
33
|
-
exports.modulo = {
|
|
34
|
-
riao_expr: expression_token_1.ExpressionTokenKey.MATH,
|
|
35
|
-
op: MathOperation.MOD,
|
|
36
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.modulo = exports.divide = exports.times = exports.minus = exports.plus = exports.isMathToken = exports.MathOperation = void 0;
|
|
4
|
+
const expression_token_1 = require("./expression-token");
|
|
5
|
+
var MathOperation;
|
|
6
|
+
(function (MathOperation) {
|
|
7
|
+
MathOperation[MathOperation["ADD"] = 0] = "ADD";
|
|
8
|
+
MathOperation[MathOperation["SUB"] = 1] = "SUB";
|
|
9
|
+
MathOperation[MathOperation["MUL"] = 2] = "MUL";
|
|
10
|
+
MathOperation[MathOperation["DIV"] = 3] = "DIV";
|
|
11
|
+
MathOperation[MathOperation["MOD"] = 4] = "MOD";
|
|
12
|
+
})(MathOperation = exports.MathOperation || (exports.MathOperation = {}));
|
|
13
|
+
function isMathToken(token) {
|
|
14
|
+
return token.riao_expr === expression_token_1.ExpressionTokenKey.MATH;
|
|
15
|
+
}
|
|
16
|
+
exports.isMathToken = isMathToken;
|
|
17
|
+
exports.plus = {
|
|
18
|
+
riao_expr: expression_token_1.ExpressionTokenKey.MATH,
|
|
19
|
+
op: MathOperation.ADD,
|
|
20
|
+
};
|
|
21
|
+
exports.minus = {
|
|
22
|
+
riao_expr: expression_token_1.ExpressionTokenKey.MATH,
|
|
23
|
+
op: MathOperation.SUB,
|
|
24
|
+
};
|
|
25
|
+
exports.times = {
|
|
26
|
+
riao_expr: expression_token_1.ExpressionTokenKey.MATH,
|
|
27
|
+
op: MathOperation.MUL,
|
|
28
|
+
};
|
|
29
|
+
exports.divide = {
|
|
30
|
+
riao_expr: expression_token_1.ExpressionTokenKey.MATH,
|
|
31
|
+
op: MathOperation.DIV,
|
|
32
|
+
};
|
|
33
|
+
exports.modulo = {
|
|
34
|
+
riao_expr: expression_token_1.ExpressionTokenKey.MATH,
|
|
35
|
+
op: MathOperation.MOD,
|
|
36
|
+
};
|
|
37
37
|
//# sourceMappingURL=math.js.map
|
package/expression/raw.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ExpressionToken, ExpressionTokenKey } from './expression-token';
|
|
2
|
-
export interface RawExpressionToken extends ExpressionToken {
|
|
3
|
-
riao_expr: ExpressionTokenKey.RAW;
|
|
4
|
-
sql: string;
|
|
5
|
-
params?: any[];
|
|
6
|
-
}
|
|
7
|
-
export declare function isRawExprToken(token: ExpressionToken): boolean;
|
|
8
|
-
export declare function raw(sql: string, params?: any[]): RawExpressionToken;
|
|
1
|
+
import { ExpressionToken, ExpressionTokenKey } from './expression-token';
|
|
2
|
+
export interface RawExpressionToken extends ExpressionToken {
|
|
3
|
+
riao_expr: ExpressionTokenKey.RAW;
|
|
4
|
+
sql: string;
|
|
5
|
+
params?: any[];
|
|
6
|
+
}
|
|
7
|
+
export declare function isRawExprToken(token: ExpressionToken): boolean;
|
|
8
|
+
export declare function raw(sql: string, params?: any[]): RawExpressionToken;
|
package/expression/raw.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.raw = exports.isRawExprToken = void 0;
|
|
4
|
-
const expression_token_1 = require("./expression-token");
|
|
5
|
-
function isRawExprToken(token) {
|
|
6
|
-
return token.riao_expr === expression_token_1.ExpressionTokenKey.RAW;
|
|
7
|
-
}
|
|
8
|
-
exports.isRawExprToken = isRawExprToken;
|
|
9
|
-
function raw(sql, params) {
|
|
10
|
-
return {
|
|
11
|
-
riao_expr: expression_token_1.ExpressionTokenKey.RAW,
|
|
12
|
-
sql,
|
|
13
|
-
params,
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
exports.raw = raw;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.raw = exports.isRawExprToken = void 0;
|
|
4
|
+
const expression_token_1 = require("./expression-token");
|
|
5
|
+
function isRawExprToken(token) {
|
|
6
|
+
return token.riao_expr === expression_token_1.ExpressionTokenKey.RAW;
|
|
7
|
+
}
|
|
8
|
+
exports.isRawExprToken = isRawExprToken;
|
|
9
|
+
function raw(sql, params) {
|
|
10
|
+
return {
|
|
11
|
+
riao_expr: expression_token_1.ExpressionTokenKey.RAW,
|
|
12
|
+
sql,
|
|
13
|
+
params,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
exports.raw = raw;
|
|
17
17
|
//# sourceMappingURL=raw.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IdentifierToken } from './identifier';
|
|
2
|
-
import { Subquery } from '../dml';
|
|
3
|
-
import { Literal } from './literal';
|
|
4
|
-
import { DatabaseFunctionToken } from '../functions';
|
|
5
|
-
import { MathToken } from './math';
|
|
6
|
-
import { RawExpressionToken } from './raw';
|
|
7
|
-
import { CaseExpression } from '../dml/case-expression';
|
|
8
|
-
export type SimpleExpression = Literal | RawExpressionToken | IdentifierToken | MathToken | DatabaseFunctionToken | Subquery | CaseExpression | SimpleExpression[];
|
|
1
|
+
import { IdentifierToken } from './identifier';
|
|
2
|
+
import { Subquery } from '../dml';
|
|
3
|
+
import { Literal } from './literal';
|
|
4
|
+
import { DatabaseFunctionToken } from '../functions';
|
|
5
|
+
import { MathToken } from './math';
|
|
6
|
+
import { RawExpressionToken } from './raw';
|
|
7
|
+
import { CaseExpression } from '../dml/case-expression';
|
|
8
|
+
export type SimpleExpression = Literal | RawExpressionToken | IdentifierToken | MathToken | DatabaseFunctionToken | Subquery | CaseExpression | SimpleExpression[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=simple-expression.js.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { DatabaseFunctionToken } from './function-token';
|
|
2
|
-
import { CountParams } from './signatures/count';
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
1
|
+
import { DatabaseFunctionToken } from './function-token';
|
|
2
|
+
import { CountParams } from './signatures/count';
|
|
3
|
+
import { Expression } from '../expression';
|
|
4
|
+
export declare function count(params: CountParams): DatabaseFunctionToken;
|
|
5
|
+
export declare function currentTimestamp(): DatabaseFunctionToken;
|
|
6
|
+
export declare function round(expr: Expression, decimals?: number): DatabaseFunctionToken;
|