@syntropix/database 0.0.5 → 0.1.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.
@@ -1,24 +1,25 @@
1
+ import { SortType } from './filter';
2
+ import { SyntropixDBAccessType } from './requests';
1
3
  export declare enum ForeignKeyAction {
2
- CASCADE = "Cascade",
3
- RESTRICT = "Restrict",
4
- SET_NULL = "SetNull",
5
- NO_ACTION = "NoAction",
6
- SET_DEFAULT = "SetDefault"
4
+ Cascade = "Cascade",
5
+ Restrict = "Restrict",
6
+ SetNull = "SetNull",
7
+ NoAction = "NoAction",
8
+ SetDefault = "SetDefault"
7
9
  }
8
10
  export declare enum AggregateFunction {
9
- COUNT = "Count",
10
- SUM = "Sum",
11
- AVG = "AVG",
12
- MIN = "Min",
13
- MAX = "Max",
14
- COUNT_DISTINCT = "CountDistinct"
11
+ Count = "Count",
12
+ Sum = "Sum",
13
+ Avg = "Avg",
14
+ Min = "Min",
15
+ Max = "Max",
16
+ CountDistinct = "CountDistinct"
15
17
  }
16
18
  export interface Sort {
17
19
  column: string;
18
- direction: 'ASCENDING' | 'DESCENDING';
20
+ direction: SortType;
19
21
  }
20
22
  export interface Join {
21
- type: 'INNER' | 'LEFT' | 'RIGHT' | 'FULL';
22
23
  table: string;
23
24
  on: any;
24
25
  }
@@ -31,21 +32,23 @@ export interface GroupBy {
31
32
  columns: string[];
32
33
  }
33
34
  export interface ForeignKey {
34
- from_table: string;
35
- from_column: string;
36
- to_table: string;
37
- to_column: string;
38
- on_delete?: ForeignKeyAction;
39
- on_update?: ForeignKeyAction;
35
+ name?: string;
36
+ fromTable: string;
37
+ fromColumn: string;
38
+ toTable: string;
39
+ toColumn: string;
40
+ onDelete?: ForeignKeyAction;
41
+ onUpdate?: ForeignKeyAction;
40
42
  }
41
43
  export interface Column {
42
44
  name: string;
43
- column_type: string | Record<string, any>;
45
+ columnType: string | Record<string, any>;
44
46
  description?: string;
45
- is_primary_key?: boolean;
46
- is_nullable?: boolean;
47
- auto_increment?: boolean;
47
+ isPrimaryKey?: boolean;
48
+ isNullable?: boolean;
49
+ autoIncrement?: boolean;
48
50
  default?: any;
51
+ defaultAccess?: SyntropixDBAccessType;
49
52
  }
50
53
  export interface Index {
51
54
  name: string;
@@ -56,16 +59,17 @@ export interface SyntropixDBColumn {
56
59
  id: string;
57
60
  name: string;
58
61
  description: string;
59
- column_type: string | Record<string, any>;
60
- is_nullable: boolean;
61
- is_primary_key: boolean;
62
- auto_increment: boolean;
62
+ columnType: string | Record<string, any>;
63
+ isNullable: boolean;
64
+ isPrimaryKey: boolean;
65
+ autoIncrement: boolean;
63
66
  default?: any;
67
+ defaultAccess?: SyntropixDBAccessType;
64
68
  }
65
69
  export interface SyntropixDBTable {
66
70
  id: string;
67
71
  name: string;
68
72
  description: string;
69
- created_at: Date;
73
+ createdAt: Date;
70
74
  columns: SyntropixDBColumn[];
71
75
  }
@@ -1,18 +1,17 @@
1
- // Common types used across the SDK
2
1
  export var ForeignKeyAction;
3
2
  (function (ForeignKeyAction) {
4
- ForeignKeyAction["CASCADE"] = "Cascade";
5
- ForeignKeyAction["RESTRICT"] = "Restrict";
6
- ForeignKeyAction["SET_NULL"] = "SetNull";
7
- ForeignKeyAction["NO_ACTION"] = "NoAction";
8
- ForeignKeyAction["SET_DEFAULT"] = "SetDefault";
3
+ ForeignKeyAction["Cascade"] = "Cascade";
4
+ ForeignKeyAction["Restrict"] = "Restrict";
5
+ ForeignKeyAction["SetNull"] = "SetNull";
6
+ ForeignKeyAction["NoAction"] = "NoAction";
7
+ ForeignKeyAction["SetDefault"] = "SetDefault";
9
8
  })(ForeignKeyAction || (ForeignKeyAction = {}));
10
9
  export var AggregateFunction;
11
10
  (function (AggregateFunction) {
12
- AggregateFunction["COUNT"] = "Count";
13
- AggregateFunction["SUM"] = "Sum";
14
- AggregateFunction["AVG"] = "AVG";
15
- AggregateFunction["MIN"] = "Min";
16
- AggregateFunction["MAX"] = "Max";
17
- AggregateFunction["COUNT_DISTINCT"] = "CountDistinct";
11
+ AggregateFunction["Count"] = "Count";
12
+ AggregateFunction["Sum"] = "Sum";
13
+ AggregateFunction["Avg"] = "Avg";
14
+ AggregateFunction["Min"] = "Min";
15
+ AggregateFunction["Max"] = "Max";
16
+ AggregateFunction["CountDistinct"] = "CountDistinct";
18
17
  })(AggregateFunction || (AggregateFunction = {}));
@@ -1,39 +1,49 @@
1
- export declare class DataType {
2
- static readonly Integer = "Integer";
3
- static readonly String: (maxLength: number) => {
4
- type: string;
5
- maxLength: number;
6
- };
7
- static readonly Text = "Text";
8
- static readonly Boolean = "Boolean";
9
- static readonly DateTime = "DateTime";
10
- static readonly Timestamp = "Timestamp";
11
- static readonly Date = "Date";
12
- static readonly Json = "Json";
13
- static readonly Uuid = "Uuid";
14
- static readonly Double = "Double";
15
- static readonly Vector: (dimensions: number) => {
16
- type: string;
17
- dimensions: number;
18
- };
19
- static readonly Array: (dataType: string | Record<string, any>) => {
20
- type: string;
21
- dataType: string | Record<string, any>;
22
- };
23
- static readonly Enum: (name: string, variants: string[]) => {
24
- type: string;
25
- name: string;
26
- variants: string[];
27
- };
28
- static readonly Money: (precision: number, scale: number) => {
29
- type: string;
30
- precision: number;
31
- scale: number;
32
- };
33
- static readonly Decimal: (precision: number, scale: number) => {
34
- type: string;
35
- precision: number;
36
- scale: number;
37
- };
1
+ interface StringType {
2
+ type: 'String';
3
+ maxLength: number;
38
4
  }
39
- export type ColumnType = string | Record<string, any>;
5
+ interface VectorType {
6
+ type: 'Vector';
7
+ dimensions: number;
8
+ }
9
+ interface ArrayType {
10
+ type: 'Array';
11
+ dataType: string | Record<string, any>;
12
+ }
13
+ interface EnumType {
14
+ type: 'Enum';
15
+ name: string;
16
+ variants: string[];
17
+ }
18
+ interface MoneyType {
19
+ type: 'Money';
20
+ precision: number;
21
+ scale: number;
22
+ }
23
+ interface DecimalType {
24
+ type: 'Decimal';
25
+ precision: number;
26
+ scale: number;
27
+ }
28
+ export declare const ColumnType: {
29
+ readonly Integer: "Integer";
30
+ readonly String: (maxLength: number) => StringType;
31
+ readonly Text: "Text";
32
+ readonly Boolean: "Boolean";
33
+ readonly DateTime: "DateTime";
34
+ readonly Timestamp: "Timestamp";
35
+ readonly Date: "Date";
36
+ readonly Json: "Json";
37
+ readonly Uuid: "Uuid";
38
+ readonly Double: "Double";
39
+ readonly Vector: (dimensions: number) => VectorType;
40
+ readonly Array: (dataType: string | Record<string, any>) => ArrayType;
41
+ readonly Enum: (name: string, variants: string[]) => EnumType;
42
+ readonly Money: (precision: number, scale: number) => MoneyType;
43
+ readonly Decimal: (precision: number, scale: number) => DecimalType;
44
+ };
45
+ type DataTypeMap = typeof ColumnType;
46
+ type DataTypeValues = DataTypeMap[keyof DataTypeMap];
47
+ type DataTypeReturnTypes = ReturnType<Extract<DataTypeValues, (...args: any[]) => any>>;
48
+ export type ColumnType = Exclude<DataTypeValues, (...args: any[]) => any> | DataTypeReturnTypes;
49
+ export {};
@@ -1,20 +1,19 @@
1
- // Data type definitions for database columns
2
- export class DataType {
1
+ export const ColumnType = {
3
2
  // Basic types
4
- static Integer = 'Integer';
5
- static String = (maxLength) => ({ type: 'String', maxLength });
6
- static Text = 'Text';
7
- static Boolean = 'Boolean';
8
- static DateTime = 'DateTime';
9
- static Timestamp = 'Timestamp';
10
- static Date = 'Date';
11
- static Json = 'Json';
12
- static Uuid = 'Uuid';
13
- static Double = 'Double';
3
+ Integer: 'Integer',
4
+ String: (maxLength) => ({ type: 'String', maxLength }),
5
+ Text: 'Text',
6
+ Boolean: 'Boolean',
7
+ DateTime: 'DateTime',
8
+ Timestamp: 'Timestamp',
9
+ Date: 'Date',
10
+ Json: 'Json',
11
+ Uuid: 'Uuid',
12
+ Double: 'Double',
14
13
  // Complex types
15
- static Vector = (dimensions) => ({ type: 'Vector', dimensions });
16
- static Array = (dataType) => ({ type: 'Array', dataType });
17
- static Enum = (name, variants) => ({ type: 'Enum', name, variants });
18
- static Money = (precision, scale) => ({ type: 'Money', precision, scale });
19
- static Decimal = (precision, scale) => ({ type: 'Decimal', precision, scale });
20
- }
14
+ Vector: (dimensions) => ({ type: 'Vector', dimensions }),
15
+ Array: (dataType) => ({ type: 'Array', dataType }),
16
+ Enum: (name, variants) => ({ type: 'Enum', name, variants }),
17
+ Money: (precision, scale) => ({ type: 'Money', precision, scale }),
18
+ Decimal: (precision, scale) => ({ type: 'Decimal', precision, scale }),
19
+ };
@@ -7,16 +7,16 @@ export interface TableCreateResponse {
7
7
  id: string;
8
8
  name: string;
9
9
  description: string;
10
- created_at: any;
10
+ createdAt: any;
11
11
  columns: Column[];
12
- foreign_keys: ForeignKey[];
12
+ foreignKeys: ForeignKey[];
13
13
  indexes: Index[];
14
14
  schema: string;
15
- default_access: string | null;
15
+ defaultAccess: string | null;
16
16
  };
17
- created_at: any;
18
- updated_at: any;
19
- created_by: string;
17
+ createdAt: any;
18
+ updatedAt: any;
19
+ createdBy: string;
20
20
  metadata: Record<string, any>;
21
21
  triggers: any[];
22
22
  }
@@ -1,20 +1,23 @@
1
1
  import { Column, ForeignKeyAction } from './common';
2
2
  import { ColumnType } from './data-type';
3
+ import { SyntropixDBAccessType } from './requests';
3
4
  export declare abstract class Field {
4
5
  name: string;
5
6
  description: string;
6
- column_type: ColumnType;
7
- is_primary_key: boolean;
8
- is_nullable: boolean;
9
- auto_increment: boolean;
7
+ columnType: ColumnType;
8
+ isPrimaryKey: boolean;
9
+ isNullable: boolean;
10
+ autoIncrement: boolean;
10
11
  default?: any;
12
+ defaultAccess?: SyntropixDBAccessType;
11
13
  constructor(column_type: ColumnType, options?: {
12
14
  name?: string;
13
15
  description?: string;
14
- is_primary_key?: boolean;
15
- is_nullable?: boolean;
16
- auto_increment?: boolean;
16
+ isPrimaryKey?: boolean;
17
+ isNullable?: boolean;
18
+ autoIncrement?: boolean;
17
19
  default?: any;
20
+ defaultAccess?: SyntropixDBAccessType;
18
21
  });
19
22
  into(): Column;
20
23
  }
@@ -23,133 +26,149 @@ export declare class ForeignKeyField extends Field {
23
26
  columnName: string;
24
27
  onDelete: ForeignKeyAction;
25
28
  onUpdate: ForeignKeyAction;
26
- constructor(column_type: ColumnType, tableName: string, columnName: string, options?: {
29
+ constructor(columnType: ColumnType, tableName: string, columnName: string, options?: {
27
30
  onDelete?: ForeignKeyAction;
28
31
  onUpdate?: ForeignKeyAction;
29
32
  description?: string;
30
- is_primary_key?: boolean;
31
- is_nullable?: boolean;
33
+ isPrimaryKey?: boolean;
34
+ isNullable?: boolean;
32
35
  default?: any;
36
+ defaultAccess?: SyntropixDBAccessType;
33
37
  });
34
38
  }
35
39
  export declare class StringField extends Field {
36
40
  constructor(maxLength: number, options?: {
37
41
  description?: string;
38
- is_primary_key?: boolean;
39
- is_nullable?: boolean;
42
+ isPrimaryKey?: boolean;
43
+ isNullable?: boolean;
40
44
  default?: string;
45
+ defaultAccess?: SyntropixDBAccessType;
41
46
  });
42
47
  }
43
48
  export declare class TextField extends Field {
44
49
  constructor(options?: {
45
50
  description?: string;
46
- is_primary_key?: boolean;
47
- is_nullable?: boolean;
51
+ isPrimaryKey?: boolean;
52
+ isNullable?: boolean;
48
53
  default?: string;
54
+ defaultAccess?: SyntropixDBAccessType;
49
55
  });
50
56
  }
51
57
  export declare class IntegerField extends Field {
52
58
  constructor(options?: {
53
59
  description?: string;
54
- is_primary_key?: boolean;
55
- is_nullable?: boolean;
56
- auto_increment?: boolean;
60
+ isPrimaryKey?: boolean;
61
+ isNullable?: boolean;
62
+ autoIncrement?: boolean;
57
63
  default?: number;
64
+ defaultAccess?: SyntropixDBAccessType;
58
65
  });
59
66
  }
60
67
  export declare class BooleanField extends Field {
61
68
  constructor(options?: {
62
69
  description?: string;
63
- is_primary_key?: boolean;
64
- is_nullable?: boolean;
70
+ isPrimaryKey?: boolean;
71
+ isNullable?: boolean;
65
72
  default?: boolean;
73
+ defaultAccess?: SyntropixDBAccessType;
66
74
  });
67
75
  }
68
76
  export declare class DateTimeField extends Field {
69
77
  constructor(options?: {
70
78
  description?: string;
71
- is_primary_key?: boolean;
72
- is_nullable?: boolean;
79
+ isPrimaryKey?: boolean;
80
+ isNullable?: boolean;
73
81
  default?: Date;
82
+ defaultAccess?: SyntropixDBAccessType;
74
83
  });
75
84
  }
76
85
  export declare class TimestampField extends Field {
77
86
  constructor(options?: {
78
87
  description?: string;
79
- is_primary_key?: boolean;
80
- is_nullable?: boolean;
88
+ isPrimaryKey?: boolean;
89
+ isNullable?: boolean;
81
90
  default?: Date;
91
+ defaultAccess?: SyntropixDBAccessType;
82
92
  });
83
93
  }
84
94
  export declare class DateField extends Field {
85
95
  constructor(options?: {
86
96
  description?: string;
87
- is_primary_key?: boolean;
88
- is_nullable?: boolean;
97
+ isPrimaryKey?: boolean;
98
+ isNullable?: boolean;
89
99
  default?: Date;
100
+ defaultAccess?: SyntropixDBAccessType;
90
101
  });
91
102
  }
92
103
  export declare class JsonField extends Field {
93
104
  constructor(options?: {
94
105
  description?: string;
95
- is_primary_key?: boolean;
96
- is_nullable?: boolean;
106
+ isPrimaryKey?: boolean;
107
+ isNullable?: boolean;
97
108
  default?: Record<string, any>;
109
+ defaultAccess?: SyntropixDBAccessType;
98
110
  });
99
111
  }
100
112
  export declare class UuidField extends Field {
101
113
  constructor(options?: {
102
114
  description?: string;
103
- is_primary_key?: boolean;
104
- is_nullable?: boolean;
115
+ isPrimaryKey?: boolean;
116
+ isNullable?: boolean;
105
117
  default?: string;
118
+ defaultAccess?: SyntropixDBAccessType;
106
119
  });
107
120
  }
108
121
  export declare class VectorField extends Field {
109
122
  constructor(dimensions: number, options?: {
110
123
  description?: string;
111
- is_primary_key?: boolean;
112
- is_nullable?: boolean;
124
+ isPrimaryKey?: boolean;
125
+ isNullable?: boolean;
113
126
  default?: number[];
127
+ defaultAccess?: SyntropixDBAccessType;
114
128
  });
115
129
  }
116
130
  export declare class ArrayField extends Field {
117
131
  constructor(dataType: ColumnType, options?: {
118
132
  description?: string;
119
- is_primary_key?: boolean;
120
- is_nullable?: boolean;
133
+ isPrimaryKey?: boolean;
134
+ isNullable?: boolean;
121
135
  default?: any[];
136
+ defaultAccess?: SyntropixDBAccessType;
122
137
  });
123
138
  }
124
139
  export declare class EnumField extends Field {
125
140
  constructor(name: string, variants: string[], options?: {
126
141
  description?: string;
127
- is_primary_key?: boolean;
128
- is_nullable?: boolean;
142
+ isPrimaryKey?: boolean;
143
+ isNullable?: boolean;
129
144
  default?: string;
145
+ defaultAccess?: SyntropixDBAccessType;
130
146
  });
131
147
  }
132
148
  export declare class MoneyField extends Field {
133
149
  constructor(precision: number, scale: number, options?: {
134
150
  description?: string;
135
- is_primary_key?: boolean;
136
- is_nullable?: boolean;
151
+ isPrimaryKey?: boolean;
152
+ isNullable?: boolean;
137
153
  default?: number;
154
+ defaultAccess?: SyntropixDBAccessType;
138
155
  });
139
156
  }
140
157
  export declare class DecimalField extends Field {
141
158
  constructor(precision: number, scale: number, options?: {
142
159
  description?: string;
143
- is_primary_key?: boolean;
144
- is_nullable?: boolean;
160
+ isPrimaryKey?: boolean;
161
+ isNullable?: boolean;
145
162
  default?: number;
163
+ defaultAccess?: SyntropixDBAccessType;
146
164
  });
147
165
  }
148
166
  export declare class DoubleField extends Field {
149
167
  constructor(options?: {
150
168
  description?: string;
151
- is_primary_key?: boolean;
152
- is_nullable?: boolean;
169
+ isPrimaryKey?: boolean;
170
+ isNullable?: boolean;
153
171
  default?: number;
172
+ defaultAccess?: SyntropixDBAccessType;
154
173
  });
155
174
  }
@@ -1,32 +1,35 @@
1
1
  // Field definitions for ORM
2
2
  import { ForeignKeyAction } from './common';
3
- import { DataType } from './data-type';
3
+ import { ColumnType } from './data-type';
4
4
  export class Field {
5
5
  name = '';
6
6
  description = '';
7
- column_type;
8
- is_primary_key = false;
9
- is_nullable = false;
10
- auto_increment = false;
7
+ columnType;
8
+ isPrimaryKey = false;
9
+ isNullable = false;
10
+ autoIncrement = false;
11
11
  default;
12
+ defaultAccess;
12
13
  constructor(column_type, options = {}) {
13
- this.column_type = column_type;
14
+ this.columnType = column_type;
14
15
  this.name = options.name?.toLowerCase() || '';
15
16
  this.description = options.description || '';
16
- this.is_primary_key = options.is_primary_key || false;
17
- this.is_nullable = options.is_nullable || false;
18
- this.auto_increment = options.auto_increment || false;
17
+ this.isPrimaryKey = options.isPrimaryKey || false;
18
+ this.isNullable = options.isNullable || false;
19
+ this.autoIncrement = options.autoIncrement || false;
19
20
  this.default = options.default;
21
+ this.defaultAccess = options.defaultAccess;
20
22
  }
21
23
  into() {
22
24
  return {
23
25
  name: this.name,
24
- column_type: this.column_type,
26
+ columnType: this.columnType,
25
27
  description: this.description,
26
- is_primary_key: this.is_primary_key,
27
- is_nullable: this.is_nullable,
28
- auto_increment: this.auto_increment,
28
+ isPrimaryKey: this.isPrimaryKey,
29
+ isNullable: this.isNullable,
30
+ autoIncrement: this.autoIncrement,
29
31
  default: this.default,
32
+ defaultAccess: this.defaultAccess,
30
33
  };
31
34
  }
32
35
  }
@@ -35,86 +38,86 @@ export class ForeignKeyField extends Field {
35
38
  columnName;
36
39
  onDelete;
37
40
  onUpdate;
38
- constructor(column_type, tableName, columnName, options = {}) {
39
- super(column_type, options);
41
+ constructor(columnType, tableName, columnName, options = {}) {
42
+ super(columnType, options);
40
43
  this.tableName = tableName;
41
44
  this.columnName = columnName;
42
- this.onDelete = options.onDelete || ForeignKeyAction.CASCADE;
43
- this.onUpdate = options.onUpdate || ForeignKeyAction.CASCADE;
45
+ this.onDelete = options.onDelete || ForeignKeyAction.Cascade;
46
+ this.onUpdate = options.onUpdate || ForeignKeyAction.Cascade;
44
47
  }
45
48
  }
46
49
  export class StringField extends Field {
47
50
  constructor(maxLength, options = {}) {
48
- super(DataType.String(maxLength), options);
51
+ super(ColumnType.String(maxLength), options);
49
52
  }
50
53
  }
51
54
  export class TextField extends Field {
52
55
  constructor(options = {}) {
53
- super(DataType.Text, options);
56
+ super(ColumnType.Text, options);
54
57
  }
55
58
  }
56
59
  export class IntegerField extends Field {
57
60
  constructor(options = {}) {
58
- super(DataType.Integer, options);
61
+ super(ColumnType.Integer, options);
59
62
  }
60
63
  }
61
64
  export class BooleanField extends Field {
62
65
  constructor(options = {}) {
63
- super(DataType.Boolean, options);
66
+ super(ColumnType.Boolean, options);
64
67
  }
65
68
  }
66
69
  export class DateTimeField extends Field {
67
70
  constructor(options = {}) {
68
- super(DataType.DateTime, options);
71
+ super(ColumnType.DateTime, options);
69
72
  }
70
73
  }
71
74
  export class TimestampField extends Field {
72
75
  constructor(options = {}) {
73
- super(DataType.Timestamp, options);
76
+ super(ColumnType.Timestamp, options);
74
77
  }
75
78
  }
76
79
  export class DateField extends Field {
77
80
  constructor(options = {}) {
78
- super(DataType.Date, options);
81
+ super(ColumnType.Date, options);
79
82
  }
80
83
  }
81
84
  export class JsonField extends Field {
82
85
  constructor(options = {}) {
83
- super(DataType.Json, options);
86
+ super(ColumnType.Json, options);
84
87
  }
85
88
  }
86
89
  export class UuidField extends Field {
87
90
  constructor(options = {}) {
88
- super(DataType.Uuid, options);
91
+ super(ColumnType.Uuid, options);
89
92
  }
90
93
  }
91
94
  export class VectorField extends Field {
92
95
  constructor(dimensions, options = {}) {
93
- super(DataType.Vector(dimensions), options);
96
+ super(ColumnType.Vector(dimensions), options);
94
97
  }
95
98
  }
96
99
  export class ArrayField extends Field {
97
100
  constructor(dataType, options = {}) {
98
- super(DataType.Array(dataType), options);
101
+ super(ColumnType.Array(dataType), options);
99
102
  }
100
103
  }
101
104
  export class EnumField extends Field {
102
105
  constructor(name, variants, options = {}) {
103
- super(DataType.Enum(name, variants), options);
106
+ super(ColumnType.Enum(name, variants), options);
104
107
  }
105
108
  }
106
109
  export class MoneyField extends Field {
107
110
  constructor(precision, scale, options = {}) {
108
- super(DataType.Money(precision, scale), options);
111
+ super(ColumnType.Money(precision, scale), options);
109
112
  }
110
113
  }
111
114
  export class DecimalField extends Field {
112
115
  constructor(precision, scale, options = {}) {
113
- super(DataType.Decimal(precision, scale), options);
116
+ super(ColumnType.Decimal(precision, scale), options);
114
117
  }
115
118
  }
116
119
  export class DoubleField extends Field {
117
120
  constructor(options = {}) {
118
- super(DataType.Double, options);
121
+ super(ColumnType.Double, options);
119
122
  }
120
123
  }