@spinajs/orm 1.2.26 → 1.2.33

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.
Files changed (62) hide show
  1. package/lib/builders.js +7 -2
  2. package/lib/builders.js.map +1 -1
  3. package/lib/decorators.js +9 -9
  4. package/lib/decorators.js.map +1 -1
  5. package/lib/driver.d.ts +2 -0
  6. package/lib/driver.js +5 -0
  7. package/lib/driver.js.map +1 -1
  8. package/lib/log-common/src/index.d.ts +180 -0
  9. package/lib/log-common/src/index.js +49 -0
  10. package/lib/log-common/src/index.js.map +1 -0
  11. package/lib/model.d.ts +3 -3
  12. package/lib/orm/src/builders.d.ts +429 -0
  13. package/lib/orm/src/builders.js +1082 -0
  14. package/lib/orm/src/builders.js.map +1 -0
  15. package/lib/orm/src/cli.d.ts +1 -0
  16. package/lib/orm/src/cli.js +2 -0
  17. package/lib/orm/src/cli.js.map +1 -0
  18. package/lib/orm/src/converters.d.ts +9 -0
  19. package/lib/orm/src/converters.js +22 -0
  20. package/lib/orm/src/converters.js.map +1 -0
  21. package/lib/orm/src/decorators.d.ts +122 -0
  22. package/lib/orm/src/decorators.js +380 -0
  23. package/lib/orm/src/decorators.js.map +1 -0
  24. package/lib/orm/src/driver.d.ts +77 -0
  25. package/lib/orm/src/driver.js +84 -0
  26. package/lib/orm/src/driver.js.map +1 -0
  27. package/lib/orm/src/enums.d.ts +111 -0
  28. package/lib/orm/src/enums.js +122 -0
  29. package/lib/orm/src/enums.js.map +1 -0
  30. package/lib/orm/src/exceptions.d.ts +6 -0
  31. package/lib/orm/src/exceptions.js +11 -0
  32. package/lib/orm/src/exceptions.js.map +1 -0
  33. package/lib/orm/src/hydrators.d.ts +16 -0
  34. package/lib/orm/src/hydrators.js +70 -0
  35. package/lib/orm/src/hydrators.js.map +1 -0
  36. package/lib/orm/src/index.d.ts +12 -0
  37. package/lib/orm/src/index.js +25 -0
  38. package/lib/orm/src/index.js.map +1 -0
  39. package/lib/orm/src/interfaces.d.ts +615 -0
  40. package/lib/orm/src/interfaces.js +186 -0
  41. package/lib/orm/src/interfaces.js.map +1 -0
  42. package/lib/orm/src/model.d.ts +135 -0
  43. package/lib/orm/src/model.js +449 -0
  44. package/lib/orm/src/model.js.map +1 -0
  45. package/lib/orm/src/orm.d.ts +59 -0
  46. package/lib/orm/src/orm.js +278 -0
  47. package/lib/orm/src/orm.js.map +1 -0
  48. package/lib/orm/src/relations.d.ts +96 -0
  49. package/lib/orm/src/relations.js +503 -0
  50. package/lib/orm/src/relations.js.map +1 -0
  51. package/lib/orm/src/statements.d.ts +132 -0
  52. package/lib/orm/src/statements.js +257 -0
  53. package/lib/orm/src/statements.js.map +1 -0
  54. package/lib/orm/src/types.d.ts +2 -0
  55. package/lib/orm/src/types.js +3 -0
  56. package/lib/orm/src/types.js.map +1 -0
  57. package/lib/orm/src/wrappers.d.ts +5 -0
  58. package/lib/orm/src/wrappers.js +13 -0
  59. package/lib/orm/src/wrappers.js.map +1 -0
  60. package/lib/orm.js +10 -7
  61. package/lib/orm.js.map +1 -1
  62. package/package.json +7 -7
@@ -0,0 +1,615 @@
1
+ import { RawQuery } from './builders';
2
+ import { SORT_ORDER, WhereBoolean } from './enums';
3
+ import { IQueryStatement, WrapStatement } from './statements';
4
+ import { WhereFunction } from './types';
5
+ import { OrmDriver } from './driver';
6
+ import { Constructor } from '@spinajs/di';
7
+ import { ModelBase } from './model';
8
+ export declare enum QueryContext {
9
+ Insert = 0,
10
+ Select = 1,
11
+ Update = 2,
12
+ Delete = 3,
13
+ Schema = 4,
14
+ Transaction = 5
15
+ }
16
+ export declare enum InsertBehaviour {
17
+ /**
18
+ * On duplicate entry ignore & fetch only model primary key
19
+ */
20
+ OnDuplicateIgnore = 0,
21
+ /**
22
+ * On duplicate update entry ( when unique constraint is hit update db from model data)
23
+ */
24
+ OnDuplicateUpdate = 1,
25
+ /**
26
+ * Throw error if model hits constraint ( primary or unique keys )
27
+ */
28
+ None = 2
29
+ }
30
+ /**
31
+ * Foreign key referential actions
32
+ */
33
+ export declare enum ReferentialAction {
34
+ Cascade = "CASCADE",
35
+ SetNull = "SET NULL",
36
+ Restrict = "RESTRICT",
37
+ NoAction = "NO ACTION",
38
+ SetDefault = "SET DEFAULT"
39
+ }
40
+ /**
41
+ * Transaction mode when migration DB
42
+ */
43
+ export declare enum MigrationTransactionMode {
44
+ /**
45
+ * Migration is run whithout transaction
46
+ */
47
+ None = 0,
48
+ /**
49
+ * On transaction for one migration - every migration has its own
50
+ */
51
+ PerMigration = 1
52
+ }
53
+ /**
54
+ * Configuration options to set in configuration file and used in OrmDriver
55
+ */
56
+ export interface IDriverOptions {
57
+ /**
58
+ * Max connections limit
59
+ */
60
+ PoolLimit: number;
61
+ /**
62
+ * Database name associated with this connection
63
+ */
64
+ Database?: string;
65
+ /**
66
+ * User associatet with this connection
67
+ */
68
+ User?: string;
69
+ /**
70
+ * Password to database
71
+ */
72
+ Password?: string;
73
+ /**
74
+ * DB Host
75
+ */
76
+ Host?: string;
77
+ /**
78
+ * Connection port
79
+ */
80
+ Port?: number;
81
+ /**
82
+ * Connection encoding eg. utf-8
83
+ */
84
+ Encoding?: string;
85
+ /**
86
+ * Database filename eg. for Sqlite driver
87
+ */
88
+ Filename?: string;
89
+ /**
90
+ * Driver name eg. mysql, sqlite, mssql etc.
91
+ */
92
+ Driver: string;
93
+ /**
94
+ * Connection name for identification
95
+ */
96
+ Name: string;
97
+ /**
98
+ * Additional driver-specific options
99
+ */
100
+ Options: any;
101
+ Migration?: {
102
+ /**
103
+ * Migration table name, if not set default is spinajs_orm_migrations
104
+ */
105
+ Table?: string;
106
+ /**
107
+ * Migration transaction options
108
+ */
109
+ Transaction?: {
110
+ /**
111
+ * How to run migration - with or without transaction
112
+ */
113
+ Mode?: MigrationTransactionMode;
114
+ };
115
+ };
116
+ DefaultConnection: boolean;
117
+ }
118
+ export interface IMigrationDescriptor {
119
+ /**
120
+ * Whitch connection migration will be executed
121
+ */
122
+ Connection: string;
123
+ }
124
+ /**
125
+ * Describes model, used internally
126
+ */
127
+ export interface IModelDescrtiptor {
128
+ /**
129
+ * Primary key name
130
+ */
131
+ PrimaryKey: string;
132
+ /**
133
+ * Connection name, must be avaible in db config
134
+ */
135
+ Connection: string;
136
+ /**
137
+ * Table name in database for this model
138
+ */
139
+ TableName: string;
140
+ /**
141
+ * Optional, describes timestamps in model
142
+ */
143
+ Timestamps: IModelTimestampDescriptor;
144
+ /**
145
+ * Optional, describes soft delete
146
+ */
147
+ SoftDelete: IModelSoftDeleteDescriptor;
148
+ /**
149
+ * Optional, is archive mode enabled
150
+ */
151
+ Archived: IModelArchivedDescriptor;
152
+ /**
153
+ * Column / fields list in model
154
+ */
155
+ Columns: IColumnDescriptor[];
156
+ /**
157
+ * Converters attached to fields
158
+ */
159
+ Converters: Map<string, Constructor<ValueConverter>>;
160
+ /**
161
+ * List of unique columns ( UNIQUE constraint )
162
+ */
163
+ JunctionModelProperties: IJunctionProperty[];
164
+ /**
165
+ * List of relations in model
166
+ */
167
+ Relations: Map<string, IRelationDescriptor>;
168
+ /** Name of model */
169
+ Name: string;
170
+ /**
171
+ * Model discrimination map that allows to create different models based on db field value
172
+ */
173
+ DiscriminationMap: IDiscriminationMap;
174
+ /**
175
+ * Orm driver that this model
176
+ */
177
+ Driver: OrmDriver;
178
+ }
179
+ export interface IDiscriminationMap {
180
+ /**
181
+ * DB field that holds inheritance value
182
+ */
183
+ Field: string;
184
+ /**
185
+ * Field values mapped for proper models
186
+ */
187
+ Models: Map<string, Constructor<ModelBase>>;
188
+ }
189
+ export interface IDiscriminationEntry {
190
+ Key: string;
191
+ Value: Constructor<ModelBase>;
192
+ }
193
+ export declare enum RelationType {
194
+ One = 0,
195
+ Many = 1,
196
+ ManyToMany = 2
197
+ }
198
+ export declare type ForwardRefFunction = () => Constructor<ModelBase>;
199
+ export interface IRelationDescriptor {
200
+ /**
201
+ * Name of relations, defaults for property name in model that owns relation
202
+ */
203
+ Name: string;
204
+ /**
205
+ * Is it one-to-one, one-to-many or many-to-many
206
+ */
207
+ Type: RelationType;
208
+ /**
209
+ * Relation model ( foreign )
210
+ */
211
+ TargetModel: Constructor<ModelBase> | ForwardRefFunction;
212
+ /**
213
+ * Relation owner
214
+ */
215
+ SourceModel: Constructor<ModelBase>;
216
+ /**
217
+ * Relation foreign key (one to one, one to many)
218
+ */
219
+ ForeignKey: string;
220
+ /**
221
+ * Relation primary key (one to one, one to many)
222
+ */
223
+ PrimaryKey: string;
224
+ /**
225
+ * Used in many to many relations, model for join table
226
+ */
227
+ JunctionModel?: Constructor<ModelBase>;
228
+ /**
229
+ * Join table foreign keys, defaults to auto generated field names. Can be override.
230
+ */
231
+ JunctionModelTargetModelFKey_Name?: string;
232
+ JunctionModelSourceModelFKey_Name?: string;
233
+ /**
234
+ * Is this relation recursive ? Used for hierarchical / paren one-to-one relations
235
+ */
236
+ Recursive: boolean;
237
+ }
238
+ export interface IJunctionProperty {
239
+ Name: string;
240
+ Model: Constructor<ModelBase>;
241
+ }
242
+ /**
243
+ * Table column description, used in models to build schema, validate & other stuff
244
+ */
245
+ export interface IColumnDescriptor {
246
+ /**
247
+ * Columnt type eg int, varchar, text
248
+ */
249
+ Type: string;
250
+ /**
251
+ * Max character lenght handled in column
252
+ */
253
+ MaxLength: number;
254
+ /**
255
+ * Column comment, use it for documentation purposes.
256
+ */
257
+ Comment: string;
258
+ /**
259
+ * Default column value
260
+ */
261
+ DefaultValue: any;
262
+ /**
263
+ * Full database type with size/length info & sign eg. int(10) unsigned if avaible
264
+ */
265
+ NativeType: string;
266
+ /**
267
+ * Numeric types sign
268
+ */
269
+ Unsigned: boolean;
270
+ /**
271
+ * Is column nullable (can be null)
272
+ */
273
+ Nullable: boolean;
274
+ /**
275
+ * Is column primary key
276
+ */
277
+ PrimaryKey: boolean;
278
+ /**
279
+ * Is column auto increment
280
+ */
281
+ AutoIncrement: boolean;
282
+ /**
283
+ * Column name
284
+ */
285
+ Name: string;
286
+ /**
287
+ * Value converter between database & model
288
+ */
289
+ Converter: IValueConverter;
290
+ /**
291
+ * JSON schema definition build for this column. Used to automate data validation
292
+ */
293
+ Schema: any;
294
+ /**
295
+ * Does have unique constraint
296
+ */
297
+ Unique: boolean;
298
+ /**
299
+ * Is uuid generated column
300
+ */
301
+ Uuid: boolean;
302
+ Ignore: boolean;
303
+ }
304
+ /**
305
+ * Value converter between model & database data types
306
+ */
307
+ export interface IValueConverter {
308
+ /**
309
+ * Converts value to database type
310
+ *
311
+ * @param value - value to convert
312
+ */
313
+ toDB(value: any): any;
314
+ /**
315
+ * Converts value from database type eg. mysql timestamp to DateTime
316
+ *
317
+ * @param value - value to convert
318
+ */
319
+ fromDB(value: any): any;
320
+ }
321
+ /**
322
+ * Model timestamps description
323
+ */
324
+ export interface IModelTimestampDescriptor {
325
+ /**
326
+ * Created at column name
327
+ */
328
+ CreatedAt: string;
329
+ /**
330
+ * Updated at column name
331
+ */
332
+ UpdatedAt: string;
333
+ }
334
+ /**
335
+ * Model soft delete description
336
+ */
337
+ export interface IModelSoftDeleteDescriptor {
338
+ /**
339
+ * Deleted at column name
340
+ */
341
+ DeletedAt: string;
342
+ }
343
+ export declare abstract class OrmMigration {
344
+ /**
345
+ *
346
+ * Migrate up - create tables, indices etc.
347
+ * Be aware that model function are not avaible yet. To fill tables with
348
+ * data use fill function
349
+ */
350
+ abstract up(connection: OrmDriver): Promise<void>;
351
+ /**
352
+ * Migrate down - undo changes made in up
353
+ */
354
+ abstract down(connection: OrmDriver): Promise<void>;
355
+ }
356
+ /**
357
+ * Model archived description
358
+ */
359
+ export interface IModelArchivedDescriptor {
360
+ /**
361
+ * Archived at column name
362
+ */
363
+ ArchivedAt: string;
364
+ }
365
+ export interface IQueryLimit {
366
+ limit?: number;
367
+ offset?: number;
368
+ }
369
+ export interface ISort {
370
+ column: string;
371
+ order: SORT_ORDER;
372
+ }
373
+ export interface IQueryBuilder {
374
+ Table: string;
375
+ TableAlias: string;
376
+ Schema: string;
377
+ schema(schema: string): IQueryBuilder;
378
+ from(table: string, alias?: string): this;
379
+ setAlias(alias: string): this;
380
+ }
381
+ export interface ILimitBuilder {
382
+ take(count: number): this;
383
+ skip(count: number): this;
384
+ first<T>(): Promise<T>;
385
+ firstOrFail<T>(): Promise<T>;
386
+ getLimits(): IQueryLimit;
387
+ }
388
+ export interface IOrderByBuilder {
389
+ orderBy(column: string): this;
390
+ orderByDescending(column: string): this;
391
+ order(column: string, direction: SORT_ORDER): this;
392
+ getSort(): ISort;
393
+ }
394
+ export interface IColumnsBuilder {
395
+ /**
396
+ * clears selected columns
397
+ */
398
+ clearColumns(): this;
399
+ /**
400
+ *
401
+ * Select columns from db result ( multiple at once )
402
+ *
403
+ * @param names - column names to select
404
+ */
405
+ columns(names: string[]): this;
406
+ /**
407
+ * Return selected columns in this query
408
+ */
409
+ getColumns(): IQueryStatement[];
410
+ /**
411
+ * Selects single column from DB result with optional alias
412
+ * Can be used multiple times
413
+ *
414
+ * @param column - column to select
415
+ * @param alias - column alias ( optional )
416
+ */
417
+ select(column: string, alias?: string): this;
418
+ /**
419
+ * Selects custom values from DB. eg. Count(*)
420
+ *
421
+ * @param rawQuery - raw query to be executed
422
+ */
423
+ select(rawQuery: RawQuery): this;
424
+ /**
425
+ * Selects multiple columns at once with aliases. Map key property is column name, value is its alias
426
+ *
427
+ * @param columns - column list with aliases
428
+ */
429
+ select(columns: Map<string, string>): this;
430
+ }
431
+ export interface IWhereBuilder {
432
+ Statements: IQueryStatement[];
433
+ Op: WhereBoolean;
434
+ where(column: string | boolean | {} | WhereFunction | WrapStatement, operator?: any, value?: any): this;
435
+ orWhere(column: string | boolean | {} | WhereFunction | WrapStatement, operator?: any, value?: any): this;
436
+ andWhere(column: string | boolean | {} | WhereFunction | WrapStatement, operator?: any, value?: any): this;
437
+ whereObject(obj: any): this;
438
+ whereNotNull(column: string): this;
439
+ whereNull(column: string): this;
440
+ whereNot(column: string, val: any): this;
441
+ whereIn(column: string, val: any[]): this;
442
+ whereNotIn(column: string, val: any[]): this;
443
+ whereExist(query: ISelectQueryBuilder): this;
444
+ whereNotExists(query: ISelectQueryBuilder): this;
445
+ whereBetween(column: string, val: any[]): this;
446
+ whereNotBetween(column: string, val: any[]): this;
447
+ whereInSet(column: string, val: any[]): this;
448
+ whereNotInSet(column: string, val: any[]): this;
449
+ clearWhere(): this;
450
+ }
451
+ export interface IWithRecursiveBuilder {
452
+ CteRecursive: IQueryStatement;
453
+ withRecursive(recKeyName: string, pkKeyName: string): this;
454
+ }
455
+ export interface IGroupByBuilder {
456
+ GroupStatements: IQueryStatement[];
457
+ clearGroupBy(): this;
458
+ groupBy(expression: RawQuery | string): this;
459
+ }
460
+ export interface IJoinBuilder {
461
+ JoinStatements: IQueryStatement[];
462
+ clearJoins(): this;
463
+ innerJoin(query: RawQuery): this;
464
+ innerJoin(table: string, foreignKey: string, primaryKey: string): this;
465
+ innerJoin(table: string, tableAlias: string, foreignKey: string, primaryKey: string): this;
466
+ leftJoin(query: RawQuery): this;
467
+ leftJoin(table: string, foreignKey: string, primaryKey: string): this;
468
+ leftJoin(table: string, tableAlias: string, foreignKey: string, primaryKey: string): this;
469
+ leftOuterJoin(query: RawQuery): this;
470
+ leftOuterJoin(table: string, foreignKey: string, primaryKey: string): this;
471
+ leftOuterJoin(table: string, tableAlias: string, foreignKey: string, primaryKey: string): this;
472
+ rightJoin(query: RawQuery): this;
473
+ rightJoin(table: string, foreignKey: string, primaryKey: string): this;
474
+ rightJoin(table: string, tableAlias: string, foreignKey: string, primaryKey: string): this;
475
+ rightOuterJoin(query: RawQuery): this;
476
+ rightOuterJoin(table: string, foreignKey: string, primaryKey: string): this;
477
+ rightOuterJoin(table: string, tableAlias: string, foreignKey: string, primaryKey: string): this;
478
+ fullOuterJoin(query: RawQuery): this;
479
+ fullOuterJoin(table: string, foreignKey: string, primaryKey: string): this;
480
+ fullOuterJoin(table: string, tableAlias: string, foreignKey: string, primaryKey: string): this;
481
+ crossJoin(query: RawQuery): this;
482
+ crossJoin(table: string, foreignKey: string, primaryKey: string): this;
483
+ crossJoin(table: string, tableAlias: string, foreignKey: string, primaryKey: string): this;
484
+ }
485
+ export interface ISelectQueryBuilder extends IColumnsBuilder, IOrderByBuilder, ILimitBuilder, IWhereBuilder, IJoinBuilder, IWithRecursiveBuilder, IGroupByBuilder {
486
+ min(column: string, as?: string): this;
487
+ max(column: string, as?: string): this;
488
+ count(column: string, as?: string): this;
489
+ sum(column: string, as?: string): this;
490
+ avg(column: string, as?: string): this;
491
+ distinct(): this;
492
+ clone(): this;
493
+ }
494
+ export interface ICompilerOutput {
495
+ expression: string;
496
+ bindings: any[];
497
+ }
498
+ export interface IQueryCompiler {
499
+ compile(): ICompilerOutput;
500
+ }
501
+ export interface ILimitCompiler {
502
+ limit(builder: ILimitBuilder): ICompilerOutput;
503
+ }
504
+ export interface IGroupByCompiler {
505
+ group(builder: IGroupByBuilder): ICompilerOutput;
506
+ }
507
+ export interface IRecursiveCompiler {
508
+ recursive(builder: IWithRecursiveBuilder): ICompilerOutput;
509
+ }
510
+ export interface IColumnsCompiler {
511
+ columns(builder: IColumnsBuilder): ICompilerOutput;
512
+ }
513
+ export interface IWhereCompiler {
514
+ where(builder: IWhereBuilder): ICompilerOutput;
515
+ }
516
+ export interface IJoinCompiler {
517
+ join(builder: IJoinBuilder): ICompilerOutput;
518
+ }
519
+ /**
520
+ * Definitions of query compiler are needed for DI resolving
521
+ * ==========================================================
522
+ */
523
+ export declare abstract class RecursiveQueryCompiler implements IQueryCompiler {
524
+ abstract compile(): ICompilerOutput;
525
+ }
526
+ export declare abstract class SelectQueryCompiler implements IQueryCompiler {
527
+ abstract compile(): ICompilerOutput;
528
+ }
529
+ export declare abstract class JoinQueryCompiler implements IQueryCompiler {
530
+ abstract compile(): ICompilerOutput;
531
+ }
532
+ export declare abstract class IndexQueryCompiler implements IQueryCompiler {
533
+ abstract compile(): ICompilerOutput;
534
+ }
535
+ export declare abstract class ForeignKeyQueryCompiler implements IQueryCompiler {
536
+ abstract compile(): ICompilerOutput;
537
+ }
538
+ export declare abstract class DeleteQueryCompiler implements IQueryCompiler {
539
+ abstract compile(): ICompilerOutput;
540
+ }
541
+ export declare abstract class UpdateQueryCompiler implements IQueryCompiler {
542
+ abstract compile(): ICompilerOutput;
543
+ }
544
+ export declare abstract class InsertQueryCompiler implements IQueryCompiler {
545
+ abstract compile(): ICompilerOutput;
546
+ }
547
+ export declare abstract class OnDuplicateQueryCompiler implements IQueryCompiler {
548
+ abstract compile(): ICompilerOutput;
549
+ }
550
+ export declare abstract class TableQueryCompiler implements IQueryCompiler {
551
+ abstract compile(): ICompilerOutput;
552
+ }
553
+ export declare abstract class ColumnQueryCompiler implements IQueryCompiler {
554
+ abstract compile(): ICompilerOutput;
555
+ }
556
+ export declare abstract class OrderByQueryCompiler implements IQueryCompiler {
557
+ abstract compile(): ICompilerOutput;
558
+ }
559
+ export declare abstract class GroupByQueryCompiler implements IQueryCompiler {
560
+ abstract compile(): ICompilerOutput;
561
+ }
562
+ /**
563
+ * ==========================================================
564
+ */
565
+ /**
566
+ * Middlewares for query builders
567
+ */
568
+ export interface IBuilderMiddleware {
569
+ /**
570
+ *
571
+ * Executed AFTER query is executed in DB and raw data is fetched
572
+ * Use it to transform DB data before everything else
573
+ *
574
+ * @param data - raw data fetched from DB
575
+ */
576
+ afterData(data: any[]): any[];
577
+ /**
578
+ * Executed when model is about to create. Use it to
579
+ * override model creation logic. If null is returned, default model
580
+ * is executed
581
+ *
582
+ * @param data - raw data to create
583
+ */
584
+ modelCreation(data: any): ModelBase;
585
+ /**
586
+ * executed after model was created ( all returned data by query is executed)
587
+ *
588
+ * @param data - hydrated data. Models are created and hydrated with data
589
+ */
590
+ afterHydration(data: ModelBase[]): Promise<any[] | void>;
591
+ }
592
+ export declare class ValueConverter implements IValueConverter {
593
+ /**
594
+ * Converts value to database type
595
+ *
596
+ * @param value - value to convert
597
+ */
598
+ toDB(_value: any): any;
599
+ /**
600
+ * Converts value from database type eg. mysql timestamp to DateTime
601
+ *
602
+ * @param value - value to convert
603
+ */
604
+ fromDB(_value: any): any;
605
+ }
606
+ /**
607
+ * Converter for DATETIME field (eg. mysql datetime)
608
+ */
609
+ export declare class DatetimeValueConverter extends ValueConverter {
610
+ }
611
+ /**
612
+ * Converter for set field (eg. mysql SET)
613
+ */
614
+ export declare class SetValueConverter extends ValueConverter {
615
+ }