@sqb/builder 4.9.1 → 4.10.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/cjs/query/delete-query.js +0 -2
- package/cjs/query/insert-query.js +0 -2
- package/cjs/query/query.js +0 -1
- package/cjs/query/returning-query.js +0 -1
- package/cjs/query/select-query.js +0 -10
- package/cjs/query/update-query.js +0 -3
- package/cjs/serialize-context.js +12 -22
- package/cjs/sql-objects/base-field.js +4 -4
- package/cjs/sql-objects/case-statement.js +0 -4
- package/cjs/sql-objects/coalesce-statement.js +0 -2
- package/cjs/sql-objects/count-statement.js +0 -1
- package/cjs/sql-objects/expression.js +0 -3
- package/cjs/sql-objects/field-expression.js +0 -1
- package/cjs/sql-objects/join-statement.js +1 -3
- package/cjs/sql-objects/lower-statement.js +0 -2
- package/cjs/sql-objects/max-statement.js +0 -2
- package/cjs/sql-objects/min-statement.js +0 -2
- package/cjs/sql-objects/operators/comp-operator.js +0 -4
- package/cjs/sql-objects/operators/logical-operator.js +1 -1
- package/cjs/sql-objects/operators/op-and.js +4 -1
- package/cjs/sql-objects/operators/op-between.js +2 -2
- package/cjs/sql-objects/operators/op-eq.js +2 -2
- package/cjs/sql-objects/operators/op-exists.js +2 -2
- package/cjs/sql-objects/operators/op-gt.js +2 -2
- package/cjs/sql-objects/operators/op-gte.js +2 -2
- package/cjs/sql-objects/operators/op-ilike.js +5 -2
- package/cjs/sql-objects/operators/op-in.js +2 -2
- package/cjs/sql-objects/operators/op-is-not.js +2 -2
- package/cjs/sql-objects/operators/op-is.js +2 -2
- package/cjs/sql-objects/operators/op-like.js +2 -2
- package/cjs/sql-objects/operators/op-lt.js +2 -2
- package/cjs/sql-objects/operators/op-lte.js +2 -2
- package/cjs/sql-objects/operators/op-ne.js +2 -2
- package/cjs/sql-objects/operators/op-not-between.js +5 -2
- package/cjs/sql-objects/operators/op-not-exists.js +5 -2
- package/cjs/sql-objects/operators/op-not-ilike.js +5 -2
- package/cjs/sql-objects/operators/op-not-in.js +5 -2
- package/cjs/sql-objects/operators/op-not-like.js +5 -2
- package/cjs/sql-objects/operators/op-not.js +1 -2
- package/cjs/sql-objects/operators/op-or.js +4 -1
- package/cjs/sql-objects/order-column.js +0 -1
- package/cjs/sql-objects/param-expression.js +0 -3
- package/cjs/sql-objects/raw-statement.js +0 -1
- package/cjs/sql-objects/returning-column.js +0 -1
- package/cjs/sql-objects/sequence-getter-statement.js +0 -3
- package/cjs/sql-objects/string-agg-statement.js +0 -4
- package/cjs/sql-objects/table-name.js +0 -3
- package/cjs/sql-objects/upper-statement.js +0 -2
- package/esm/query/delete-query.js +0 -2
- package/esm/query/insert-query.js +0 -2
- package/esm/query/query.js +0 -1
- package/esm/query/returning-query.js +0 -1
- package/esm/query/select-query.js +0 -10
- package/esm/query/update-query.js +0 -3
- package/esm/serialize-context.js +12 -22
- package/esm/sql-objects/base-field.js +4 -4
- package/esm/sql-objects/case-statement.js +0 -4
- package/esm/sql-objects/coalesce-statement.js +0 -2
- package/esm/sql-objects/count-statement.js +0 -1
- package/esm/sql-objects/expression.js +0 -3
- package/esm/sql-objects/field-expression.js +0 -1
- package/esm/sql-objects/join-statement.js +1 -3
- package/esm/sql-objects/lower-statement.js +0 -2
- package/esm/sql-objects/max-statement.js +0 -2
- package/esm/sql-objects/min-statement.js +0 -2
- package/esm/sql-objects/operators/comp-operator.js +0 -4
- package/esm/sql-objects/operators/logical-operator.js +1 -1
- package/esm/sql-objects/operators/op-and.js +4 -1
- package/esm/sql-objects/operators/op-between.js +2 -2
- package/esm/sql-objects/operators/op-eq.js +2 -2
- package/esm/sql-objects/operators/op-exists.js +2 -2
- package/esm/sql-objects/operators/op-gt.js +2 -2
- package/esm/sql-objects/operators/op-gte.js +2 -2
- package/esm/sql-objects/operators/op-ilike.js +5 -2
- package/esm/sql-objects/operators/op-in.js +2 -2
- package/esm/sql-objects/operators/op-is-not.js +2 -2
- package/esm/sql-objects/operators/op-is.js +2 -2
- package/esm/sql-objects/operators/op-like.js +2 -2
- package/esm/sql-objects/operators/op-lt.js +2 -2
- package/esm/sql-objects/operators/op-lte.js +2 -2
- package/esm/sql-objects/operators/op-ne.js +2 -2
- package/esm/sql-objects/operators/op-not-between.js +5 -2
- package/esm/sql-objects/operators/op-not-exists.js +5 -2
- package/esm/sql-objects/operators/op-not-ilike.js +5 -2
- package/esm/sql-objects/operators/op-not-in.js +5 -2
- package/esm/sql-objects/operators/op-not-like.js +5 -2
- package/esm/sql-objects/operators/op-not.js +1 -2
- package/esm/sql-objects/operators/op-or.js +4 -1
- package/esm/sql-objects/order-column.js +0 -1
- package/esm/sql-objects/param-expression.js +0 -3
- package/esm/sql-objects/raw-statement.js +0 -1
- package/esm/sql-objects/returning-column.js +0 -1
- package/esm/sql-objects/sequence-getter-statement.js +0 -3
- package/esm/sql-objects/string-agg-statement.js +0 -4
- package/esm/sql-objects/table-name.js +0 -3
- package/esm/sql-objects/upper-statement.js +0 -2
- package/package.json +7 -13
- package/esm/classes.ns.d.ts +0 -38
- package/esm/enums.d.ts +0 -94
- package/esm/extensions.d.ts +0 -4
- package/esm/helpers.d.ts +0 -4
- package/esm/index.d.ts +0 -20
- package/esm/op.initializers.d.ts +0 -89
- package/esm/query/delete-query.d.ts +0 -24
- package/esm/query/insert-query.d.ts +0 -23
- package/esm/query/query.d.ts +0 -15
- package/esm/query/returning-query.d.ts +0 -14
- package/esm/query/select-query.d.ts +0 -90
- package/esm/query/update-query.d.ts +0 -29
- package/esm/serializable.d.ts +0 -9
- package/esm/serialize-context.d.ts +0 -47
- package/esm/sql-objects/base-field.d.ts +0 -7
- package/esm/sql-objects/case-statement.d.ts +0 -42
- package/esm/sql-objects/coalesce-statement.d.ts +0 -22
- package/esm/sql-objects/count-statement.d.ts +0 -20
- package/esm/sql-objects/expression.d.ts +0 -7
- package/esm/sql-objects/field-expression.d.ts +0 -14
- package/esm/sql-objects/group-column.d.ts +0 -8
- package/esm/sql-objects/join-statement.d.ts +0 -17
- package/esm/sql-objects/lower-statement.d.ts +0 -22
- package/esm/sql-objects/max-statement.d.ts +0 -22
- package/esm/sql-objects/min-statement.d.ts +0 -22
- package/esm/sql-objects/operator.d.ts +0 -5
- package/esm/sql-objects/operators/comp-operator.d.ts +0 -16
- package/esm/sql-objects/operators/logical-operator.d.ts +0 -16
- package/esm/sql-objects/operators/op-and.d.ts +0 -5
- package/esm/sql-objects/operators/op-between.d.ts +0 -11
- package/esm/sql-objects/operators/op-eq.d.ts +0 -8
- package/esm/sql-objects/operators/op-exists.d.ts +0 -11
- package/esm/sql-objects/operators/op-gt.d.ts +0 -8
- package/esm/sql-objects/operators/op-gte.d.ts +0 -8
- package/esm/sql-objects/operators/op-ilike.d.ts +0 -6
- package/esm/sql-objects/operators/op-in.d.ts +0 -9
- package/esm/sql-objects/operators/op-is-not.d.ts +0 -8
- package/esm/sql-objects/operators/op-is.d.ts +0 -8
- package/esm/sql-objects/operators/op-like.d.ts +0 -10
- package/esm/sql-objects/operators/op-lt.d.ts +0 -8
- package/esm/sql-objects/operators/op-lte.d.ts +0 -8
- package/esm/sql-objects/operators/op-ne.d.ts +0 -8
- package/esm/sql-objects/operators/op-not-between.d.ts +0 -6
- package/esm/sql-objects/operators/op-not-exists.d.ts +0 -6
- package/esm/sql-objects/operators/op-not-ilike.d.ts +0 -6
- package/esm/sql-objects/operators/op-not-in.d.ts +0 -6
- package/esm/sql-objects/operators/op-not-like.d.ts +0 -6
- package/esm/sql-objects/operators/op-not.d.ts +0 -11
- package/esm/sql-objects/operators/op-or.d.ts +0 -5
- package/esm/sql-objects/order-column.d.ts +0 -9
- package/esm/sql-objects/param-expression.d.ts +0 -23
- package/esm/sql-objects/raw-statement.d.ts +0 -9
- package/esm/sql-objects/returning-column.d.ts +0 -9
- package/esm/sql-objects/sequence-getter-statement.d.ts +0 -24
- package/esm/sql-objects/string-agg-statement.d.ts +0 -31
- package/esm/sql-objects/table-name.d.ts +0 -11
- package/esm/sql-objects/upper-statement.d.ts +0 -22
- package/esm/sqlobject.initializers.d.ts +0 -55
- package/esm/typeguards.d.ts +0 -36
- package/esm/types.d.ts +0 -33
package/esm/classes.ns.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export * from './query/query.js';
|
|
2
|
-
export * from './query/returning-query.js';
|
|
3
|
-
export * from './query/select-query.js';
|
|
4
|
-
export * from './query/insert-query.js';
|
|
5
|
-
export * from './query/update-query.js';
|
|
6
|
-
export * from './query/delete-query.js';
|
|
7
|
-
export * from './sql-objects/field-expression.js';
|
|
8
|
-
export * from './sql-objects/table-name.js';
|
|
9
|
-
export * from './sql-objects/order-column.js';
|
|
10
|
-
export * from './sql-objects/group-column.js';
|
|
11
|
-
export * from './sql-objects/base-field.js';
|
|
12
|
-
export * from './sql-objects/operator.js';
|
|
13
|
-
export * from './sql-objects/case-statement.js';
|
|
14
|
-
export * from './sql-objects/join-statement.js';
|
|
15
|
-
export * from './sql-objects/raw-statement.js';
|
|
16
|
-
export * from './sql-objects/count-statement.js';
|
|
17
|
-
export * from './sql-objects/operators/logical-operator.js';
|
|
18
|
-
export * from './sql-objects/operators/op-and.js';
|
|
19
|
-
export * from './sql-objects/operators/op-not-exists.js';
|
|
20
|
-
export * from './sql-objects/operators/op-exists.js';
|
|
21
|
-
export * from './sql-objects/operators/op-not-ilike.js';
|
|
22
|
-
export * from './sql-objects/operators/op-not-like.js';
|
|
23
|
-
export * from './sql-objects/operators/op-not-in.js';
|
|
24
|
-
export * from './sql-objects/operators/op-not-between.js';
|
|
25
|
-
export * from './sql-objects/operators/op-ne.js';
|
|
26
|
-
export * from './sql-objects/operators/op-ilike.js';
|
|
27
|
-
export * from './sql-objects/operators/op-like.js';
|
|
28
|
-
export * from './sql-objects/operators/op-is-not.js';
|
|
29
|
-
export * from './sql-objects/operators/op-is.js';
|
|
30
|
-
export * from './sql-objects/operators/op-in.js';
|
|
31
|
-
export * from './sql-objects/operators/op-between.js';
|
|
32
|
-
export * from './sql-objects/operators/op-lte.js';
|
|
33
|
-
export * from './sql-objects/operators/op-lt.js';
|
|
34
|
-
export * from './sql-objects/operators/op-gte.js';
|
|
35
|
-
export * from './sql-objects/operators/op-gt.js';
|
|
36
|
-
export * from './sql-objects/operators/op-eq.js';
|
|
37
|
-
export * from './sql-objects/operators/op-or.js';
|
|
38
|
-
export * from './sql-objects/operators/comp-operator.js';
|
package/esm/enums.d.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
export declare enum JoinType {
|
|
2
|
-
INNER = "inner",
|
|
3
|
-
LEFT = "left",
|
|
4
|
-
LEFT_OUTER = "left outer",
|
|
5
|
-
RIGHT = "right",
|
|
6
|
-
RIGHT_OUTER = "right outer",
|
|
7
|
-
OUTER = "outer",
|
|
8
|
-
FULL_OUTER = "full outer",
|
|
9
|
-
CROSS = "cross"
|
|
10
|
-
}
|
|
11
|
-
export declare enum SerializationType {
|
|
12
|
-
SELECT_QUERY = "select_query",
|
|
13
|
-
SELECT_QUERY_COLUMNS = "select_query.columns",
|
|
14
|
-
SELECT_QUERY_FROM = "select_query.from",
|
|
15
|
-
SELECT_QUERY_JOIN = "select_query.join",
|
|
16
|
-
SELECT_QUERY_GROUPBY = "select_query.groupby",
|
|
17
|
-
SELECT_QUERY_ORDERBY = "select_query.orderby",
|
|
18
|
-
INSERT_QUERY = "insert_query",
|
|
19
|
-
INSERT_QUERY_COLUMNS = "insert_query.columns",
|
|
20
|
-
INSERT_QUERY_VALUES = "insert_query.values",
|
|
21
|
-
UPDATE_QUERY = "update_query",
|
|
22
|
-
UPDATE_QUERY_VALUES = "update_query.values",
|
|
23
|
-
DELETE_QUERY = "delete_query",
|
|
24
|
-
FIELD_NAME = "field_name",
|
|
25
|
-
GROUP_COLUMN = "group_column",
|
|
26
|
-
ORDER_COLUMN = "order_column",
|
|
27
|
-
RETURNING_COLUMN = "returning_column",
|
|
28
|
-
TABLE_NAME = "table_name",
|
|
29
|
-
JOIN = "join",
|
|
30
|
-
JOIN_CONDITIONS = "join_conditions",
|
|
31
|
-
RAW = "raw",
|
|
32
|
-
CASE_STATEMENT = "case_expression",
|
|
33
|
-
COALESCE_STATEMENT = "coalesce_expression",
|
|
34
|
-
LOWER_STATEMENT = "lower_expression",
|
|
35
|
-
UPPER_STATEMENT = "upper_expression",
|
|
36
|
-
MAX_STATEMENT = "max_expression",
|
|
37
|
-
MIN_STATEMENT = "min_expression",
|
|
38
|
-
SEQUENCE_GETTER_STATEMENT = "sequence_getter_statement",
|
|
39
|
-
STRINGAGG_STATEMENT = "StringAGG_expression",
|
|
40
|
-
COUNT_STATEMENT = "count_expression",
|
|
41
|
-
CONDITIONS_BLOCK = "conditions_block",
|
|
42
|
-
COMPARISON_EXPRESSION = "comparison_expression",
|
|
43
|
-
LOGICAL_EXPRESSION = "logical_expression",
|
|
44
|
-
NEGATIVE_EXPRESSION = "negative_expression",
|
|
45
|
-
RETURNING_BLOCK = "returning_block",
|
|
46
|
-
DATE_VALUE = "date_value",
|
|
47
|
-
STRING_VALUE = "string_value",
|
|
48
|
-
BOOLEAN_VALUE = "boolean_value",
|
|
49
|
-
NUMBER_VALUE = "number_value",
|
|
50
|
-
EXTERNAL_PARAMETER = "external_parameter",
|
|
51
|
-
ARRAY = "array"
|
|
52
|
-
}
|
|
53
|
-
export declare enum OperatorType {
|
|
54
|
-
and = "and",
|
|
55
|
-
or = "or",
|
|
56
|
-
eq = "eq",
|
|
57
|
-
ne = "ne",
|
|
58
|
-
gt = "gt",
|
|
59
|
-
gte = "gte",
|
|
60
|
-
lt = "lt",
|
|
61
|
-
lte = "lte",
|
|
62
|
-
between = "between",
|
|
63
|
-
notBetween = "notBetween",
|
|
64
|
-
in = "in",
|
|
65
|
-
notIn = "notIn",
|
|
66
|
-
like = "like",
|
|
67
|
-
notLike = "notLike",
|
|
68
|
-
iLike = "iLike",
|
|
69
|
-
notILike = "notILike",
|
|
70
|
-
is = "is",
|
|
71
|
-
isNot = "isNot",
|
|
72
|
-
exists = "exists",
|
|
73
|
-
notExists = "notExists",
|
|
74
|
-
not = "not"
|
|
75
|
-
}
|
|
76
|
-
export declare enum DataType {
|
|
77
|
-
BOOL = "BOOL",
|
|
78
|
-
CHAR = "CHAR",
|
|
79
|
-
VARCHAR = "VARCHAR",
|
|
80
|
-
SMALLINT = "SMALLINT",
|
|
81
|
-
INTEGER = "INTEGER",
|
|
82
|
-
BIGINT = "BIGINT",
|
|
83
|
-
FLOAT = "FLOAT",
|
|
84
|
-
DOUBLE = "DOUBLE",
|
|
85
|
-
NUMBER = "NUMBER",
|
|
86
|
-
DATE = "DATE",
|
|
87
|
-
TIMESTAMP = "TIMESTAMP",
|
|
88
|
-
TIMESTAMPTZ = "TIMESTAMPTZ",
|
|
89
|
-
TIME = "TIME",
|
|
90
|
-
BINARY = "BINARY",
|
|
91
|
-
TEXT = "TEXT",
|
|
92
|
-
GUID = "GUID",
|
|
93
|
-
JSON = "JSON"
|
|
94
|
-
}
|
package/esm/extensions.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { SerializerExtension } from './types.js';
|
|
2
|
-
export declare let serializers: SerializerExtension[];
|
|
3
|
-
export declare function registerSerializer(...extension: SerializerExtension[]): void;
|
|
4
|
-
export declare function unRegisterSerializer(...extension: SerializerExtension[]): void;
|
package/esm/helpers.d.ts
DELETED
package/esm/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export { registerSerializer, unRegisterSerializer } from './extensions.js';
|
|
2
|
-
export * from './helpers.js';
|
|
3
|
-
export * from './serializable.js';
|
|
4
|
-
export * from './serialize-context.js';
|
|
5
|
-
export * from './query/query.js';
|
|
6
|
-
export * from './query/select-query.js';
|
|
7
|
-
export * from './query/insert-query.js';
|
|
8
|
-
export * from './query/update-query.js';
|
|
9
|
-
export * from './query/delete-query.js';
|
|
10
|
-
export * from './sql-objects/operator.js';
|
|
11
|
-
export * from './sql-objects/operators/logical-operator.js';
|
|
12
|
-
export * from './sql-objects/operators/comp-operator.js';
|
|
13
|
-
export * from './sql-objects/join-statement.js';
|
|
14
|
-
export * from './types.js';
|
|
15
|
-
export * from './enums.js';
|
|
16
|
-
export * from './sqlobject.initializers.js';
|
|
17
|
-
export * from './op.initializers.js';
|
|
18
|
-
export * from './typeguards.js';
|
|
19
|
-
export { op } from './op.initializers.js';
|
|
20
|
-
export * as classes from './classes.ns.js';
|
package/esm/op.initializers.d.ts
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { SelectQuery } from './query/select-query.js';
|
|
2
|
-
import { Serializable } from './serializable.js';
|
|
3
|
-
import { OpAnd } from './sql-objects/operators/op-and.js';
|
|
4
|
-
import { OpEq } from './sql-objects/operators/op-eq.js';
|
|
5
|
-
import { OpExists } from './sql-objects/operators/op-exists.js';
|
|
6
|
-
import { OpGt } from './sql-objects/operators/op-gt.js';
|
|
7
|
-
import { OpGte } from './sql-objects/operators/op-gte.js';
|
|
8
|
-
import { OpILike } from './sql-objects/operators/op-ilike.js';
|
|
9
|
-
import { OpIn } from './sql-objects/operators/op-in.js';
|
|
10
|
-
import { OpIs } from './sql-objects/operators/op-is.js';
|
|
11
|
-
import { OpIsNot } from './sql-objects/operators/op-is-not.js';
|
|
12
|
-
import { OpLike } from './sql-objects/operators/op-like.js';
|
|
13
|
-
import { OpLt } from './sql-objects/operators/op-lt.js';
|
|
14
|
-
import { OpLte } from './sql-objects/operators/op-lte.js';
|
|
15
|
-
import { OpNe } from './sql-objects/operators/op-ne.js';
|
|
16
|
-
import { OpNot } from './sql-objects/operators/op-not.js';
|
|
17
|
-
import { OpNotExists } from './sql-objects/operators/op-not-exists.js';
|
|
18
|
-
import { OpNotILike } from './sql-objects/operators/op-not-ilike.js';
|
|
19
|
-
import { OpNotIn } from './sql-objects/operators/op-not-in.js';
|
|
20
|
-
import { OpNotLike } from './sql-objects/operators/op-not-like.js';
|
|
21
|
-
import { OpOr } from './sql-objects/operators/op-or.js';
|
|
22
|
-
declare function And(...args: (Serializable | Object)[]): OpAnd;
|
|
23
|
-
declare function Or(...args: (Serializable | Object)[]): OpOr;
|
|
24
|
-
declare function Eq(expression: string | Serializable, value: any): OpEq;
|
|
25
|
-
declare function Ne(expression: string | Serializable, value: any): OpNe;
|
|
26
|
-
declare function Gt(expression: string | Serializable, value: any): OpGt;
|
|
27
|
-
declare function Gte(expression: string | Serializable, value: any): OpGte;
|
|
28
|
-
declare function Lt(expression: string | Serializable, value: any): OpLt;
|
|
29
|
-
declare function Lte(expression: string | Serializable, value: any): OpLte;
|
|
30
|
-
declare function Between(expression: string | Serializable, values: Serializable): any;
|
|
31
|
-
declare function Between(expression: string | Serializable, values: any[]): any;
|
|
32
|
-
declare function Between(expression: string | Serializable, value1: any, value2: any): any;
|
|
33
|
-
declare function NotBetween(expression: string | Serializable, values: Serializable): any;
|
|
34
|
-
declare function NotBetween(expression: string | Serializable, values: any[]): any;
|
|
35
|
-
declare function NotBetween(expression: string | Serializable, value1: any, value2: any): any;
|
|
36
|
-
declare function In(expression: string | Serializable, value: any): OpIn;
|
|
37
|
-
declare function NotIn(expression: string | Serializable, value: any): OpNotIn;
|
|
38
|
-
declare function Like(expression: string | Serializable, value: any): OpLike;
|
|
39
|
-
declare function NotLike(expression: string | Serializable, value: any): OpNotLike;
|
|
40
|
-
declare function Ilike(expression: string | Serializable, value: any): OpILike;
|
|
41
|
-
declare function NotILike(expression: string | Serializable, value: any): OpNotILike;
|
|
42
|
-
declare function Is(expression: string | Serializable, value: any): OpIs;
|
|
43
|
-
declare function IsNot(expression: string | Serializable, value: any): OpIsNot;
|
|
44
|
-
declare function Exists(expression: SelectQuery): OpExists;
|
|
45
|
-
declare function NotExists(expression: SelectQuery): OpNotExists;
|
|
46
|
-
declare function Not(expression: Serializable): OpNot;
|
|
47
|
-
declare const op: {
|
|
48
|
-
and: typeof And;
|
|
49
|
-
or: typeof Or;
|
|
50
|
-
eq: typeof Eq;
|
|
51
|
-
'=': typeof Eq;
|
|
52
|
-
ne: typeof Ne;
|
|
53
|
-
'!=': typeof Ne;
|
|
54
|
-
gt: typeof Gt;
|
|
55
|
-
'>': typeof Gt;
|
|
56
|
-
gte: typeof Gte;
|
|
57
|
-
'>=': typeof Gte;
|
|
58
|
-
lt: typeof Lt;
|
|
59
|
-
'<': typeof Lt;
|
|
60
|
-
lte: typeof Lte;
|
|
61
|
-
'<=': typeof Lte;
|
|
62
|
-
between: typeof Between;
|
|
63
|
-
btw: typeof Between;
|
|
64
|
-
notBetween: typeof NotBetween;
|
|
65
|
-
nbtw: typeof NotBetween;
|
|
66
|
-
'!between': typeof NotBetween;
|
|
67
|
-
'!btw': typeof NotBetween;
|
|
68
|
-
in: typeof In;
|
|
69
|
-
notIn: typeof NotIn;
|
|
70
|
-
nin: typeof NotIn;
|
|
71
|
-
'!in': typeof NotIn;
|
|
72
|
-
like: typeof Like;
|
|
73
|
-
not: typeof Not;
|
|
74
|
-
notLike: typeof NotLike;
|
|
75
|
-
nlike: typeof NotLike;
|
|
76
|
-
'!like': typeof NotLike;
|
|
77
|
-
ilike: typeof Ilike;
|
|
78
|
-
notILike: typeof NotILike;
|
|
79
|
-
nilike: typeof NotILike;
|
|
80
|
-
'!ilike': typeof NotILike;
|
|
81
|
-
is: typeof Is;
|
|
82
|
-
isNot: typeof IsNot;
|
|
83
|
-
'!is': typeof IsNot;
|
|
84
|
-
exists: typeof Exists;
|
|
85
|
-
notExists: typeof NotExists;
|
|
86
|
-
'!exists': typeof NotExists;
|
|
87
|
-
};
|
|
88
|
-
export { op };
|
|
89
|
-
export { And, Or, Eq, Eq as Equal, Ne, Ne as NotEqual, Gt, Gt as GreaterThan, Gte, Gte as GreaterAnEqualTo, Lt, Lt as LowerThan, Lte, Lte as LowerAndEqualTo, Between, NotBetween, In, NotIn, NotIn as Nin, Like, NotLike, NotLike as NLike, Ilike, NotILike, NotILike as Nilike, Is, IsNot, Exists, NotExists, Not };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { SerializationType } from '../enums.js';
|
|
2
|
-
import { SerializeContext } from '../serialize-context.js';
|
|
3
|
-
import { LogicalOperator } from '../sql-objects/operators/logical-operator.js';
|
|
4
|
-
import { RawStatement } from '../sql-objects/raw-statement.js';
|
|
5
|
-
import { TableName } from '../sql-objects/table-name.js';
|
|
6
|
-
import { Query } from './query.js';
|
|
7
|
-
export declare class DeleteQuery extends Query {
|
|
8
|
-
_table: TableName | RawStatement;
|
|
9
|
-
_where?: LogicalOperator;
|
|
10
|
-
constructor(tableName: string | RawStatement);
|
|
11
|
-
get _type(): SerializationType;
|
|
12
|
-
/**
|
|
13
|
-
* Defines "where" part of query
|
|
14
|
-
*/
|
|
15
|
-
where(...operator: any[]): this;
|
|
16
|
-
/**
|
|
17
|
-
* Performs serialization
|
|
18
|
-
*/
|
|
19
|
-
_serialize(ctx: SerializeContext): string;
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
_serializeWhere(ctx: SerializeContext): string;
|
|
24
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { SerializationType } from '../enums.js';
|
|
2
|
-
import { SerializeContext } from '../serialize-context.js';
|
|
3
|
-
import type { RawStatement } from '../sql-objects/raw-statement.js';
|
|
4
|
-
import { TableName } from '../sql-objects/table-name.js';
|
|
5
|
-
import { ReturningQuery } from './returning-query.js';
|
|
6
|
-
export declare class InsertQuery extends ReturningQuery {
|
|
7
|
-
_table: TableName | RawStatement;
|
|
8
|
-
_input: any;
|
|
9
|
-
constructor(tableName: string | RawStatement, input: any);
|
|
10
|
-
get _type(): SerializationType;
|
|
11
|
-
/**
|
|
12
|
-
* Performs serialization
|
|
13
|
-
*/
|
|
14
|
-
_serialize(ctx: SerializeContext): string;
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
protected __serializeColumns(ctx: SerializeContext): string;
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
protected __serializeValues(ctx: SerializeContext): string;
|
|
23
|
-
}
|
package/esm/query/query.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
|
-
import { Serializable } from '../serializable.js';
|
|
4
|
-
import { GenerateOptions, GenerateResult } from '../types.js';
|
|
5
|
-
export declare interface Query extends EventEmitter {
|
|
6
|
-
}
|
|
7
|
-
export declare abstract class Query extends Serializable {
|
|
8
|
-
protected _params?: Record<string, any>;
|
|
9
|
-
constructor();
|
|
10
|
-
/**
|
|
11
|
-
* Generates Sql script
|
|
12
|
-
*/
|
|
13
|
-
generate(options?: GenerateOptions): GenerateResult;
|
|
14
|
-
values(obj: any): this;
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SerializeContext } from '../serialize-context.js';
|
|
2
|
-
import { ReturningColumn } from '../sql-objects/returning-column.js';
|
|
3
|
-
import { Query } from './query.js';
|
|
4
|
-
export declare abstract class ReturningQuery extends Query {
|
|
5
|
-
_returningColumns?: ReturningColumn[];
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
returning(...columns: string[]): this;
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
protected __serializeReturning(ctx: SerializeContext): string;
|
|
14
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { SerializationType } from '../enums.js';
|
|
2
|
-
import { Serializable } from '../serializable.js';
|
|
3
|
-
import { SerializeContext } from '../serialize-context.js';
|
|
4
|
-
import { GroupColumn } from '../sql-objects/group-column.js';
|
|
5
|
-
import { JoinStatement } from '../sql-objects/join-statement.js';
|
|
6
|
-
import { LogicalOperator } from '../sql-objects/operators/logical-operator.js';
|
|
7
|
-
import { OrderColumn } from '../sql-objects/order-column.js';
|
|
8
|
-
import { RawStatement } from '../sql-objects/raw-statement.js';
|
|
9
|
-
import { Query } from './query.js';
|
|
10
|
-
export declare class SelectQuery extends Query {
|
|
11
|
-
_tables?: Serializable[];
|
|
12
|
-
_columns?: Serializable[];
|
|
13
|
-
_joins?: JoinStatement[];
|
|
14
|
-
_where?: LogicalOperator;
|
|
15
|
-
_groupBy?: (GroupColumn | Serializable)[];
|
|
16
|
-
_orderBy?: (OrderColumn | Serializable)[];
|
|
17
|
-
_limit?: number;
|
|
18
|
-
_offset?: number;
|
|
19
|
-
_alias?: string;
|
|
20
|
-
_distinct?: boolean;
|
|
21
|
-
constructor(...column: (string | string[] | Serializable)[]);
|
|
22
|
-
get _type(): SerializationType;
|
|
23
|
-
/**
|
|
24
|
-
* Adds columns to query.
|
|
25
|
-
*/
|
|
26
|
-
addColumn(...column: (string | string[] | Serializable)[]): this;
|
|
27
|
-
/**
|
|
28
|
-
* Defines "from" part of query.
|
|
29
|
-
*/
|
|
30
|
-
from(...table: (string | RawStatement | SelectQuery)[]): this;
|
|
31
|
-
/**
|
|
32
|
-
* Adds "join" statements to query
|
|
33
|
-
*/
|
|
34
|
-
join(...join: JoinStatement[]): this;
|
|
35
|
-
/**
|
|
36
|
-
* Defines "where" part of query
|
|
37
|
-
*/
|
|
38
|
-
where(...condition: (Serializable | Object)[]): this;
|
|
39
|
-
/**
|
|
40
|
-
* Defines "where" part of query
|
|
41
|
-
*/
|
|
42
|
-
groupBy(...field: (string | Serializable)[]): this;
|
|
43
|
-
/**
|
|
44
|
-
* Defines "order by" part of query.
|
|
45
|
-
*/
|
|
46
|
-
orderBy(...field: (string | Serializable)[]): this;
|
|
47
|
-
/**
|
|
48
|
-
* Sets alias for sub-select queries
|
|
49
|
-
*/
|
|
50
|
-
as(alias: any): this;
|
|
51
|
-
/**
|
|
52
|
-
* Sets limit for query
|
|
53
|
-
*/
|
|
54
|
-
limit(limit: number): this;
|
|
55
|
-
/**
|
|
56
|
-
* Sets offset for query
|
|
57
|
-
*/
|
|
58
|
-
offset(offset: number): this;
|
|
59
|
-
/**
|
|
60
|
-
* Enables distinct mode
|
|
61
|
-
*/
|
|
62
|
-
distinct(): this;
|
|
63
|
-
onFetch(listener: (...args: any[]) => void): this;
|
|
64
|
-
onceFetch(listener: (...args: any[]) => void): this;
|
|
65
|
-
/**
|
|
66
|
-
* Performs serialization
|
|
67
|
-
*/
|
|
68
|
-
_serialize(ctx: SerializeContext): string;
|
|
69
|
-
/**
|
|
70
|
-
*
|
|
71
|
-
*/
|
|
72
|
-
protected __serializeSelectColumns(ctx: SerializeContext): string;
|
|
73
|
-
/**
|
|
74
|
-
*
|
|
75
|
-
*/
|
|
76
|
-
protected __serializeFrom(ctx: SerializeContext): string;
|
|
77
|
-
/**
|
|
78
|
-
*
|
|
79
|
-
*/
|
|
80
|
-
protected __serializeJoins(ctx: SerializeContext): string;
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
*/
|
|
84
|
-
protected __serializeWhere(ctx: SerializeContext): string;
|
|
85
|
-
/**
|
|
86
|
-
*
|
|
87
|
-
*/
|
|
88
|
-
protected __serializeGroupColumns(ctx: SerializeContext): string;
|
|
89
|
-
protected __serializeOrderColumns(ctx: SerializeContext): string;
|
|
90
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { SerializationType } from '../enums.js';
|
|
2
|
-
import { SerializeContext } from '../serialize-context.js';
|
|
3
|
-
import { LogicalOperator } from '../sql-objects/operators/logical-operator.js';
|
|
4
|
-
import { RawStatement } from '../sql-objects/raw-statement.js';
|
|
5
|
-
import { TableName } from '../sql-objects/table-name.js';
|
|
6
|
-
import { ReturningQuery } from './returning-query.js';
|
|
7
|
-
export declare class UpdateQuery extends ReturningQuery {
|
|
8
|
-
_table: TableName | RawStatement;
|
|
9
|
-
_input: any;
|
|
10
|
-
_where?: LogicalOperator;
|
|
11
|
-
constructor(tableName: string | RawStatement, input: any);
|
|
12
|
-
get _type(): SerializationType;
|
|
13
|
-
/**
|
|
14
|
-
* Defines "where" part of query
|
|
15
|
-
*/
|
|
16
|
-
where(...operator: any[]): this;
|
|
17
|
-
/**
|
|
18
|
-
* Performs serialization
|
|
19
|
-
*/
|
|
20
|
-
_serialize(ctx: SerializeContext): string;
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
protected __serializeValues(ctx: SerializeContext): string;
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
protected __serializeWhere(ctx: SerializeContext): string;
|
|
29
|
-
}
|
package/esm/serializable.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { SerializationType } from './enums.js';
|
|
2
|
-
import type { SerializeContext } from './serialize-context.js';
|
|
3
|
-
export declare abstract class Serializable {
|
|
4
|
-
abstract _type: SerializationType;
|
|
5
|
-
/**
|
|
6
|
-
* Performs serialization
|
|
7
|
-
*/
|
|
8
|
-
abstract _serialize(ctx: SerializeContext): string;
|
|
9
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { DefaultSerializeFunction, GenerateOptions, ParamOptions } from './types.js';
|
|
2
|
-
export declare class SerializeContext implements GenerateOptions {
|
|
3
|
-
readonly reservedWords: string[];
|
|
4
|
-
dialect?: string;
|
|
5
|
-
prettyPrint?: boolean;
|
|
6
|
-
params?: Record<string, any>;
|
|
7
|
-
dialectVersion?: string;
|
|
8
|
-
strictParams?: boolean;
|
|
9
|
-
serializeHooks?: Function[];
|
|
10
|
-
paramOptions?: Record<string, ParamOptions> | ParamOptions[];
|
|
11
|
-
preparedParams?: Record<string, any> | any[];
|
|
12
|
-
returningFields?: {
|
|
13
|
-
field: string;
|
|
14
|
-
alias?: string;
|
|
15
|
-
}[];
|
|
16
|
-
strictParamGenId?: number;
|
|
17
|
-
constructor(opts?: GenerateOptions);
|
|
18
|
-
/**
|
|
19
|
-
* Performs a fallback mechanism, tries hook functions, extensions than default function to serialize
|
|
20
|
-
*/
|
|
21
|
-
serialize(type: string, o: any, fallback: DefaultSerializeFunction): string;
|
|
22
|
-
/**
|
|
23
|
-
* Serializes object
|
|
24
|
-
*/
|
|
25
|
-
anyToSQL(v: any): string;
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
stringToSQL(val: string): string;
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
booleanToSQL(val: any): string;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
numberToSQL(val: any): string;
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
dateToSQL(date: Date): string;
|
|
42
|
-
/**
|
|
43
|
-
* Check if a string value is a reserved word
|
|
44
|
-
*/
|
|
45
|
-
isReservedWord(s: string | undefined | null): boolean;
|
|
46
|
-
escapeReserved(s: string | undefined | null): string;
|
|
47
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { SerializationType } from '../enums.js';
|
|
2
|
-
import { Serializable } from '../serializable.js';
|
|
3
|
-
import { SerializeContext } from '../serialize-context.js';
|
|
4
|
-
import { Operator } from './operator.js';
|
|
5
|
-
import { LogicalOperator } from './operators/logical-operator.js';
|
|
6
|
-
import { RawStatement } from './raw-statement.js';
|
|
7
|
-
export declare class CaseStatement extends Serializable {
|
|
8
|
-
_expressions: {
|
|
9
|
-
condition: Serializable;
|
|
10
|
-
value: any;
|
|
11
|
-
}[];
|
|
12
|
-
_elseValue: any;
|
|
13
|
-
_condition?: LogicalOperator;
|
|
14
|
-
_alias?: string;
|
|
15
|
-
constructor();
|
|
16
|
-
get _type(): SerializationType;
|
|
17
|
-
/**
|
|
18
|
-
* Defines "when" part of Case expression.
|
|
19
|
-
*/
|
|
20
|
-
when(...condition: (Operator | RawStatement)[]): this;
|
|
21
|
-
/**
|
|
22
|
-
* Defines "then" part of Case expression.
|
|
23
|
-
*/
|
|
24
|
-
then(value: any): this;
|
|
25
|
-
/**
|
|
26
|
-
* Defines "else" part of Case expression.
|
|
27
|
-
*/
|
|
28
|
-
else(value: any): this;
|
|
29
|
-
/**
|
|
30
|
-
* Sets alias to case expression.
|
|
31
|
-
*/
|
|
32
|
-
as(alias: string): this;
|
|
33
|
-
/**
|
|
34
|
-
* Performs serialization
|
|
35
|
-
*
|
|
36
|
-
* @param {Object} ctx
|
|
37
|
-
* @return {string}
|
|
38
|
-
* @override
|
|
39
|
-
*/
|
|
40
|
-
_serialize(ctx: SerializeContext): string;
|
|
41
|
-
protected __defaultSerialize(ctx: SerializeContext, o: any): string;
|
|
42
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { SerializationType } from '../enums.js';
|
|
2
|
-
import { Serializable } from '../serializable.js';
|
|
3
|
-
import { SerializeContext } from '../serialize-context.js';
|
|
4
|
-
export declare class CoalesceStatement extends Serializable {
|
|
5
|
-
_expressions: any[];
|
|
6
|
-
_alias?: string;
|
|
7
|
-
constructor(...expressions: any[]);
|
|
8
|
-
get _type(): SerializationType;
|
|
9
|
-
/**
|
|
10
|
-
* Sets alias to case expression.
|
|
11
|
-
*/
|
|
12
|
-
as(alias: string): this;
|
|
13
|
-
/**
|
|
14
|
-
* Performs serialization
|
|
15
|
-
*
|
|
16
|
-
* @param {Object} ctx
|
|
17
|
-
* @return {string}
|
|
18
|
-
* @override
|
|
19
|
-
*/
|
|
20
|
-
_serialize(ctx: SerializeContext): string;
|
|
21
|
-
protected __defaultSerialize(ctx: SerializeContext, o: any): string;
|
|
22
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { SerializationType } from '../enums.js';
|
|
2
|
-
import { Serializable } from '../serializable.js';
|
|
3
|
-
import { SerializeContext } from '../serialize-context.js';
|
|
4
|
-
export declare class CountStatement extends Serializable {
|
|
5
|
-
_alias?: string;
|
|
6
|
-
get _type(): SerializationType;
|
|
7
|
-
/**
|
|
8
|
-
* Sets alias to case expression.
|
|
9
|
-
*/
|
|
10
|
-
as(alias: string): this;
|
|
11
|
-
/**
|
|
12
|
-
* Performs serialization
|
|
13
|
-
*
|
|
14
|
-
* @param {Object} ctx
|
|
15
|
-
* @return {string}
|
|
16
|
-
* @override
|
|
17
|
-
*/
|
|
18
|
-
_serialize(ctx: SerializeContext): string;
|
|
19
|
-
protected __defaultSerialize(ctx: SerializeContext, o: any): string;
|
|
20
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DataType, SerializationType } from '../enums.js';
|
|
2
|
-
import { SerializeContext } from '../serialize-context.js';
|
|
3
|
-
import { BaseField } from './base-field.js';
|
|
4
|
-
export declare class FieldExpression extends BaseField {
|
|
5
|
-
_alias?: string;
|
|
6
|
-
constructor(expression: string, dataType?: DataType, isArray?: boolean);
|
|
7
|
-
constructor(args: {
|
|
8
|
-
expression: string;
|
|
9
|
-
dataType?: DataType;
|
|
10
|
-
isArray?: boolean;
|
|
11
|
-
});
|
|
12
|
-
get _type(): SerializationType;
|
|
13
|
-
_serialize(ctx: SerializeContext): string;
|
|
14
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SerializationType } from '../enums.js';
|
|
2
|
-
import { SerializeContext } from '../serialize-context.js';
|
|
3
|
-
import { BaseField } from './base-field.js';
|
|
4
|
-
export declare class GroupColumn extends BaseField {
|
|
5
|
-
constructor(value: string);
|
|
6
|
-
get _type(): SerializationType;
|
|
7
|
-
_serialize(ctx: SerializeContext): string;
|
|
8
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { JoinType, SerializationType } from '../enums.js';
|
|
2
|
-
import { SelectQuery } from '../query/select-query.js';
|
|
3
|
-
import { Serializable } from '../serializable.js';
|
|
4
|
-
import { SerializeContext } from '../serialize-context.js';
|
|
5
|
-
import { LogicalOperator } from './operators/logical-operator.js';
|
|
6
|
-
import { RawStatement } from './raw-statement.js';
|
|
7
|
-
import { TableName } from './table-name.js';
|
|
8
|
-
export declare class JoinStatement extends Serializable {
|
|
9
|
-
_joinType: JoinType;
|
|
10
|
-
_table: TableName | SelectQuery | RawStatement;
|
|
11
|
-
_conditions: LogicalOperator;
|
|
12
|
-
constructor(joinType: JoinType, table: string | TableName | SelectQuery | RawStatement);
|
|
13
|
-
get _type(): SerializationType;
|
|
14
|
-
on(...conditions: Serializable[]): this;
|
|
15
|
-
_serialize(ctx: SerializeContext): string;
|
|
16
|
-
protected __serializeConditions(ctx: any, join: JoinStatement): any;
|
|
17
|
-
}
|