@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
|
@@ -1,156 +1,156 @@
|
|
|
1
|
-
import { DatabaseFunctionToken } from '../functions/function-token';
|
|
2
|
-
import { ColumnType } from './column-type';
|
|
3
|
-
import * as DataTypes from './column-values';
|
|
4
|
-
import { InlineForeignKeyConstraint } from '../ddl/foreign-key-constraint';
|
|
5
|
-
import { DatabaseTrigger } from '../triggers';
|
|
6
|
-
/**
|
|
7
|
-
* Base interface for column options
|
|
8
|
-
*/
|
|
9
|
-
export interface BaseColumnOptions {
|
|
10
|
-
name: string;
|
|
11
|
-
type: ColumnType;
|
|
12
|
-
default?: null | string | DataTypes.ColumnValue | DatabaseFunctionToken;
|
|
13
|
-
primaryKey?: boolean;
|
|
14
|
-
required?: boolean;
|
|
15
|
-
isUnique?: boolean;
|
|
16
|
-
fk?: InlineForeignKeyConstraint;
|
|
17
|
-
triggers?: (options: ColumnTriggerOptions) => DatabaseTrigger[];
|
|
18
|
-
}
|
|
19
|
-
export interface ColumnTriggerOptions {
|
|
20
|
-
table: string;
|
|
21
|
-
column: string;
|
|
22
|
-
idColumn: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* UUID column options
|
|
26
|
-
*/
|
|
27
|
-
export interface UUIDColumnOptions extends BaseColumnOptions {
|
|
28
|
-
type: ColumnType.UUID;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Bool column options
|
|
32
|
-
*/
|
|
33
|
-
export interface BoolColumnOptions extends BaseColumnOptions {
|
|
34
|
-
default?: DataTypes.BoolValue | DatabaseFunctionToken<ColumnType.BOOL>;
|
|
35
|
-
type: ColumnType.BOOL;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Base class for integer column options
|
|
39
|
-
*/
|
|
40
|
-
export interface BaseIntColumnOptions extends BaseColumnOptions {
|
|
41
|
-
default?: DataTypes.IntegerValue | DatabaseFunctionToken<ColumnType.INT>;
|
|
42
|
-
autoIncrement?: boolean;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Tiny int column options
|
|
46
|
-
*/
|
|
47
|
-
export interface TinyIntColumnOptions extends BaseIntColumnOptions {
|
|
48
|
-
type: ColumnType.TINYINT;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Small int column options
|
|
52
|
-
*/
|
|
53
|
-
export interface SmallIntColumnOptions extends BaseIntColumnOptions {
|
|
54
|
-
type: ColumnType.SMALLINT;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Int column options
|
|
58
|
-
*/
|
|
59
|
-
export interface IntColumnOptions extends BaseIntColumnOptions {
|
|
60
|
-
type: ColumnType.INT;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Big int column options
|
|
64
|
-
*/
|
|
65
|
-
export interface BigIntColumnOptions extends BaseIntColumnOptions {
|
|
66
|
-
type: ColumnType.BIGINT;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Base interface for decimal types
|
|
70
|
-
*/
|
|
71
|
-
export interface BaseDecimalColumnOptions extends BaseColumnOptions {
|
|
72
|
-
default?: DataTypes.DecimalValue | DatabaseFunctionToken<ColumnType.DECIMAL>;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Decimal column options
|
|
76
|
-
*/
|
|
77
|
-
export interface DecimalColumnOptions extends BaseDecimalColumnOptions {
|
|
78
|
-
significant: number;
|
|
79
|
-
decimal: number;
|
|
80
|
-
type: ColumnType.DECIMAL;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Float column options
|
|
84
|
-
*/
|
|
85
|
-
export interface FloatColumnOptions extends BaseDecimalColumnOptions {
|
|
86
|
-
type: ColumnType.FLOAT;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Double column options
|
|
90
|
-
*/
|
|
91
|
-
export interface DoubleColumnOptions extends BaseDecimalColumnOptions {
|
|
92
|
-
type: ColumnType.DOUBLE;
|
|
93
|
-
}
|
|
94
|
-
export type DateDefaultValues = null | string | DataTypes.DateValue;
|
|
95
|
-
/**
|
|
96
|
-
* Date column options
|
|
97
|
-
*/
|
|
98
|
-
export interface DateColumnOptions extends BaseColumnOptions {
|
|
99
|
-
default?: DateDefaultValues | DatabaseFunctionToken<ColumnType.DATE>;
|
|
100
|
-
type: ColumnType.DATE;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Time column options
|
|
104
|
-
*/
|
|
105
|
-
export interface TimeColumnOptions extends BaseColumnOptions {
|
|
106
|
-
default?: DateDefaultValues | DatabaseFunctionToken<ColumnType.TIME>;
|
|
107
|
-
type: ColumnType.TIME;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Timestamp column options
|
|
111
|
-
*/
|
|
112
|
-
export interface TimestampColumnOptions extends BaseColumnOptions {
|
|
113
|
-
default?: DateDefaultValues | DatabaseFunctionToken<ColumnType.TIMESTAMP>;
|
|
114
|
-
type: ColumnType.TIMESTAMP;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Base interface for text column options
|
|
118
|
-
*/
|
|
119
|
-
export interface BaseTextColumnOptions extends BaseColumnOptions {
|
|
120
|
-
default?: DataTypes.TextValue | DatabaseFunctionToken<ColumnType.CHAR> | DatabaseFunctionToken<ColumnType.VARCHAR> | DatabaseFunctionToken<ColumnType.TEXT>;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Char column options
|
|
124
|
-
*/
|
|
125
|
-
export interface CharColumnOptions extends BaseTextColumnOptions {
|
|
126
|
-
type: ColumnType.CHAR;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* VarChar column options
|
|
130
|
-
*/
|
|
131
|
-
export interface VarCharColumnOptions extends BaseTextColumnOptions {
|
|
132
|
-
length: number;
|
|
133
|
-
type: ColumnType.VARCHAR;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Text column options
|
|
137
|
-
*/
|
|
138
|
-
export interface TextColumOptions extends BaseTextColumnOptions {
|
|
139
|
-
type: ColumnType.TEXT;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Base interface for blob column options
|
|
143
|
-
*/
|
|
144
|
-
export interface BaseBlobColumnOptions extends BaseColumnOptions {
|
|
145
|
-
default?: DataTypes.BlobValue | DatabaseFunctionToken<ColumnType.BLOB>;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Blob column options
|
|
149
|
-
*/
|
|
150
|
-
export interface BlobColumnOptions extends BaseBlobColumnOptions {
|
|
151
|
-
type: ColumnType.BLOB;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Column options
|
|
155
|
-
*/
|
|
156
|
-
export type ColumnOptions = UUIDColumnOptions | BoolColumnOptions | TinyIntColumnOptions | SmallIntColumnOptions | IntColumnOptions | BigIntColumnOptions | DecimalColumnOptions | FloatColumnOptions | DoubleColumnOptions | DateColumnOptions | TimeColumnOptions | TimestampColumnOptions | CharColumnOptions | VarCharColumnOptions | TextColumOptions | BlobColumnOptions;
|
|
1
|
+
import { DatabaseFunctionToken } from '../functions/function-token';
|
|
2
|
+
import { ColumnType } from './column-type';
|
|
3
|
+
import * as DataTypes from './column-values';
|
|
4
|
+
import { InlineForeignKeyConstraint } from '../ddl/foreign-key-constraint';
|
|
5
|
+
import { DatabaseTrigger } from '../triggers';
|
|
6
|
+
/**
|
|
7
|
+
* Base interface for column options
|
|
8
|
+
*/
|
|
9
|
+
export interface BaseColumnOptions {
|
|
10
|
+
name: string;
|
|
11
|
+
type: ColumnType;
|
|
12
|
+
default?: null | string | DataTypes.ColumnValue | DatabaseFunctionToken;
|
|
13
|
+
primaryKey?: boolean;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
isUnique?: boolean;
|
|
16
|
+
fk?: InlineForeignKeyConstraint;
|
|
17
|
+
triggers?: (options: ColumnTriggerOptions) => DatabaseTrigger[];
|
|
18
|
+
}
|
|
19
|
+
export interface ColumnTriggerOptions {
|
|
20
|
+
table: string;
|
|
21
|
+
column: string;
|
|
22
|
+
idColumn: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* UUID column options
|
|
26
|
+
*/
|
|
27
|
+
export interface UUIDColumnOptions extends BaseColumnOptions {
|
|
28
|
+
type: ColumnType.UUID;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Bool column options
|
|
32
|
+
*/
|
|
33
|
+
export interface BoolColumnOptions extends BaseColumnOptions {
|
|
34
|
+
default?: DataTypes.BoolValue | DatabaseFunctionToken<ColumnType.BOOL>;
|
|
35
|
+
type: ColumnType.BOOL;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Base class for integer column options
|
|
39
|
+
*/
|
|
40
|
+
export interface BaseIntColumnOptions extends BaseColumnOptions {
|
|
41
|
+
default?: DataTypes.IntegerValue | DatabaseFunctionToken<ColumnType.INT>;
|
|
42
|
+
autoIncrement?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Tiny int column options
|
|
46
|
+
*/
|
|
47
|
+
export interface TinyIntColumnOptions extends BaseIntColumnOptions {
|
|
48
|
+
type: ColumnType.TINYINT;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Small int column options
|
|
52
|
+
*/
|
|
53
|
+
export interface SmallIntColumnOptions extends BaseIntColumnOptions {
|
|
54
|
+
type: ColumnType.SMALLINT;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Int column options
|
|
58
|
+
*/
|
|
59
|
+
export interface IntColumnOptions extends BaseIntColumnOptions {
|
|
60
|
+
type: ColumnType.INT;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Big int column options
|
|
64
|
+
*/
|
|
65
|
+
export interface BigIntColumnOptions extends BaseIntColumnOptions {
|
|
66
|
+
type: ColumnType.BIGINT;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Base interface for decimal types
|
|
70
|
+
*/
|
|
71
|
+
export interface BaseDecimalColumnOptions extends BaseColumnOptions {
|
|
72
|
+
default?: DataTypes.DecimalValue | DatabaseFunctionToken<ColumnType.DECIMAL>;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Decimal column options
|
|
76
|
+
*/
|
|
77
|
+
export interface DecimalColumnOptions extends BaseDecimalColumnOptions {
|
|
78
|
+
significant: number;
|
|
79
|
+
decimal: number;
|
|
80
|
+
type: ColumnType.DECIMAL;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Float column options
|
|
84
|
+
*/
|
|
85
|
+
export interface FloatColumnOptions extends BaseDecimalColumnOptions {
|
|
86
|
+
type: ColumnType.FLOAT;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Double column options
|
|
90
|
+
*/
|
|
91
|
+
export interface DoubleColumnOptions extends BaseDecimalColumnOptions {
|
|
92
|
+
type: ColumnType.DOUBLE;
|
|
93
|
+
}
|
|
94
|
+
export type DateDefaultValues = null | string | DataTypes.DateValue;
|
|
95
|
+
/**
|
|
96
|
+
* Date column options
|
|
97
|
+
*/
|
|
98
|
+
export interface DateColumnOptions extends BaseColumnOptions {
|
|
99
|
+
default?: DateDefaultValues | DatabaseFunctionToken<ColumnType.DATE>;
|
|
100
|
+
type: ColumnType.DATE;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Time column options
|
|
104
|
+
*/
|
|
105
|
+
export interface TimeColumnOptions extends BaseColumnOptions {
|
|
106
|
+
default?: DateDefaultValues | DatabaseFunctionToken<ColumnType.TIME>;
|
|
107
|
+
type: ColumnType.TIME;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Timestamp column options
|
|
111
|
+
*/
|
|
112
|
+
export interface TimestampColumnOptions extends BaseColumnOptions {
|
|
113
|
+
default?: DateDefaultValues | DatabaseFunctionToken<ColumnType.TIMESTAMP>;
|
|
114
|
+
type: ColumnType.TIMESTAMP;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Base interface for text column options
|
|
118
|
+
*/
|
|
119
|
+
export interface BaseTextColumnOptions extends BaseColumnOptions {
|
|
120
|
+
default?: DataTypes.TextValue | DatabaseFunctionToken<ColumnType.CHAR> | DatabaseFunctionToken<ColumnType.VARCHAR> | DatabaseFunctionToken<ColumnType.TEXT>;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Char column options
|
|
124
|
+
*/
|
|
125
|
+
export interface CharColumnOptions extends BaseTextColumnOptions {
|
|
126
|
+
type: ColumnType.CHAR;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* VarChar column options
|
|
130
|
+
*/
|
|
131
|
+
export interface VarCharColumnOptions extends BaseTextColumnOptions {
|
|
132
|
+
length: number;
|
|
133
|
+
type: ColumnType.VARCHAR;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Text column options
|
|
137
|
+
*/
|
|
138
|
+
export interface TextColumOptions extends BaseTextColumnOptions {
|
|
139
|
+
type: ColumnType.TEXT;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Base interface for blob column options
|
|
143
|
+
*/
|
|
144
|
+
export interface BaseBlobColumnOptions extends BaseColumnOptions {
|
|
145
|
+
default?: DataTypes.BlobValue | DatabaseFunctionToken<ColumnType.BLOB>;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Blob column options
|
|
149
|
+
*/
|
|
150
|
+
export interface BlobColumnOptions extends BaseBlobColumnOptions {
|
|
151
|
+
type: ColumnType.BLOB;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Column options
|
|
155
|
+
*/
|
|
156
|
+
export type ColumnOptions = UUIDColumnOptions | BoolColumnOptions | TinyIntColumnOptions | SmallIntColumnOptions | IntColumnOptions | BigIntColumnOptions | DecimalColumnOptions | FloatColumnOptions | DoubleColumnOptions | DateColumnOptions | TimeColumnOptions | TimestampColumnOptions | CharColumnOptions | VarCharColumnOptions | TextColumOptions | BlobColumnOptions;
|
package/column/column-options.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=column-options.js.map
|
package/column/column-type.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export declare enum ColumnType {
|
|
2
|
-
UUID = "UUID",
|
|
3
|
-
BOOL = "BOOL",
|
|
4
|
-
TINYINT = "TINYINT",
|
|
5
|
-
SMALLINT = "SMALLINT",
|
|
6
|
-
INT = "INT",
|
|
7
|
-
BIGINT = "BIGINT",
|
|
8
|
-
DECIMAL = "DECIMAL",
|
|
9
|
-
FLOAT = "FLOAT",
|
|
10
|
-
DOUBLE = "DOUBLE",
|
|
11
|
-
DATE = "DATE",
|
|
12
|
-
TIME = "TIME",
|
|
13
|
-
TIMESTAMP = "TIMESTAMP",
|
|
14
|
-
CHAR = "CHAR",
|
|
15
|
-
VARCHAR = "VARCHAR",
|
|
16
|
-
TEXT = "TEXT",
|
|
17
|
-
BLOB = "BLOB"
|
|
18
|
-
}
|
|
1
|
+
export declare enum ColumnType {
|
|
2
|
+
UUID = "UUID",
|
|
3
|
+
BOOL = "BOOL",
|
|
4
|
+
TINYINT = "TINYINT",
|
|
5
|
+
SMALLINT = "SMALLINT",
|
|
6
|
+
INT = "INT",
|
|
7
|
+
BIGINT = "BIGINT",
|
|
8
|
+
DECIMAL = "DECIMAL",
|
|
9
|
+
FLOAT = "FLOAT",
|
|
10
|
+
DOUBLE = "DOUBLE",
|
|
11
|
+
DATE = "DATE",
|
|
12
|
+
TIME = "TIME",
|
|
13
|
+
TIMESTAMP = "TIMESTAMP",
|
|
14
|
+
CHAR = "CHAR",
|
|
15
|
+
VARCHAR = "VARCHAR",
|
|
16
|
+
TEXT = "TEXT",
|
|
17
|
+
BLOB = "BLOB"
|
|
18
|
+
}
|
package/column/column-type.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ColumnType = void 0;
|
|
4
|
-
var ColumnType;
|
|
5
|
-
(function (ColumnType) {
|
|
6
|
-
// ID
|
|
7
|
-
ColumnType["UUID"] = "UUID";
|
|
8
|
-
// Numbers
|
|
9
|
-
ColumnType["BOOL"] = "BOOL";
|
|
10
|
-
ColumnType["TINYINT"] = "TINYINT";
|
|
11
|
-
ColumnType["SMALLINT"] = "SMALLINT";
|
|
12
|
-
ColumnType["INT"] = "INT";
|
|
13
|
-
ColumnType["BIGINT"] = "BIGINT";
|
|
14
|
-
ColumnType["DECIMAL"] = "DECIMAL";
|
|
15
|
-
ColumnType["FLOAT"] = "FLOAT";
|
|
16
|
-
ColumnType["DOUBLE"] = "DOUBLE";
|
|
17
|
-
// Dates/Times
|
|
18
|
-
ColumnType["DATE"] = "DATE";
|
|
19
|
-
ColumnType["TIME"] = "TIME";
|
|
20
|
-
ColumnType["TIMESTAMP"] = "TIMESTAMP";
|
|
21
|
-
// Text
|
|
22
|
-
ColumnType["CHAR"] = "CHAR";
|
|
23
|
-
ColumnType["VARCHAR"] = "VARCHAR";
|
|
24
|
-
ColumnType["TEXT"] = "TEXT";
|
|
25
|
-
// Binary
|
|
26
|
-
ColumnType["BLOB"] = "BLOB";
|
|
27
|
-
})(ColumnType = exports.ColumnType || (exports.ColumnType = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ColumnType = void 0;
|
|
4
|
+
var ColumnType;
|
|
5
|
+
(function (ColumnType) {
|
|
6
|
+
// ID
|
|
7
|
+
ColumnType["UUID"] = "UUID";
|
|
8
|
+
// Numbers
|
|
9
|
+
ColumnType["BOOL"] = "BOOL";
|
|
10
|
+
ColumnType["TINYINT"] = "TINYINT";
|
|
11
|
+
ColumnType["SMALLINT"] = "SMALLINT";
|
|
12
|
+
ColumnType["INT"] = "INT";
|
|
13
|
+
ColumnType["BIGINT"] = "BIGINT";
|
|
14
|
+
ColumnType["DECIMAL"] = "DECIMAL";
|
|
15
|
+
ColumnType["FLOAT"] = "FLOAT";
|
|
16
|
+
ColumnType["DOUBLE"] = "DOUBLE";
|
|
17
|
+
// Dates/Times
|
|
18
|
+
ColumnType["DATE"] = "DATE";
|
|
19
|
+
ColumnType["TIME"] = "TIME";
|
|
20
|
+
ColumnType["TIMESTAMP"] = "TIMESTAMP";
|
|
21
|
+
// Text
|
|
22
|
+
ColumnType["CHAR"] = "CHAR";
|
|
23
|
+
ColumnType["VARCHAR"] = "VARCHAR";
|
|
24
|
+
ColumnType["TEXT"] = "TEXT";
|
|
25
|
+
// Binary
|
|
26
|
+
ColumnType["BLOB"] = "BLOB";
|
|
27
|
+
})(ColumnType = exports.ColumnType || (exports.ColumnType = {}));
|
|
28
28
|
//# sourceMappingURL=column-type.js.map
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/**
|
|
4
|
-
* Type for a uuid property
|
|
5
|
-
*/
|
|
6
|
-
export type UUIDValue = string;
|
|
7
|
-
/**
|
|
8
|
-
* Type for a boolean property
|
|
9
|
-
*/
|
|
10
|
-
export type BoolValue = boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Type for a integer property
|
|
13
|
-
*/
|
|
14
|
-
export type IntegerValue = number | bigint;
|
|
15
|
-
/**
|
|
16
|
-
* Type for a decimal/float property
|
|
17
|
-
*/
|
|
18
|
-
export type DecimalValue = number;
|
|
19
|
-
/**
|
|
20
|
-
* Type for a date/time property
|
|
21
|
-
*/
|
|
22
|
-
export type DateValue = Date;
|
|
23
|
-
/**
|
|
24
|
-
* Type for a text property
|
|
25
|
-
*/
|
|
26
|
-
export type TextValue = string;
|
|
27
|
-
/**
|
|
28
|
-
* Type for a blob property
|
|
29
|
-
*/
|
|
30
|
-
export type BlobValue = string | Buffer;
|
|
31
|
-
/**
|
|
32
|
-
* Type for a property
|
|
33
|
-
*/
|
|
34
|
-
export type ColumnValue = BoolValue | IntegerValue | DecimalValue | DateValue | TextValue | BlobValue;
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
/**
|
|
4
|
+
* Type for a uuid property
|
|
5
|
+
*/
|
|
6
|
+
export type UUIDValue = string;
|
|
7
|
+
/**
|
|
8
|
+
* Type for a boolean property
|
|
9
|
+
*/
|
|
10
|
+
export type BoolValue = boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Type for a integer property
|
|
13
|
+
*/
|
|
14
|
+
export type IntegerValue = number | bigint;
|
|
15
|
+
/**
|
|
16
|
+
* Type for a decimal/float property
|
|
17
|
+
*/
|
|
18
|
+
export type DecimalValue = number;
|
|
19
|
+
/**
|
|
20
|
+
* Type for a date/time property
|
|
21
|
+
*/
|
|
22
|
+
export type DateValue = Date;
|
|
23
|
+
/**
|
|
24
|
+
* Type for a text property
|
|
25
|
+
*/
|
|
26
|
+
export type TextValue = string;
|
|
27
|
+
/**
|
|
28
|
+
* Type for a blob property
|
|
29
|
+
*/
|
|
30
|
+
export type BlobValue = string | Buffer;
|
|
31
|
+
/**
|
|
32
|
+
* Type for a property
|
|
33
|
+
*/
|
|
34
|
+
export type ColumnValue = BoolValue | IntegerValue | DecimalValue | DateValue | TextValue | BlobValue;
|
package/column/column-values.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=column-values.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ColumnOptions } from './column-options';
|
|
2
|
+
type Primitive = string | number | boolean | bigint | symbol | null | undefined;
|
|
3
|
+
export type DeepPartial<T> = T extends Primitive ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : {
|
|
4
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Creates a reusable column template factory.
|
|
8
|
+
* Nested plain objects are deep-merged, while arrays are replaced.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createColumnTemplate<TColumn extends ColumnOptions>(defaults: TColumn): (overrides?: DeepPartial<TColumn>) => TColumn;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createColumnTemplate = void 0;
|
|
4
|
+
function isPlainObject(value) {
|
|
5
|
+
if (value === null || typeof value !== 'object') {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
return Object.getPrototypeOf(value) === Object.prototype;
|
|
9
|
+
}
|
|
10
|
+
function cloneValue(value) {
|
|
11
|
+
if (Array.isArray(value)) {
|
|
12
|
+
return value.map(item => cloneValue(item));
|
|
13
|
+
}
|
|
14
|
+
if (isPlainObject(value)) {
|
|
15
|
+
const cloned = {};
|
|
16
|
+
for (const [key, item] of Object.entries(value)) {
|
|
17
|
+
cloned[key] = cloneValue(item);
|
|
18
|
+
}
|
|
19
|
+
return cloned;
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
23
|
+
function mergeValue(defaults, overrides) {
|
|
24
|
+
if (overrides === undefined) {
|
|
25
|
+
return cloneValue(defaults);
|
|
26
|
+
}
|
|
27
|
+
if (Array.isArray(defaults)) {
|
|
28
|
+
if (Array.isArray(overrides)) {
|
|
29
|
+
return cloneValue(overrides);
|
|
30
|
+
}
|
|
31
|
+
return cloneValue(defaults);
|
|
32
|
+
}
|
|
33
|
+
if (defaults === undefined) {
|
|
34
|
+
return cloneValue(overrides);
|
|
35
|
+
}
|
|
36
|
+
if (isPlainObject(defaults) && isPlainObject(overrides)) {
|
|
37
|
+
const merged = {};
|
|
38
|
+
const keys = new Set([
|
|
39
|
+
...Object.keys(defaults),
|
|
40
|
+
...Object.keys(overrides),
|
|
41
|
+
]);
|
|
42
|
+
for (const key of keys) {
|
|
43
|
+
merged[key] = mergeValue(defaults[key], overrides[key]);
|
|
44
|
+
}
|
|
45
|
+
return merged;
|
|
46
|
+
}
|
|
47
|
+
return cloneValue(overrides);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Creates a reusable column template factory.
|
|
51
|
+
* Nested plain objects are deep-merged, while arrays are replaced.
|
|
52
|
+
*/
|
|
53
|
+
function createColumnTemplate(defaults) {
|
|
54
|
+
return (overrides) => mergeValue(defaults, overrides);
|
|
55
|
+
}
|
|
56
|
+
exports.createColumnTemplate = createColumnTemplate;
|
|
57
|
+
//# sourceMappingURL=create-column-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-column-template.js","sourceRoot":"","sources":["../../../src/column/create-column-template.ts"],"names":[],"mappings":";;;AAUA,SAAS,aAAa,CAAC,KAAc;IACpC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAChD,OAAO,KAAK,CAAC;KACb;IAED,OAAO,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,SAAS,CAAC;AAC1D,CAAC;AAED,SAAS,UAAU,CAAI,KAAQ;IAC9B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAM,CAAC;KAChD;IAED,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE;QACzB,MAAM,MAAM,GAA4B,EAAE,CAAC;QAE3C,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YAChD,MAAM,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;SAC/B;QAED,OAAO,MAAW,CAAC;KACnB;IAED,OAAO,KAAK,CAAC;AACd,CAAC;AAED,SAAS,UAAU,CAAI,QAAW,EAAE,SAAqC;IACxE,IAAI,SAAS,KAAK,SAAS,EAAE;QAC5B,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;KAC5B;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;QAC5B,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;YAC7B,OAAO,UAAU,CAAC,SAAc,CAAC,CAAC;SAClC;QAED,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;KAC5B;IAED,IAAI,QAAQ,KAAK,SAAS,EAAE;QAC3B,OAAO,UAAU,CAAC,SAAc,CAAC,CAAC;KAClC;IAED,IAAI,aAAa,CAAC,QAAQ,CAAC,IAAI,aAAa,CAAC,SAAS,CAAC,EAAE;QACxD,MAAM,MAAM,GAA4B,EAAE,CAAC;QAC3C,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC;YACpB,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;YACxB,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;SACzB,CAAC,CAAC;QAEH,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACvB,MAAM,CAAC,GAAG,CAAC,GAAG,UAAU,CACtB,QAAoC,CAAC,GAAG,CAAC,EACzC,SAAqC,CACrC,GAAG,CACqB,CACzB,CAAC;SACF;QAED,OAAO,MAAW,CAAC;KACnB;IAED,OAAO,UAAU,CAAC,SAAc,CAAC,CAAC;AACnC,CAAC;AAED;;;GAGG;AACH,SAAgB,oBAAoB,CACnC,QAAiB;IAEjB,OAAO,CAAC,SAAgC,EAAE,EAAE,CAC3C,UAAU,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;AAClC,CAAC;AALD,oDAKC"}
|
package/column/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export * from './column-options';
|
|
2
|
-
export * from './column-
|
|
3
|
-
export * from './column-
|
|
1
|
+
export * from './column-options';
|
|
2
|
+
export * from './create-column-template';
|
|
3
|
+
export * from './column-type';
|
|
4
|
+
export * from './column-values';
|
package/column/index.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
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
|
-
__exportStar(require("./column-options"), exports);
|
|
18
|
-
__exportStar(require("./column-
|
|
19
|
-
__exportStar(require("./column-
|
|
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
|
+
__exportStar(require("./column-options"), exports);
|
|
18
|
+
__exportStar(require("./create-column-template"), exports);
|
|
19
|
+
__exportStar(require("./column-type"), exports);
|
|
20
|
+
__exportStar(require("./column-values"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
package/column/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/column/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,gDAA8B;AAC9B,kDAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/column/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,2DAAyC;AACzC,gDAA8B;AAC9B,kDAAgC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ColumnOptions } from '../../column';
|
|
2
|
-
export declare const CreateTimestampColumn: ColumnOptions;
|
|
1
|
+
import { ColumnOptions } from '../../column';
|
|
2
|
+
export declare const CreateTimestampColumn: ColumnOptions;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateTimestampColumn = void 0;
|
|
4
|
-
const column_1 = require("../../column");
|
|
5
|
-
const functions_1 = require("../../functions");
|
|
6
|
-
exports.CreateTimestampColumn = {
|
|
7
|
-
type: column_1.ColumnType.TIMESTAMP,
|
|
8
|
-
name: 'create_timestamp',
|
|
9
|
-
default: functions_1.DatabaseFunctions.currentTimestamp(),
|
|
10
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateTimestampColumn = void 0;
|
|
4
|
+
const column_1 = require("../../column");
|
|
5
|
+
const functions_1 = require("../../functions");
|
|
6
|
+
exports.CreateTimestampColumn = {
|
|
7
|
+
type: column_1.ColumnType.TIMESTAMP,
|
|
8
|
+
name: 'create_timestamp',
|
|
9
|
+
default: functions_1.DatabaseFunctions.currentTimestamp(),
|
|
10
|
+
};
|
|
11
11
|
//# sourceMappingURL=create-timestamp-column.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { CreateTimestampColumn } from './create-timestamp-column';
|
|
2
|
-
export { UpdateTimestampColumn } from './update-timestamp-column';
|
|
1
|
+
export { CreateTimestampColumn } from './create-timestamp-column';
|
|
2
|
+
export { UpdateTimestampColumn } from './update-timestamp-column';
|