@sqb/builder 4.26.0 → 5.0.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/index.d.ts +4 -14
- package/index.js +4 -14
- package/op.ns.d.ts +64 -0
- package/op.ns.js +65 -0
- package/package.json +2 -1
- package/serializable.d.ts +10 -3
- package/serializable.js +7 -2
- package/serialize-context.d.ts +2 -2
- package/serialize-context.js +1 -1
- package/{query/delete-query.d.ts → sql/delete.d.ts} +14 -6
- package/{query/delete-query.js → sql/delete.js} +24 -20
- package/sql/elements/base-field.d.ts +18 -0
- package/sql/elements/base-field.js +12 -0
- package/{sql-objects/case-statement.d.ts → sql/elements/case.d.ts} +17 -9
- package/{sql-objects/case-statement.js → sql/elements/case.js} +13 -9
- package/sql/elements/coalesce.d.ts +30 -0
- package/{sql-objects/coalesce-statement.js → sql/elements/coalesce.js} +11 -7
- package/sql/elements/count.d.ts +29 -0
- package/{sql-objects/count-statement.js → sql/elements/count.js} +10 -3
- package/sql/elements/field.d.ts +27 -0
- package/sql/elements/field.js +54 -0
- package/sql/elements/group-column.d.ts +16 -0
- package/{sql-objects → sql/elements}/group-column.js +19 -15
- package/sql/elements/index.d.ts +26 -0
- package/sql/elements/index.js +26 -0
- package/sql/elements/join-cross.d.ts +15 -0
- package/sql/elements/join-cross.js +11 -0
- package/sql/elements/join-full-outer.d.ts +15 -0
- package/sql/elements/join-full-outer.js +11 -0
- package/sql/elements/join-inner.d.ts +15 -0
- package/sql/elements/join-inner.js +11 -0
- package/sql/elements/join-left-outer.d.ts +15 -0
- package/sql/elements/join-left-outer.js +11 -0
- package/sql/elements/join-left.d.ts +15 -0
- package/sql/elements/join-left.js +11 -0
- package/sql/elements/join-outer.d.ts +15 -0
- package/sql/elements/join-outer.js +11 -0
- package/sql/elements/join-right-outer.d.ts +15 -0
- package/sql/elements/join-right-outer.js +11 -0
- package/sql/elements/join-right.d.ts +15 -0
- package/sql/elements/join-right.js +11 -0
- package/sql/elements/join.d.ts +25 -0
- package/{sql-objects/join-statement.js → sql/elements/join.js} +24 -19
- package/sql/elements/lower.d.ts +30 -0
- package/{sql-objects/lower-statement.js → sql/elements/lower.js} +11 -7
- package/{sql-objects/min-statement.d.ts → sql/elements/max.d.ts} +13 -5
- package/{sql-objects/max-statement.js → sql/elements/max.js} +11 -7
- package/{sql-objects/lower-statement.d.ts → sql/elements/min.d.ts} +13 -4
- package/{sql-objects/min-statement.js → sql/elements/min.js} +10 -3
- package/sql/elements/order-column.d.ts +17 -0
- package/sql/elements/order-column.js +43 -0
- package/sql/elements/param.d.ts +36 -0
- package/{sql-objects/param-expression.js → sql/elements/param.js} +26 -13
- package/sql/elements/raw.d.ts +17 -0
- package/sql/elements/raw.js +19 -0
- package/sql/elements/returning-column.d.ts +17 -0
- package/sql/elements/returning-column.js +32 -0
- package/sql/elements/sequence.d.ts +32 -0
- package/{sql-objects/sequence-getter-statement.js → sql/elements/sequence.js} +12 -8
- package/{sql-objects/string-agg-statement.d.ts → sql/elements/string-agg.d.ts} +13 -5
- package/{sql-objects/string-agg-statement.js → sql/elements/string-agg.js} +15 -12
- package/sql/elements/table-name.d.ts +32 -0
- package/sql/elements/table-name.js +59 -0
- package/sql/elements/upper.d.ts +30 -0
- package/{sql-objects/upper-statement.js → sql/elements/upper.js} +11 -7
- package/sql/index.d.ts +9 -0
- package/sql/index.js +9 -0
- package/sql/insert.d.ts +37 -0
- package/{query/insert-query.js → sql/insert.js} +33 -18
- package/sql/operators/and.d.ts +14 -0
- package/sql/operators/and.js +13 -0
- package/sql/operators/between.d.ts +18 -0
- package/{sql-objects/operators/op-between.js → sql/operators/between.js} +20 -8
- package/sql/operators/comp-operator.d.ts +24 -0
- package/{sql-objects → sql}/operators/comp-operator.js +27 -21
- package/sql/operators/eq.d.ts +13 -0
- package/sql/operators/eq.js +23 -0
- package/sql/operators/exists.d.ts +17 -0
- package/sql/operators/exists.js +31 -0
- package/sql/operators/gt.d.ts +13 -0
- package/sql/operators/gt.js +20 -0
- package/sql/operators/gte.d.ts +13 -0
- package/sql/operators/gte.js +20 -0
- package/sql/operators/i-like.d.ts +13 -0
- package/sql/operators/i-like.js +21 -0
- package/sql/operators/in.d.ts +15 -0
- package/sql/operators/in.js +27 -0
- package/sql/operators/index.d.ts +24 -0
- package/sql/operators/index.js +24 -0
- package/sql/operators/is-not.d.ts +13 -0
- package/sql/operators/is-not.js +13 -0
- package/sql/operators/is.d.ts +13 -0
- package/sql/operators/is.js +20 -0
- package/sql/operators/like.d.ts +15 -0
- package/sql/operators/like.js +27 -0
- package/sql/operators/logical-operator.d.ts +15 -0
- package/sql/operators/logical-operator.js +86 -0
- package/sql/operators/lt.d.ts +13 -0
- package/sql/operators/lt.js +20 -0
- package/sql/operators/lte.d.ts +13 -0
- package/sql/operators/lte.js +20 -0
- package/sql/operators/ne.d.ts +13 -0
- package/sql/operators/ne.js +20 -0
- package/sql/operators/not-between.d.ts +15 -0
- package/sql/operators/not-between.js +13 -0
- package/sql/operators/not-exists.d.ts +14 -0
- package/sql/operators/not-exists.js +13 -0
- package/sql/operators/not-i-like.d.ts +13 -0
- package/sql/operators/not-i-like.js +13 -0
- package/sql/operators/not-in.d.ts +13 -0
- package/sql/operators/not-in.js +13 -0
- package/sql/operators/not-like.d.ts +13 -0
- package/sql/operators/not-like.js +13 -0
- package/sql/operators/not.d.ts +18 -0
- package/sql/operators/not.js +20 -0
- package/sql/operators/operator.d.ts +12 -0
- package/sql/operators/operator.js +11 -0
- package/sql/operators/or.d.ts +12 -0
- package/sql/operators/or.js +12 -0
- package/sql/query.d.ts +31 -0
- package/{query → sql}/query.js +13 -7
- package/sql/returning-query.d.ts +23 -0
- package/{query → sql}/returning-query.js +13 -3
- package/{query/select-query.d.ts → sql/select.d.ts} +20 -12
- package/{query/select-query.js → sql/select.js} +37 -18
- package/{query/union-query.d.ts → sql/union.d.ts} +10 -2
- package/{query/union-query.js → sql/union.js} +10 -6
- package/sql/update.d.ts +38 -0
- package/{query/update-query.js → sql/update.js} +34 -25
- package/type-guards.d.ts +21 -0
- package/{typeguards.js → type-guards.js} +10 -10
- package/classes.ns.d.ts +0 -38
- package/classes.ns.js +0 -38
- package/op.initializers.d.ts +0 -89
- package/op.initializers.js +0 -131
- package/query/insert-query.d.ts +0 -23
- package/query/query.d.ts +0 -25
- package/query/returning-query.d.ts +0 -14
- package/query/update-query.d.ts +0 -29
- package/sql-objects/base-field.d.ts +0 -7
- package/sql-objects/base-field.js +0 -7
- package/sql-objects/coalesce-statement.d.ts +0 -22
- package/sql-objects/count-statement.d.ts +0 -20
- package/sql-objects/expression.d.ts +0 -7
- package/sql-objects/expression.js +0 -6
- package/sql-objects/field-expression.d.ts +0 -14
- package/sql-objects/field-expression.js +0 -50
- package/sql-objects/group-column.d.ts +0 -8
- package/sql-objects/join-statement.d.ts +0 -17
- package/sql-objects/max-statement.d.ts +0 -22
- package/sql-objects/operator.d.ts +0 -5
- package/sql-objects/operator.js +0 -3
- package/sql-objects/operators/comp-operator.d.ts +0 -16
- package/sql-objects/operators/logical-operator.d.ts +0 -16
- package/sql-objects/operators/logical-operator.js +0 -81
- package/sql-objects/operators/op-and.d.ts +0 -5
- package/sql-objects/operators/op-and.js +0 -5
- package/sql-objects/operators/op-between.d.ts +0 -11
- package/sql-objects/operators/op-eq.d.ts +0 -8
- package/sql-objects/operators/op-eq.js +0 -9
- package/sql-objects/operators/op-exists.d.ts +0 -11
- package/sql-objects/operators/op-exists.js +0 -27
- package/sql-objects/operators/op-gt.d.ts +0 -8
- package/sql-objects/operators/op-gt.js +0 -9
- package/sql-objects/operators/op-gte.d.ts +0 -8
- package/sql-objects/operators/op-gte.js +0 -9
- package/sql-objects/operators/op-ilike.d.ts +0 -6
- package/sql-objects/operators/op-ilike.js +0 -6
- package/sql-objects/operators/op-in.d.ts +0 -9
- package/sql-objects/operators/op-in.js +0 -15
- package/sql-objects/operators/op-is-not.d.ts +0 -8
- package/sql-objects/operators/op-is-not.js +0 -9
- package/sql-objects/operators/op-is.d.ts +0 -8
- package/sql-objects/operators/op-is.js +0 -9
- package/sql-objects/operators/op-like.d.ts +0 -10
- package/sql-objects/operators/op-like.js +0 -16
- package/sql-objects/operators/op-lt.d.ts +0 -8
- package/sql-objects/operators/op-lt.js +0 -9
- package/sql-objects/operators/op-lte.d.ts +0 -8
- package/sql-objects/operators/op-lte.js +0 -9
- package/sql-objects/operators/op-ne.d.ts +0 -8
- package/sql-objects/operators/op-ne.js +0 -9
- package/sql-objects/operators/op-not-between.d.ts +0 -6
- package/sql-objects/operators/op-not-between.js +0 -6
- package/sql-objects/operators/op-not-exists.d.ts +0 -6
- package/sql-objects/operators/op-not-exists.js +0 -6
- package/sql-objects/operators/op-not-ilike.d.ts +0 -6
- package/sql-objects/operators/op-not-ilike.js +0 -6
- package/sql-objects/operators/op-not-in.d.ts +0 -6
- package/sql-objects/operators/op-not-in.js +0 -6
- package/sql-objects/operators/op-not-like.d.ts +0 -6
- package/sql-objects/operators/op-not-like.js +0 -6
- package/sql-objects/operators/op-not.d.ts +0 -11
- package/sql-objects/operators/op-not.js +0 -17
- package/sql-objects/operators/op-or.d.ts +0 -5
- package/sql-objects/operators/op-or.js +0 -5
- package/sql-objects/order-column.d.ts +0 -9
- package/sql-objects/order-column.js +0 -39
- package/sql-objects/param-expression.d.ts +0 -23
- package/sql-objects/raw-statement.d.ts +0 -9
- package/sql-objects/raw-statement.js +0 -15
- package/sql-objects/returning-column.d.ts +0 -9
- package/sql-objects/returning-column.js +0 -27
- package/sql-objects/sequence-getter-statement.d.ts +0 -24
- package/sql-objects/table-name.d.ts +0 -22
- package/sql-objects/table-name.js +0 -55
- package/sql-objects/upper-statement.d.ts +0 -22
- package/sqlobject.initializers.d.ts +0 -61
- package/sqlobject.initializers.js +0 -115
- package/typeguards.d.ts +0 -37
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { SerializationType } from '../enums.js';
|
|
2
2
|
import { Query } from './query.js';
|
|
3
|
-
|
|
3
|
+
class UnionClass extends Query {
|
|
4
4
|
_queries;
|
|
5
5
|
_unionType;
|
|
6
|
-
constructor(queries, unionType) {
|
|
7
|
-
super();
|
|
8
|
-
this._queries = queries;
|
|
9
|
-
this._unionType = unionType;
|
|
10
|
-
}
|
|
11
6
|
get _type() {
|
|
12
7
|
return SerializationType.UNION_QUERY;
|
|
13
8
|
}
|
|
@@ -26,3 +21,12 @@ export class UnionQuery extends Query {
|
|
|
26
21
|
return o.queries.join(o.unionType === 'all' ? '\nUNION ALL\n' : '\nUNION\n');
|
|
27
22
|
}
|
|
28
23
|
}
|
|
24
|
+
export const Union = function (queries, unionType) {
|
|
25
|
+
if (!(this instanceof Union))
|
|
26
|
+
return new Union(queries, unionType);
|
|
27
|
+
Query.call(this);
|
|
28
|
+
this._queries = queries;
|
|
29
|
+
this._unionType = unionType;
|
|
30
|
+
};
|
|
31
|
+
Union.prototype = UnionClass.prototype;
|
|
32
|
+
Union.prototype.constructor = Union;
|
package/sql/update.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SerializationType } from '../enums.js';
|
|
2
|
+
import { SerializeContext } from '../serialize-context.js';
|
|
3
|
+
import { Raw } from './elements/raw.js';
|
|
4
|
+
import { TableName } from './elements/table-name.js';
|
|
5
|
+
import { LogicalOperator } from './operators/logical-operator.js';
|
|
6
|
+
import { ReturningQuery } from './returning-query.js';
|
|
7
|
+
import type { Select } from './select.js';
|
|
8
|
+
declare class UpdateClass extends ReturningQuery {
|
|
9
|
+
_table: TableName | Raw;
|
|
10
|
+
_input: any;
|
|
11
|
+
_where?: LogicalOperator;
|
|
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
|
+
}
|
|
30
|
+
interface UpdateCtor {
|
|
31
|
+
new (tableName: string | TableName | Raw, input: Record<string, any> | Select | Raw): Update;
|
|
32
|
+
(tableName: string | TableName | Raw, input: Record<string, any> | Select | Raw): Update;
|
|
33
|
+
prototype: Update;
|
|
34
|
+
}
|
|
35
|
+
export declare const Update: UpdateCtor;
|
|
36
|
+
export interface Update extends UpdateClass {
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -1,33 +1,15 @@
|
|
|
1
1
|
import { SerializationType } from '../enums.js';
|
|
2
2
|
import { printArray } from '../helpers.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { Serializable } from '../serializable.js';
|
|
4
|
+
import { isRaw } from '../type-guards.js';
|
|
5
|
+
import { TableName } from './elements/table-name.js';
|
|
6
|
+
import { And } from './operators/and.js';
|
|
7
|
+
import { Query } from './query.js';
|
|
6
8
|
import { ReturningQuery } from './returning-query.js';
|
|
7
|
-
|
|
9
|
+
class UpdateClass extends ReturningQuery {
|
|
8
10
|
_table;
|
|
9
11
|
_input;
|
|
10
12
|
_where;
|
|
11
|
-
constructor(tableName, input) {
|
|
12
|
-
super();
|
|
13
|
-
if (!(tableName &&
|
|
14
|
-
(tableName instanceof TableName ||
|
|
15
|
-
typeof tableName === 'string' ||
|
|
16
|
-
isRawStatement(tableName)))) {
|
|
17
|
-
throw new TypeError('String or Raw instance required as first argument (tableName) for UpdateQuery');
|
|
18
|
-
}
|
|
19
|
-
if (!input ||
|
|
20
|
-
!((typeof input === 'object' && !Array.isArray(input)) || input.isSelect)) {
|
|
21
|
-
throw new TypeError('Object or Raw instance required as second argument (input) for UpdateQuery');
|
|
22
|
-
}
|
|
23
|
-
this._table =
|
|
24
|
-
tableName instanceof TableName
|
|
25
|
-
? tableName
|
|
26
|
-
: typeof tableName === 'string'
|
|
27
|
-
? new TableName(tableName)
|
|
28
|
-
: tableName;
|
|
29
|
-
this._input = input;
|
|
30
|
-
}
|
|
31
13
|
get _type() {
|
|
32
14
|
return SerializationType.UPDATE_QUERY;
|
|
33
15
|
}
|
|
@@ -35,7 +17,7 @@ export class UpdateQuery extends ReturningQuery {
|
|
|
35
17
|
* Defines "where" part of query
|
|
36
18
|
*/
|
|
37
19
|
where(...operator) {
|
|
38
|
-
this._where = this._where || new
|
|
20
|
+
this._where = this._where || new And();
|
|
39
21
|
this._where.add(...operator);
|
|
40
22
|
return this;
|
|
41
23
|
}
|
|
@@ -86,3 +68,30 @@ export class UpdateQuery extends ReturningQuery {
|
|
|
86
68
|
s ? 'where ' + s : '');
|
|
87
69
|
}
|
|
88
70
|
}
|
|
71
|
+
export const Update = function (tableName, input) {
|
|
72
|
+
if (!(this instanceof Update))
|
|
73
|
+
return new Update(tableName, input);
|
|
74
|
+
Query.call(this);
|
|
75
|
+
if (!(tableName &&
|
|
76
|
+
(tableName instanceof TableName ||
|
|
77
|
+
typeof tableName === 'string' ||
|
|
78
|
+
isRaw(tableName)))) {
|
|
79
|
+
throw new TypeError('String or Raw instance required as first argument (tableName) for Update');
|
|
80
|
+
}
|
|
81
|
+
if (!input ||
|
|
82
|
+
!((typeof input === 'object' && !Array.isArray(input)) ||
|
|
83
|
+
(input instanceof Serializable &&
|
|
84
|
+
(input._type === SerializationType.SELECT_QUERY ||
|
|
85
|
+
input._type === SerializationType.RAW)))) {
|
|
86
|
+
throw new TypeError('Object or Raw instance required as second argument (input) for Update');
|
|
87
|
+
}
|
|
88
|
+
this._table =
|
|
89
|
+
tableName instanceof TableName
|
|
90
|
+
? tableName
|
|
91
|
+
: typeof tableName === 'string'
|
|
92
|
+
? new TableName(tableName)
|
|
93
|
+
: tableName;
|
|
94
|
+
this._input = input;
|
|
95
|
+
};
|
|
96
|
+
Update.prototype = UpdateClass.prototype;
|
|
97
|
+
Update.prototype.constructor = Update;
|
package/type-guards.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Serializable } from './serializable.js';
|
|
2
|
+
import type { Case, CompOperator, Count, Delete, Field, GroupColumn, Insert, Join, LogicalOperator, OrderColumn, Param, Query, Raw, ReturningColumn, Select, TableName, Update } from './sql/index.js';
|
|
3
|
+
export declare function isSerializable(value: any): value is Serializable;
|
|
4
|
+
export declare function isQuery(value: any): value is Query;
|
|
5
|
+
export declare function isRaw(value: any): value is Raw;
|
|
6
|
+
export declare function isSelect(value: any): value is Select;
|
|
7
|
+
export declare function isInsert(value: any): value is Insert;
|
|
8
|
+
export declare function isIUpdate(value: any): value is Update;
|
|
9
|
+
export declare function isDelete(value: any): value is Delete;
|
|
10
|
+
export declare function isJoin(value: any): value is Join;
|
|
11
|
+
export declare function isCase(value: any): value is Case;
|
|
12
|
+
export declare function isCount(value: any): value is Count;
|
|
13
|
+
export declare function isParam(value: any): value is Param;
|
|
14
|
+
export declare function isLogicalOperator(value: any): value is LogicalOperator;
|
|
15
|
+
export declare function isCompOperator(value: any): value is CompOperator;
|
|
16
|
+
export declare function isNot(value: any): value is CompOperator;
|
|
17
|
+
export declare function isSelectColumn(value: any): value is Field;
|
|
18
|
+
export declare function isOrderColumn(value: any): value is OrderColumn;
|
|
19
|
+
export declare function isGroupColumn(value: any): value is GroupColumn;
|
|
20
|
+
export declare function isReturningColumn(value: any): value is ReturningColumn;
|
|
21
|
+
export declare function isTableName(value: any): value is TableName;
|
|
@@ -7,31 +7,31 @@ export function isQuery(value) {
|
|
|
7
7
|
typeof value.generate === 'function' &&
|
|
8
8
|
typeof value.values === 'function');
|
|
9
9
|
}
|
|
10
|
-
export function
|
|
10
|
+
export function isRaw(value) {
|
|
11
11
|
return isSerializable(value) && value._type === SerializationType.RAW;
|
|
12
12
|
}
|
|
13
|
-
export function
|
|
13
|
+
export function isSelect(value) {
|
|
14
14
|
return (isSerializable(value) && value._type === SerializationType.SELECT_QUERY);
|
|
15
15
|
}
|
|
16
|
-
export function
|
|
16
|
+
export function isInsert(value) {
|
|
17
17
|
return (isSerializable(value) && value._type === SerializationType.INSERT_QUERY);
|
|
18
18
|
}
|
|
19
|
-
export function
|
|
19
|
+
export function isIUpdate(value) {
|
|
20
20
|
return (isSerializable(value) && value._type === SerializationType.UPDATE_QUERY);
|
|
21
21
|
}
|
|
22
|
-
export function
|
|
22
|
+
export function isDelete(value) {
|
|
23
23
|
return (isSerializable(value) && value._type === SerializationType.DELETE_QUERY);
|
|
24
24
|
}
|
|
25
|
-
export function
|
|
25
|
+
export function isJoin(value) {
|
|
26
26
|
return isSerializable(value) && value._type === SerializationType.JOIN;
|
|
27
27
|
}
|
|
28
|
-
export function
|
|
28
|
+
export function isCase(value) {
|
|
29
29
|
return (isSerializable(value) && value._type === SerializationType.CASE_STATEMENT);
|
|
30
30
|
}
|
|
31
|
-
export function
|
|
31
|
+
export function isCount(value) {
|
|
32
32
|
return (isSerializable(value) && value._type === SerializationType.COUNT_STATEMENT);
|
|
33
33
|
}
|
|
34
|
-
export function
|
|
34
|
+
export function isParam(value) {
|
|
35
35
|
return (isSerializable(value) &&
|
|
36
36
|
value._type === SerializationType.EXTERNAL_PARAMETER);
|
|
37
37
|
}
|
|
@@ -43,7 +43,7 @@ export function isCompOperator(value) {
|
|
|
43
43
|
return (isSerializable(value) &&
|
|
44
44
|
value._type === SerializationType.COMPARISON_EXPRESSION);
|
|
45
45
|
}
|
|
46
|
-
export function
|
|
46
|
+
export function isNot(value) {
|
|
47
47
|
return (isSerializable(value) &&
|
|
48
48
|
value._type === SerializationType.NEGATIVE_EXPRESSION);
|
|
49
49
|
}
|
package/classes.ns.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export * from './query/delete-query.js';
|
|
2
|
-
export * from './query/insert-query.js';
|
|
3
|
-
export * from './query/query.js';
|
|
4
|
-
export * from './query/returning-query.js';
|
|
5
|
-
export * from './query/select-query.js';
|
|
6
|
-
export * from './query/update-query.js';
|
|
7
|
-
export * from './sql-objects/base-field.js';
|
|
8
|
-
export * from './sql-objects/case-statement.js';
|
|
9
|
-
export * from './sql-objects/count-statement.js';
|
|
10
|
-
export * from './sql-objects/field-expression.js';
|
|
11
|
-
export * from './sql-objects/group-column.js';
|
|
12
|
-
export * from './sql-objects/join-statement.js';
|
|
13
|
-
export * from './sql-objects/operator.js';
|
|
14
|
-
export * from './sql-objects/operators/comp-operator.js';
|
|
15
|
-
export * from './sql-objects/operators/logical-operator.js';
|
|
16
|
-
export * from './sql-objects/operators/op-and.js';
|
|
17
|
-
export * from './sql-objects/operators/op-between.js';
|
|
18
|
-
export * from './sql-objects/operators/op-eq.js';
|
|
19
|
-
export * from './sql-objects/operators/op-exists.js';
|
|
20
|
-
export * from './sql-objects/operators/op-gt.js';
|
|
21
|
-
export * from './sql-objects/operators/op-gte.js';
|
|
22
|
-
export * from './sql-objects/operators/op-ilike.js';
|
|
23
|
-
export * from './sql-objects/operators/op-in.js';
|
|
24
|
-
export * from './sql-objects/operators/op-is.js';
|
|
25
|
-
export * from './sql-objects/operators/op-is-not.js';
|
|
26
|
-
export * from './sql-objects/operators/op-like.js';
|
|
27
|
-
export * from './sql-objects/operators/op-lt.js';
|
|
28
|
-
export * from './sql-objects/operators/op-lte.js';
|
|
29
|
-
export * from './sql-objects/operators/op-ne.js';
|
|
30
|
-
export * from './sql-objects/operators/op-not-between.js';
|
|
31
|
-
export * from './sql-objects/operators/op-not-exists.js';
|
|
32
|
-
export * from './sql-objects/operators/op-not-ilike.js';
|
|
33
|
-
export * from './sql-objects/operators/op-not-in.js';
|
|
34
|
-
export * from './sql-objects/operators/op-not-like.js';
|
|
35
|
-
export * from './sql-objects/operators/op-or.js';
|
|
36
|
-
export * from './sql-objects/order-column.js';
|
|
37
|
-
export * from './sql-objects/raw-statement.js';
|
|
38
|
-
export * from './sql-objects/table-name.js';
|
package/classes.ns.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export * from './query/delete-query.js';
|
|
2
|
-
export * from './query/insert-query.js';
|
|
3
|
-
export * from './query/query.js';
|
|
4
|
-
export * from './query/returning-query.js';
|
|
5
|
-
export * from './query/select-query.js';
|
|
6
|
-
export * from './query/update-query.js';
|
|
7
|
-
export * from './sql-objects/base-field.js';
|
|
8
|
-
export * from './sql-objects/case-statement.js';
|
|
9
|
-
export * from './sql-objects/count-statement.js';
|
|
10
|
-
export * from './sql-objects/field-expression.js';
|
|
11
|
-
export * from './sql-objects/group-column.js';
|
|
12
|
-
export * from './sql-objects/join-statement.js';
|
|
13
|
-
export * from './sql-objects/operator.js';
|
|
14
|
-
export * from './sql-objects/operators/comp-operator.js';
|
|
15
|
-
export * from './sql-objects/operators/logical-operator.js';
|
|
16
|
-
export * from './sql-objects/operators/op-and.js';
|
|
17
|
-
export * from './sql-objects/operators/op-between.js';
|
|
18
|
-
export * from './sql-objects/operators/op-eq.js';
|
|
19
|
-
export * from './sql-objects/operators/op-exists.js';
|
|
20
|
-
export * from './sql-objects/operators/op-gt.js';
|
|
21
|
-
export * from './sql-objects/operators/op-gte.js';
|
|
22
|
-
export * from './sql-objects/operators/op-ilike.js';
|
|
23
|
-
export * from './sql-objects/operators/op-in.js';
|
|
24
|
-
export * from './sql-objects/operators/op-is.js';
|
|
25
|
-
export * from './sql-objects/operators/op-is-not.js';
|
|
26
|
-
export * from './sql-objects/operators/op-like.js';
|
|
27
|
-
export * from './sql-objects/operators/op-lt.js';
|
|
28
|
-
export * from './sql-objects/operators/op-lte.js';
|
|
29
|
-
export * from './sql-objects/operators/op-ne.js';
|
|
30
|
-
export * from './sql-objects/operators/op-not-between.js';
|
|
31
|
-
export * from './sql-objects/operators/op-not-exists.js';
|
|
32
|
-
export * from './sql-objects/operators/op-not-ilike.js';
|
|
33
|
-
export * from './sql-objects/operators/op-not-in.js';
|
|
34
|
-
export * from './sql-objects/operators/op-not-like.js';
|
|
35
|
-
export * from './sql-objects/operators/op-or.js';
|
|
36
|
-
export * from './sql-objects/order-column.js';
|
|
37
|
-
export * from './sql-objects/raw-statement.js';
|
|
38
|
-
export * from './sql-objects/table-name.js';
|
package/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 { Operator } from './sql-objects/operator.js';
|
|
4
|
-
import { OpAnd } from './sql-objects/operators/op-and.js';
|
|
5
|
-
import { OpEq } from './sql-objects/operators/op-eq.js';
|
|
6
|
-
import { OpExists } from './sql-objects/operators/op-exists.js';
|
|
7
|
-
import { OpGt } from './sql-objects/operators/op-gt.js';
|
|
8
|
-
import { OpGte } from './sql-objects/operators/op-gte.js';
|
|
9
|
-
import { OpILike } from './sql-objects/operators/op-ilike.js';
|
|
10
|
-
import { OpIn } from './sql-objects/operators/op-in.js';
|
|
11
|
-
import { OpIs } from './sql-objects/operators/op-is.js';
|
|
12
|
-
import { OpIsNot } from './sql-objects/operators/op-is-not.js';
|
|
13
|
-
import { OpLike } from './sql-objects/operators/op-like.js';
|
|
14
|
-
import { OpLt } from './sql-objects/operators/op-lt.js';
|
|
15
|
-
import { OpLte } from './sql-objects/operators/op-lte.js';
|
|
16
|
-
import { OpNe } from './sql-objects/operators/op-ne.js';
|
|
17
|
-
import { OpNot } from './sql-objects/operators/op-not.js';
|
|
18
|
-
import { OpNotExists } from './sql-objects/operators/op-not-exists.js';
|
|
19
|
-
import { OpNotILike } from './sql-objects/operators/op-not-ilike.js';
|
|
20
|
-
import { OpNotIn } from './sql-objects/operators/op-not-in.js';
|
|
21
|
-
import { OpNotLike } from './sql-objects/operators/op-not-like.js';
|
|
22
|
-
import { OpOr } from './sql-objects/operators/op-or.js';
|
|
23
|
-
import { RawStatement } from './sql-objects/raw-statement.js';
|
|
24
|
-
declare function And(...args: (Operator | RawStatement)[]): OpAnd;
|
|
25
|
-
declare function Or(...args: (Operator | RawStatement)[]): OpOr;
|
|
26
|
-
declare function Eq(expression: string | Serializable, value: any): OpEq;
|
|
27
|
-
declare function Ne(expression: string | Serializable, value: any): OpNe;
|
|
28
|
-
declare function Gt(expression: string | Serializable, value: any): OpGt;
|
|
29
|
-
declare function Gte(expression: string | Serializable, value: any): OpGte;
|
|
30
|
-
declare function Lt(expression: string | Serializable, value: any): OpLt;
|
|
31
|
-
declare function Lte(expression: string | Serializable, value: any): OpLte;
|
|
32
|
-
declare function Between(expression: string | Serializable, values: any[]): any;
|
|
33
|
-
declare function Between(expression: string | Serializable, value1: any, value2: any): 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, Between, Eq, Eq as Equal, Exists, Gte as GreaterAnEqualTo, Gt as GreaterThan, Gt, Gte, Ilike, In, Is, IsNot, Like, Lte as LowerAndEqualTo, Lt as LowerThan, Lt, Lte, Ne, NotILike as Nilike, NotIn as Nin, NotLike as NLike, Not, NotBetween, Ne as NotEqual, NotExists, NotILike, NotIn, NotLike, Or, };
|
package/op.initializers.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { WrapOps } from './sql-objects/operators/logical-operator.js';
|
|
2
|
-
import { OpAnd } from './sql-objects/operators/op-and.js';
|
|
3
|
-
import { OpBetween } from './sql-objects/operators/op-between.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 { OpNotBetween } from './sql-objects/operators/op-not-between.js';
|
|
18
|
-
import { OpNotExists } from './sql-objects/operators/op-not-exists.js';
|
|
19
|
-
import { OpNotILike } from './sql-objects/operators/op-not-ilike.js';
|
|
20
|
-
import { OpNotIn } from './sql-objects/operators/op-not-in.js';
|
|
21
|
-
import { OpNotLike } from './sql-objects/operators/op-not-like.js';
|
|
22
|
-
import { OpOr } from './sql-objects/operators/op-or.js';
|
|
23
|
-
function And(...args) {
|
|
24
|
-
return new OpAnd(...args);
|
|
25
|
-
}
|
|
26
|
-
function Or(...args) {
|
|
27
|
-
return new OpOr(...args);
|
|
28
|
-
}
|
|
29
|
-
function Eq(expression, value) {
|
|
30
|
-
return new OpEq(expression, value);
|
|
31
|
-
}
|
|
32
|
-
function Ne(expression, value) {
|
|
33
|
-
return new OpNe(expression, value);
|
|
34
|
-
}
|
|
35
|
-
function Gt(expression, value) {
|
|
36
|
-
return new OpGt(expression, value);
|
|
37
|
-
}
|
|
38
|
-
function Gte(expression, value) {
|
|
39
|
-
return new OpGte(expression, value);
|
|
40
|
-
}
|
|
41
|
-
function Lt(expression, value) {
|
|
42
|
-
return new OpLt(expression, value);
|
|
43
|
-
}
|
|
44
|
-
function Lte(expression, value) {
|
|
45
|
-
return new OpLte(expression, value);
|
|
46
|
-
}
|
|
47
|
-
function Between(expression, value1, value2) {
|
|
48
|
-
const values = Array.isArray(value1) ? value1 : [value1, value2];
|
|
49
|
-
return new OpBetween(expression, values);
|
|
50
|
-
}
|
|
51
|
-
function NotBetween(expression, value1, value2) {
|
|
52
|
-
const values = Array.isArray(value1) ? value1 : [value1, value2];
|
|
53
|
-
return new OpNotBetween(expression, values);
|
|
54
|
-
}
|
|
55
|
-
function In(expression, value) {
|
|
56
|
-
return new OpIn(expression, value);
|
|
57
|
-
}
|
|
58
|
-
function NotIn(expression, value) {
|
|
59
|
-
return new OpNotIn(expression, value);
|
|
60
|
-
}
|
|
61
|
-
function Like(expression, value) {
|
|
62
|
-
return new OpLike(expression, value);
|
|
63
|
-
}
|
|
64
|
-
function NotLike(expression, value) {
|
|
65
|
-
return new OpNotLike(expression, value);
|
|
66
|
-
}
|
|
67
|
-
function Ilike(expression, value) {
|
|
68
|
-
return new OpILike(expression, value);
|
|
69
|
-
}
|
|
70
|
-
function NotILike(expression, value) {
|
|
71
|
-
return new OpNotILike(expression, value);
|
|
72
|
-
}
|
|
73
|
-
function Is(expression, value) {
|
|
74
|
-
return new OpIs(expression, value);
|
|
75
|
-
}
|
|
76
|
-
function IsNot(expression, value) {
|
|
77
|
-
return new OpIsNot(expression, value);
|
|
78
|
-
}
|
|
79
|
-
function Exists(expression) {
|
|
80
|
-
return new OpExists(expression);
|
|
81
|
-
}
|
|
82
|
-
function NotExists(expression) {
|
|
83
|
-
return new OpNotExists(expression);
|
|
84
|
-
}
|
|
85
|
-
function Not(expression) {
|
|
86
|
-
return new OpNot(expression);
|
|
87
|
-
}
|
|
88
|
-
const op = {
|
|
89
|
-
and: And,
|
|
90
|
-
or: Or,
|
|
91
|
-
eq: Eq,
|
|
92
|
-
'=': Eq,
|
|
93
|
-
ne: Ne,
|
|
94
|
-
'!=': Ne,
|
|
95
|
-
gt: Gt,
|
|
96
|
-
'>': Gt,
|
|
97
|
-
gte: Gte,
|
|
98
|
-
'>=': Gte,
|
|
99
|
-
lt: Lt,
|
|
100
|
-
'<': Lt,
|
|
101
|
-
lte: Lte,
|
|
102
|
-
'<=': Lte,
|
|
103
|
-
between: Between,
|
|
104
|
-
btw: Between,
|
|
105
|
-
notBetween: NotBetween,
|
|
106
|
-
nbtw: NotBetween,
|
|
107
|
-
'!between': NotBetween,
|
|
108
|
-
'!btw': NotBetween,
|
|
109
|
-
in: In,
|
|
110
|
-
notIn: NotIn,
|
|
111
|
-
nin: NotIn,
|
|
112
|
-
'!in': NotIn,
|
|
113
|
-
like: Like,
|
|
114
|
-
not: Not,
|
|
115
|
-
notLike: NotLike,
|
|
116
|
-
nlike: NotLike,
|
|
117
|
-
'!like': NotLike,
|
|
118
|
-
ilike: Ilike,
|
|
119
|
-
notILike: NotILike,
|
|
120
|
-
nilike: NotILike,
|
|
121
|
-
'!ilike': NotILike,
|
|
122
|
-
is: Is,
|
|
123
|
-
isNot: IsNot,
|
|
124
|
-
'!is': IsNot,
|
|
125
|
-
exists: Exists,
|
|
126
|
-
notExists: NotExists,
|
|
127
|
-
'!exists': NotExists,
|
|
128
|
-
};
|
|
129
|
-
Object.assign(WrapOps, op);
|
|
130
|
-
export { op };
|
|
131
|
-
export { And, Between, Eq, Eq as Equal, Exists, Gte as GreaterAnEqualTo, Gt as GreaterThan, Gt, Gte, Ilike, In, Is, IsNot, Like, Lte as LowerAndEqualTo, Lt as LowerThan, Lt, Lte, Ne, NotILike as Nilike, NotIn as Nin, NotLike as NLike, Not, NotBetween, Ne as NotEqual, NotExists, NotILike, NotIn, NotLike, Or, };
|
package/query/insert-query.d.ts
DELETED
|
@@ -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/query/query.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from 'events';
|
|
2
|
-
import { Serializable } from '../serializable.js';
|
|
3
|
-
import { GenerateOptions, GenerateResult } from '../types.js';
|
|
4
|
-
export declare interface Query extends EventEmitter {
|
|
5
|
-
}
|
|
6
|
-
export interface QueryCommentArgs {
|
|
7
|
-
comment: string;
|
|
8
|
-
dialect?: string[];
|
|
9
|
-
}
|
|
10
|
-
export interface QueryIndexHintArgs {
|
|
11
|
-
index: string[];
|
|
12
|
-
dialect?: string[];
|
|
13
|
-
}
|
|
14
|
-
export declare abstract class Query extends Serializable {
|
|
15
|
-
protected _comment: QueryCommentArgs[];
|
|
16
|
-
protected _params?: Record<string, any>;
|
|
17
|
-
constructor();
|
|
18
|
-
/**
|
|
19
|
-
* Generates Sql script
|
|
20
|
-
*/
|
|
21
|
-
generate(options?: GenerateOptions): GenerateResult;
|
|
22
|
-
values(obj: any): this;
|
|
23
|
-
comment(args: QueryCommentArgs): this;
|
|
24
|
-
comment(text: string, dialect?: string[]): this;
|
|
25
|
-
}
|
|
@@ -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
|
-
}
|
package/query/update-query.d.ts
DELETED
|
@@ -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 | TableName | 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
|
-
}
|
|
@@ -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
|
-
}
|