bigal 13.0.0-beta2 → 13.0.0-beta4

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.
@@ -0,0 +1,358 @@
1
+ import _ from 'lodash';
2
+
3
+ var __defProp$5 = Object.defineProperty;
4
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5
+ var __publicField$5 = (obj, key, value) => {
6
+ __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
7
+ return value;
8
+ };
9
+ class MetadataStorage {
10
+ constructor() {
11
+ __publicField$5(this, "models", []);
12
+ // All columns for all models. This data only represents @column specifics, not additional column modifiers
13
+ __publicField$5(this, "columns", []);
14
+ // This represents additional column behavior separate from the main @column decorator. For example, @primaryColumn, @versionColumn, etc
15
+ // This behavior will be merged over defaults from @column()
16
+ __publicField$5(this, "columnModifiers", []);
17
+ }
18
+ }
19
+
20
+ var __defProp$4 = Object.defineProperty;
21
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
22
+ var __publicField$4 = (obj, key, value) => {
23
+ __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
24
+ return value;
25
+ };
26
+ class ColumnBaseMetadata {
27
+ constructor({
28
+ target,
29
+ name,
30
+ propertyName,
31
+ required = false,
32
+ insert = true,
33
+ update = true,
34
+ primary = false,
35
+ createDate = false,
36
+ updateDate = false,
37
+ version = false
38
+ }) {
39
+ /**
40
+ * Name of class with @table decorator
41
+ */
42
+ __publicField$4(this, "target");
43
+ /**
44
+ * Column name in the database
45
+ */
46
+ __publicField$4(this, "name");
47
+ /**
48
+ * Class property to which the column is applied
49
+ */
50
+ __publicField$4(this, "propertyName");
51
+ /**
52
+ * Indicates if a value is required for creates.
53
+ */
54
+ __publicField$4(this, "required");
55
+ /**
56
+ * Indicates if column is inserted by default. Default is true
57
+ */
58
+ __publicField$4(this, "insert");
59
+ /**
60
+ * Indicates if column value is updated by "save" operation. Default is true
61
+ */
62
+ __publicField$4(this, "update");
63
+ /**
64
+ * Indicates if this column is a primary key.
65
+ * Same can be achieved when @primaryColumn decorator is used
66
+ */
67
+ __publicField$4(this, "primary");
68
+ /**
69
+ * Value will be equal to `new Date()` when the row is inserted into the table
70
+ * Same can be achieved when @createDateColumn decorator is used
71
+ */
72
+ __publicField$4(this, "createDate");
73
+ /**
74
+ * Value will be equal to `new Date()` when the row is updated
75
+ * Same can be achieved when @updateDateColumn decorator is used
76
+ */
77
+ __publicField$4(this, "updateDate");
78
+ /**
79
+ * Value will be set to 1 when the row is inserted. Value will be incremented by one when the row is updated
80
+ * Same can be achieved when @versionColumn decorator is used
81
+ */
82
+ __publicField$4(this, "version");
83
+ this.target = target;
84
+ this.name = name;
85
+ this.propertyName = propertyName;
86
+ this.required = required;
87
+ this.insert = insert;
88
+ this.update = update;
89
+ this.primary = primary;
90
+ this.createDate = createDate;
91
+ this.updateDate = updateDate;
92
+ this.version = version;
93
+ }
94
+ }
95
+
96
+ var __defProp$3 = Object.defineProperty;
97
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
98
+ var __publicField$3 = (obj, key, value) => {
99
+ __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
100
+ return value;
101
+ };
102
+ class ColumnCollectionMetadata extends ColumnBaseMetadata {
103
+ constructor({
104
+ target,
105
+ //
106
+ name,
107
+ propertyName,
108
+ required,
109
+ insert,
110
+ update,
111
+ primary,
112
+ createDate,
113
+ updateDate,
114
+ version,
115
+ collection,
116
+ via,
117
+ through
118
+ }) {
119
+ super({
120
+ target,
121
+ name,
122
+ propertyName,
123
+ required,
124
+ insert,
125
+ update,
126
+ primary,
127
+ createDate,
128
+ updateDate,
129
+ version
130
+ });
131
+ __publicField$3(this, "_collectionString");
132
+ __publicField$3(this, "_collectionFn");
133
+ __publicField$3(this, "_throughString");
134
+ __publicField$3(this, "_throughFn");
135
+ /**
136
+ * Property name of the on the collection item type
137
+ */
138
+ __publicField$3(this, "via");
139
+ this.via = via;
140
+ if (typeof collection === "string") {
141
+ this._collectionString = collection;
142
+ } else {
143
+ this._collectionFn = collection;
144
+ }
145
+ if (typeof through === "string") {
146
+ this._throughString = through;
147
+ } else if (through) {
148
+ this._throughFn = through;
149
+ }
150
+ }
151
+ /**
152
+ * Type of the items in the collection
153
+ */
154
+ get collection() {
155
+ if (this._collectionString) {
156
+ return this._collectionString;
157
+ }
158
+ if (!this._collectionFn) {
159
+ throw new Error(`Unable to determine collection type for ${this.target}#${this.propertyName}`);
160
+ }
161
+ this._collectionString = this._collectionFn();
162
+ return this._collectionString;
163
+ }
164
+ /**
165
+ * Name of the junction table for multi-multi associations
166
+ */
167
+ get through() {
168
+ if (this._throughString) {
169
+ return this._throughString;
170
+ }
171
+ if (this._throughFn) {
172
+ this._throughString = this._throughFn();
173
+ return this._throughString;
174
+ }
175
+ return void 0;
176
+ }
177
+ }
178
+
179
+ var __defProp$2 = Object.defineProperty;
180
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
181
+ var __publicField$2 = (obj, key, value) => {
182
+ __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
183
+ return value;
184
+ };
185
+ class ColumnModelMetadata extends ColumnBaseMetadata {
186
+ constructor({
187
+ target,
188
+ //
189
+ name,
190
+ propertyName,
191
+ required,
192
+ insert,
193
+ update,
194
+ primary,
195
+ createDate,
196
+ updateDate,
197
+ version,
198
+ model
199
+ }) {
200
+ super({
201
+ target,
202
+ name,
203
+ propertyName,
204
+ required,
205
+ insert,
206
+ update,
207
+ primary,
208
+ createDate,
209
+ updateDate,
210
+ version
211
+ });
212
+ __publicField$2(this, "_modelString");
213
+ __publicField$2(this, "_modelFn");
214
+ if (typeof model === "string") {
215
+ this._modelString = model;
216
+ } else {
217
+ this._modelFn = model;
218
+ }
219
+ }
220
+ /**
221
+ * Name of the model represented by this column id
222
+ */
223
+ get model() {
224
+ if (this._modelString) {
225
+ return this._modelString;
226
+ }
227
+ if (!this._modelFn) {
228
+ throw new Error(`Unable to determine model type for ${this.target}#${this.propertyName}`);
229
+ }
230
+ this._modelString = this._modelFn();
231
+ return this._modelString;
232
+ }
233
+ }
234
+
235
+ var __defProp$1 = Object.defineProperty;
236
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
237
+ var __publicField$1 = (obj, key, value) => {
238
+ __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
239
+ return value;
240
+ };
241
+ class ColumnTypeMetadata extends ColumnBaseMetadata {
242
+ constructor(options) {
243
+ super({
244
+ target: options.target,
245
+ name: options.name,
246
+ propertyName: options.propertyName,
247
+ required: options.required,
248
+ insert: options.insert,
249
+ update: options.update,
250
+ primary: options.primary,
251
+ createDate: options.createDate,
252
+ updateDate: options.updateDate,
253
+ version: options.version
254
+ });
255
+ /**
256
+ * Type of the column
257
+ */
258
+ __publicField$1(this, "type");
259
+ /**
260
+ * Default database value
261
+ */
262
+ __publicField$1(this, "defaultsTo");
263
+ /**
264
+ * Array of possible enumerated values
265
+ */
266
+ __publicField$1(this, "enum");
267
+ /**
268
+ * If set, enforces a maximum length check on the column
269
+ *
270
+ * Applies to types: string | string[]
271
+ */
272
+ __publicField$1(this, "maxLength");
273
+ this.type = options.type;
274
+ this.defaultsTo = options.defaultsTo;
275
+ this.enum = options.enum;
276
+ this.maxLength = options.maxLength;
277
+ }
278
+ }
279
+
280
+ var __defProp = Object.defineProperty;
281
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
282
+ var __publicField = (obj, key, value) => {
283
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
284
+ return value;
285
+ };
286
+ class ModelMetadata {
287
+ constructor({
288
+ name,
289
+ //
290
+ type,
291
+ connection,
292
+ tableName,
293
+ readonly = false
294
+ }) {
295
+ __publicField(this, "_columns", []);
296
+ __publicField(this, "_primaryKeyColumn");
297
+ __publicField(this, "_createDateColumns", []);
298
+ __publicField(this, "_updateDateColumns", []);
299
+ __publicField(this, "_versionDateColumns", []);
300
+ __publicField(this, "name");
301
+ __publicField(this, "type");
302
+ __publicField(this, "connection");
303
+ __publicField(this, "tableName");
304
+ __publicField(this, "readonly");
305
+ __publicField(this, "columnsByColumnName", {});
306
+ __publicField(this, "columnsByPropertyName", {});
307
+ this.name = name;
308
+ this.type = type;
309
+ this.connection = connection;
310
+ this.tableName = tableName ?? _.snakeCase(name);
311
+ this.readonly = readonly;
312
+ }
313
+ set columns(columns) {
314
+ this._columns = columns;
315
+ this.columnsByColumnName = {};
316
+ this.columnsByPropertyName = {};
317
+ for (const column of columns) {
318
+ this.columnsByColumnName[column.name] = column;
319
+ this.columnsByPropertyName[column.propertyName] = column;
320
+ if (column.primary) {
321
+ this._primaryKeyColumn = column;
322
+ }
323
+ if (column.createDate) {
324
+ this._createDateColumns.push(column);
325
+ }
326
+ if (column.updateDate) {
327
+ this._updateDateColumns.push(column);
328
+ }
329
+ if (column.version) {
330
+ this._versionDateColumns.push(column);
331
+ }
332
+ }
333
+ }
334
+ get columns() {
335
+ return this._columns;
336
+ }
337
+ get primaryKeyColumn() {
338
+ return this._primaryKeyColumn;
339
+ }
340
+ get createDateColumns() {
341
+ return this._createDateColumns;
342
+ }
343
+ get updateDateColumns() {
344
+ return this._updateDateColumns;
345
+ }
346
+ get versionColumns() {
347
+ return this._versionDateColumns;
348
+ }
349
+ }
350
+
351
+ function getMetadataStorage() {
352
+ if (!global.bigAlMetadataArgsStorage) {
353
+ global.bigAlMetadataArgsStorage = new MetadataStorage();
354
+ }
355
+ return global.bigAlMetadataArgsStorage;
356
+ }
357
+
358
+ export { ColumnBaseMetadata, ColumnCollectionMetadata, ColumnModelMetadata, ColumnTypeMetadata, ModelMetadata, getMetadataStorage };
@@ -0,0 +1,105 @@
1
+ interface ClassLike {
2
+ /**
3
+ * Returns the name of the function. Function names are read-only and can not be changed.
4
+ */
5
+ readonly constructor: {
6
+ readonly name: string;
7
+ };
8
+ }
9
+
10
+ interface ColumnBaseOptions {
11
+ /**
12
+ * Column name in the database
13
+ */
14
+ name?: string;
15
+ /**
16
+ * Indicates if a value is required for creates.
17
+ */
18
+ required?: boolean;
19
+ }
20
+
21
+ interface ColumnCollectionOptions extends ColumnBaseOptions {
22
+ /**
23
+ * Type of the items in the collection
24
+ */
25
+ collection: string | (() => string);
26
+ /**
27
+ * Property name of the on the collection item type
28
+ */
29
+ via: string;
30
+ /**
31
+ * Name of the junction table for multi-multi associations
32
+ */
33
+ through?: string | (() => string);
34
+ }
35
+
36
+ interface ColumnModelOptions extends ColumnBaseOptions {
37
+ /**
38
+ * Type of the entity represented by this column id
39
+ */
40
+ model: string | (() => string);
41
+ }
42
+
43
+ interface ColumnTypeOptions extends ColumnBaseOptions {
44
+ /**
45
+ * Type of the column
46
+ */
47
+ type: 'array' | 'binary' | 'boolean' | 'boolean[]' | 'date' | 'datetime' | 'float' | 'float[]' | 'integer' | 'integer[]' | 'json' | 'string' | 'string[]';
48
+ /**
49
+ * Default database value
50
+ */
51
+ defaultsTo?: boolean[] | number[] | string[] | boolean | number | string | (() => Date | Record<string, unknown> | boolean | number | string) | [];
52
+ /**
53
+ * Array of possible enumerated values
54
+ */
55
+ enum?: string[];
56
+ /**
57
+ * If set, enforces a maximum length check on the column
58
+ *
59
+ * Applies to types: string | string[]
60
+ */
61
+ maxLength?: number;
62
+ }
63
+
64
+ type ColumnOptions$1 = ColumnCollectionOptions | ColumnModelOptions | ColumnTypeOptions;
65
+ type ReturnFunctionType$5 = (object: ClassLike, propertyName: string) => void;
66
+ declare function column(options?: ColumnOptions$1): ReturnFunctionType$5;
67
+ declare function column(dbColumnName: string, options?: ColumnOptions$1): ReturnFunctionType$5;
68
+
69
+ type ReturnFunctionType$4 = (object: ClassLike, propertyName: string) => void;
70
+ declare function createDateColumn(options?: ColumnTypeOptions): ReturnFunctionType$4;
71
+ declare function createDateColumn(dbColumnName: string, options?: ColumnTypeOptions): ReturnFunctionType$4;
72
+
73
+ type ColumnOptions = ColumnModelOptions | ColumnTypeOptions;
74
+ type ReturnFunctionType$3 = (object: ClassLike, propertyName: string) => void;
75
+ declare function primaryColumn(options?: ColumnOptions): ReturnFunctionType$3;
76
+ declare function primaryColumn(dbColumnName: string, options?: ColumnOptions): ReturnFunctionType$3;
77
+
78
+ interface TableOptions {
79
+ /**
80
+ * Table name in the database
81
+ */
82
+ name?: string;
83
+ /**
84
+ * Connection name to use for queries
85
+ */
86
+ connection?: string;
87
+ /**
88
+ * Indicates if create, update, delete statements should be available
89
+ */
90
+ readonly?: boolean;
91
+ }
92
+
93
+ type ReturnFunctionType$2 = (object: any) => void;
94
+ declare function table(options?: TableOptions): ReturnFunctionType$2;
95
+ declare function table(dbName: string, options: TableOptions): ReturnFunctionType$2;
96
+
97
+ type ReturnFunctionType$1 = (object: ClassLike, propertyName: string) => void;
98
+ declare function updateDateColumn(options?: ColumnTypeOptions): ReturnFunctionType$1;
99
+ declare function updateDateColumn(dbColumnName: string, options?: ColumnTypeOptions): ReturnFunctionType$1;
100
+
101
+ type ReturnFunctionType = (object: ClassLike, propertyName: string) => void;
102
+ declare function versionColumn(options?: ColumnTypeOptions): ReturnFunctionType;
103
+ declare function versionColumn(dbColumnName: string, options?: ColumnTypeOptions): ReturnFunctionType;
104
+
105
+ export { type ClassLike as C, createDateColumn as a, column as c, primaryColumn as p, table as t, updateDateColumn as u, versionColumn as v };
@@ -0,0 +1,105 @@
1
+ interface ClassLike {
2
+ /**
3
+ * Returns the name of the function. Function names are read-only and can not be changed.
4
+ */
5
+ readonly constructor: {
6
+ readonly name: string;
7
+ };
8
+ }
9
+
10
+ interface ColumnBaseOptions {
11
+ /**
12
+ * Column name in the database
13
+ */
14
+ name?: string;
15
+ /**
16
+ * Indicates if a value is required for creates.
17
+ */
18
+ required?: boolean;
19
+ }
20
+
21
+ interface ColumnCollectionOptions extends ColumnBaseOptions {
22
+ /**
23
+ * Type of the items in the collection
24
+ */
25
+ collection: string | (() => string);
26
+ /**
27
+ * Property name of the on the collection item type
28
+ */
29
+ via: string;
30
+ /**
31
+ * Name of the junction table for multi-multi associations
32
+ */
33
+ through?: string | (() => string);
34
+ }
35
+
36
+ interface ColumnModelOptions extends ColumnBaseOptions {
37
+ /**
38
+ * Type of the entity represented by this column id
39
+ */
40
+ model: string | (() => string);
41
+ }
42
+
43
+ interface ColumnTypeOptions extends ColumnBaseOptions {
44
+ /**
45
+ * Type of the column
46
+ */
47
+ type: 'array' | 'binary' | 'boolean' | 'boolean[]' | 'date' | 'datetime' | 'float' | 'float[]' | 'integer' | 'integer[]' | 'json' | 'string' | 'string[]';
48
+ /**
49
+ * Default database value
50
+ */
51
+ defaultsTo?: boolean[] | number[] | string[] | boolean | number | string | (() => Date | Record<string, unknown> | boolean | number | string) | [];
52
+ /**
53
+ * Array of possible enumerated values
54
+ */
55
+ enum?: string[];
56
+ /**
57
+ * If set, enforces a maximum length check on the column
58
+ *
59
+ * Applies to types: string | string[]
60
+ */
61
+ maxLength?: number;
62
+ }
63
+
64
+ type ColumnOptions$1 = ColumnCollectionOptions | ColumnModelOptions | ColumnTypeOptions;
65
+ type ReturnFunctionType$5 = (object: ClassLike, propertyName: string) => void;
66
+ declare function column(options?: ColumnOptions$1): ReturnFunctionType$5;
67
+ declare function column(dbColumnName: string, options?: ColumnOptions$1): ReturnFunctionType$5;
68
+
69
+ type ReturnFunctionType$4 = (object: ClassLike, propertyName: string) => void;
70
+ declare function createDateColumn(options?: ColumnTypeOptions): ReturnFunctionType$4;
71
+ declare function createDateColumn(dbColumnName: string, options?: ColumnTypeOptions): ReturnFunctionType$4;
72
+
73
+ type ColumnOptions = ColumnModelOptions | ColumnTypeOptions;
74
+ type ReturnFunctionType$3 = (object: ClassLike, propertyName: string) => void;
75
+ declare function primaryColumn(options?: ColumnOptions): ReturnFunctionType$3;
76
+ declare function primaryColumn(dbColumnName: string, options?: ColumnOptions): ReturnFunctionType$3;
77
+
78
+ interface TableOptions {
79
+ /**
80
+ * Table name in the database
81
+ */
82
+ name?: string;
83
+ /**
84
+ * Connection name to use for queries
85
+ */
86
+ connection?: string;
87
+ /**
88
+ * Indicates if create, update, delete statements should be available
89
+ */
90
+ readonly?: boolean;
91
+ }
92
+
93
+ type ReturnFunctionType$2 = (object: any) => void;
94
+ declare function table(options?: TableOptions): ReturnFunctionType$2;
95
+ declare function table(dbName: string, options: TableOptions): ReturnFunctionType$2;
96
+
97
+ type ReturnFunctionType$1 = (object: ClassLike, propertyName: string) => void;
98
+ declare function updateDateColumn(options?: ColumnTypeOptions): ReturnFunctionType$1;
99
+ declare function updateDateColumn(dbColumnName: string, options?: ColumnTypeOptions): ReturnFunctionType$1;
100
+
101
+ type ReturnFunctionType = (object: ClassLike, propertyName: string) => void;
102
+ declare function versionColumn(options?: ColumnTypeOptions): ReturnFunctionType;
103
+ declare function versionColumn(dbColumnName: string, options?: ColumnTypeOptions): ReturnFunctionType;
104
+
105
+ export { type ClassLike as C, createDateColumn as a, column as c, primaryColumn as p, table as t, updateDateColumn as u, versionColumn as v };
@@ -0,0 +1,105 @@
1
+ interface ClassLike {
2
+ /**
3
+ * Returns the name of the function. Function names are read-only and can not be changed.
4
+ */
5
+ readonly constructor: {
6
+ readonly name: string;
7
+ };
8
+ }
9
+
10
+ interface ColumnBaseOptions {
11
+ /**
12
+ * Column name in the database
13
+ */
14
+ name?: string;
15
+ /**
16
+ * Indicates if a value is required for creates.
17
+ */
18
+ required?: boolean;
19
+ }
20
+
21
+ interface ColumnCollectionOptions extends ColumnBaseOptions {
22
+ /**
23
+ * Type of the items in the collection
24
+ */
25
+ collection: string | (() => string);
26
+ /**
27
+ * Property name of the on the collection item type
28
+ */
29
+ via: string;
30
+ /**
31
+ * Name of the junction table for multi-multi associations
32
+ */
33
+ through?: string | (() => string);
34
+ }
35
+
36
+ interface ColumnModelOptions extends ColumnBaseOptions {
37
+ /**
38
+ * Type of the entity represented by this column id
39
+ */
40
+ model: string | (() => string);
41
+ }
42
+
43
+ interface ColumnTypeOptions extends ColumnBaseOptions {
44
+ /**
45
+ * Type of the column
46
+ */
47
+ type: 'array' | 'binary' | 'boolean' | 'boolean[]' | 'date' | 'datetime' | 'float' | 'float[]' | 'integer' | 'integer[]' | 'json' | 'string' | 'string[]';
48
+ /**
49
+ * Default database value
50
+ */
51
+ defaultsTo?: boolean[] | number[] | string[] | boolean | number | string | (() => Date | Record<string, unknown> | boolean | number | string) | [];
52
+ /**
53
+ * Array of possible enumerated values
54
+ */
55
+ enum?: string[];
56
+ /**
57
+ * If set, enforces a maximum length check on the column
58
+ *
59
+ * Applies to types: string | string[]
60
+ */
61
+ maxLength?: number;
62
+ }
63
+
64
+ type ColumnOptions$1 = ColumnCollectionOptions | ColumnModelOptions | ColumnTypeOptions;
65
+ type ReturnFunctionType$5 = (object: ClassLike, propertyName: string) => void;
66
+ declare function column(options?: ColumnOptions$1): ReturnFunctionType$5;
67
+ declare function column(dbColumnName: string, options?: ColumnOptions$1): ReturnFunctionType$5;
68
+
69
+ type ReturnFunctionType$4 = (object: ClassLike, propertyName: string) => void;
70
+ declare function createDateColumn(options?: ColumnTypeOptions): ReturnFunctionType$4;
71
+ declare function createDateColumn(dbColumnName: string, options?: ColumnTypeOptions): ReturnFunctionType$4;
72
+
73
+ type ColumnOptions = ColumnModelOptions | ColumnTypeOptions;
74
+ type ReturnFunctionType$3 = (object: ClassLike, propertyName: string) => void;
75
+ declare function primaryColumn(options?: ColumnOptions): ReturnFunctionType$3;
76
+ declare function primaryColumn(dbColumnName: string, options?: ColumnOptions): ReturnFunctionType$3;
77
+
78
+ interface TableOptions {
79
+ /**
80
+ * Table name in the database
81
+ */
82
+ name?: string;
83
+ /**
84
+ * Connection name to use for queries
85
+ */
86
+ connection?: string;
87
+ /**
88
+ * Indicates if create, update, delete statements should be available
89
+ */
90
+ readonly?: boolean;
91
+ }
92
+
93
+ type ReturnFunctionType$2 = (object: any) => void;
94
+ declare function table(options?: TableOptions): ReturnFunctionType$2;
95
+ declare function table(dbName: string, options: TableOptions): ReturnFunctionType$2;
96
+
97
+ type ReturnFunctionType$1 = (object: ClassLike, propertyName: string) => void;
98
+ declare function updateDateColumn(options?: ColumnTypeOptions): ReturnFunctionType$1;
99
+ declare function updateDateColumn(dbColumnName: string, options?: ColumnTypeOptions): ReturnFunctionType$1;
100
+
101
+ type ReturnFunctionType = (object: ClassLike, propertyName: string) => void;
102
+ declare function versionColumn(options?: ColumnTypeOptions): ReturnFunctionType;
103
+ declare function versionColumn(dbColumnName: string, options?: ColumnTypeOptions): ReturnFunctionType;
104
+
105
+ export { type ClassLike as C, createDateColumn as a, column as c, primaryColumn as p, table as t, updateDateColumn as u, versionColumn as v };