metal-orm 1.0.45 → 1.0.46

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 (47) hide show
  1. package/dist/index.cjs +72 -4
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +72 -4
  4. package/dist/index.d.ts +72 -4
  5. package/dist/index.js +69 -4
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/core/ast/adapters.ts +2 -1
  9. package/src/core/ddl/dialects/base-schema-dialect.ts +2 -1
  10. package/src/core/ddl/dialects/mssql-schema-dialect.ts +10 -23
  11. package/src/core/ddl/dialects/mysql-schema-dialect.ts +10 -24
  12. package/src/core/ddl/dialects/postgres-schema-dialect.ts +10 -23
  13. package/src/core/ddl/dialects/render-reference.test.ts +2 -1
  14. package/src/core/ddl/dialects/sqlite-schema-dialect.ts +9 -23
  15. package/src/core/ddl/introspect/catalogs/postgres.ts +2 -1
  16. package/src/core/ddl/introspect/mssql.ts +17 -1
  17. package/src/core/ddl/introspect/postgres.ts +2 -1
  18. package/src/core/ddl/introspect/sqlite.ts +2 -1
  19. package/src/core/ddl/schema-dialect.ts +2 -1
  20. package/src/core/ddl/schema-diff.ts +2 -1
  21. package/src/core/ddl/schema-generator.ts +2 -1
  22. package/src/core/ddl/schema-types.ts +2 -1
  23. package/src/core/ddl/sql-writing.ts +2 -1
  24. package/src/core/functions/datetime.ts +2 -1
  25. package/src/core/functions/numeric.ts +2 -1
  26. package/src/core/functions/text.ts +2 -1
  27. package/src/decorators/{column.ts → column-decorator.ts} +4 -1
  28. package/src/decorators/index.ts +1 -1
  29. package/src/index.ts +2 -1
  30. package/src/orm/entity-metadata.ts +2 -1
  31. package/src/orm/lazy-batch.ts +2 -1
  32. package/src/orm/orm-session.ts +2 -1
  33. package/src/query-builder/column-selector.ts +2 -1
  34. package/src/query-builder/delete.ts +2 -1
  35. package/src/query-builder/insert.ts +2 -1
  36. package/src/query-builder/query-ast-service.ts +2 -1
  37. package/src/query-builder/relation-projection-helper.ts +2 -1
  38. package/src/query-builder/relation-service.ts +2 -1
  39. package/src/query-builder/select/predicate-facet.ts +2 -1
  40. package/src/query-builder/select/projection-facet.ts +2 -1
  41. package/src/query-builder/select-helpers.ts +2 -1
  42. package/src/query-builder/select.ts +2 -1
  43. package/src/query-builder/update.ts +2 -1
  44. package/src/schema/{column.ts → column-types.ts} +317 -290
  45. package/src/schema/table-guards.ts +1 -1
  46. package/src/schema/table.ts +1 -1
  47. package/src/schema/types.ts +10 -8
@@ -1,290 +1,317 @@
1
- /**
2
- * Supported column data types for database schema definitions
3
- */
4
- export type ColumnType =
5
- | 'INT'
6
- | 'INTEGER'
7
- | 'BIGINT'
8
- | 'VARCHAR'
9
- | 'TEXT'
10
- | 'JSON'
11
- | 'ENUM'
12
- | 'DECIMAL'
13
- | 'FLOAT'
14
- | 'DOUBLE'
15
- | 'UUID'
16
- | 'BINARY'
17
- | 'VARBINARY'
18
- | 'BLOB'
19
- | 'BYTEA'
20
- | 'DATE'
21
- | 'DATETIME'
22
- | 'TIMESTAMP'
23
- | 'TIMESTAMPTZ'
24
- | 'BOOLEAN'
25
- | 'int'
26
- | 'integer'
27
- | 'bigint'
28
- | 'varchar'
29
- | 'text'
30
- | 'json'
31
- | 'enum'
32
- | 'decimal'
33
- | 'float'
34
- | 'double'
35
- | 'uuid'
36
- | 'binary'
37
- | 'varbinary'
38
- | 'blob'
39
- | 'bytea'
40
- | 'date'
41
- | 'datetime'
42
- | 'timestamp'
43
- | 'timestamptz'
44
- | 'boolean';
45
-
46
- export type ReferentialAction =
47
- | 'NO ACTION'
48
- | 'RESTRICT'
49
- | 'CASCADE'
50
- | 'SET NULL'
51
- | 'SET DEFAULT';
52
-
53
- export interface RawDefaultValue {
54
- raw: string;
55
- }
56
-
57
- export type DefaultValue = unknown | RawDefaultValue;
58
-
59
- export interface ForeignKeyReference {
60
- /** Target table name */
61
- table: string;
62
- /** Target column name */
63
- column: string;
64
- /** Optional constraint name */
65
- name?: string;
66
- /** ON DELETE action */
67
- onDelete?: ReferentialAction;
68
- /** ON UPDATE action */
69
- onUpdate?: ReferentialAction;
70
- /** Whether the constraint is deferrable (Postgres) */
71
- deferrable?: boolean;
72
- }
73
-
74
- /**
75
- * Definition of a database column
76
- */
77
- export interface ColumnDef<T extends ColumnType = ColumnType, TRuntime = unknown> {
78
- /** Column name (filled at runtime by defineTable) */
79
- name: string;
80
- /** Data type of the column */
81
- type: T;
82
- /** Optional override for the inferred TypeScript type */
83
- tsType?: TRuntime;
84
- /** Whether this column is a primary key */
85
- primary?: boolean;
86
- /** Whether this column cannot be null */
87
- notNull?: boolean;
88
- /** Whether this column must be unique (or name of the unique constraint) */
89
- unique?: boolean | string;
90
- /** Default value for the column */
91
- default?: DefaultValue;
92
- /** Whether the column auto-increments / identity */
93
- autoIncrement?: boolean;
94
- /** Identity strategy where supported */
95
- generated?: 'always' | 'byDefault';
96
- /** Inline check constraint expression */
97
- check?: string;
98
- /** Foreign key reference */
99
- references?: ForeignKeyReference;
100
- /** Column comment/description */
101
- comment?: string;
102
- /** Additional arguments for the column type (e.g., VARCHAR length) */
103
- args?: unknown[];
104
- /** Table name this column belongs to (filled at runtime by defineTable) */
105
- table?: string;
106
- }
107
-
108
- /**
109
- * Factory for creating column definitions with common data types
110
- */
111
- export const col = {
112
- /**
113
- * Creates an integer column definition
114
- * @returns ColumnDef with INT type
115
- */
116
- int: (): ColumnDef<'INT'> => ({ name: '', type: 'INT' }),
117
-
118
- /**
119
- * Creates a big integer column definition
120
- */
121
- bigint: (): ColumnDef<'BIGINT'> => ({ name: '', type: 'BIGINT' }),
122
-
123
- /**
124
- * Creates a variable character column definition
125
- * @param length - Maximum length of the string
126
- * @returns ColumnDef with VARCHAR type
127
- */
128
- varchar: (length: number): ColumnDef<'VARCHAR'> => ({ name: '', type: 'VARCHAR', args: [length] }),
129
-
130
- /**
131
- * Creates a fixed precision decimal column definition
132
- */
133
- decimal: (precision: number, scale = 0): ColumnDef<'DECIMAL'> => ({
134
- name: '',
135
- type: 'DECIMAL',
136
- args: [precision, scale]
137
- }),
138
-
139
- /**
140
- * Creates a floating point column definition
141
- */
142
- float: (precision?: number): ColumnDef<'FLOAT'> => ({
143
- name: '',
144
- type: 'FLOAT',
145
- args: precision !== undefined ? [precision] : undefined
146
- }),
147
-
148
- /**
149
- * Creates a UUID column definition
150
- */
151
- uuid: (): ColumnDef<'UUID'> => ({ name: '', type: 'UUID' }),
152
-
153
- /**
154
- * Creates a binary large object column definition
155
- */
156
- blob: (): ColumnDef<'BLOB'> => ({ name: '', type: 'BLOB' }),
157
-
158
- /**
159
- * Creates a fixed-length binary column definition
160
- */
161
- binary: (length?: number): ColumnDef<'BINARY'> => ({
162
- name: '',
163
- type: 'BINARY',
164
- args: length !== undefined ? [length] : undefined
165
- }),
166
-
167
- /**
168
- * Creates a variable-length binary column definition
169
- */
170
- varbinary: (length?: number): ColumnDef<'VARBINARY'> => ({
171
- name: '',
172
- type: 'VARBINARY',
173
- args: length !== undefined ? [length] : undefined
174
- }),
175
-
176
- /**
177
- * Creates a Postgres bytea column definition
178
- */
179
- bytea: (): ColumnDef<'BYTEA'> => ({ name: '', type: 'BYTEA' }),
180
-
181
- /**
182
- * Creates a timestamp column definition
183
- */
184
- timestamp: <TRuntime = string>(): ColumnDef<'TIMESTAMP', TRuntime> => ({ name: '', type: 'TIMESTAMP' }),
185
-
186
- /**
187
- * Creates a timestamptz column definition
188
- */
189
- timestamptz: <TRuntime = string>(): ColumnDef<'TIMESTAMPTZ', TRuntime> => ({ name: '', type: 'TIMESTAMPTZ' }),
190
-
191
- /**
192
- * Creates a date column definition
193
- */
194
- date: <TRuntime = string>(): ColumnDef<'DATE', TRuntime> => ({ name: '', type: 'DATE' }),
195
-
196
- /**
197
- * Creates a datetime column definition
198
- */
199
- datetime: <TRuntime = string>(): ColumnDef<'DATETIME', TRuntime> => ({ name: '', type: 'DATETIME' }),
200
-
201
- /**
202
- * Creates a JSON column definition
203
- * @returns ColumnDef with JSON type
204
- */
205
- json: (): ColumnDef<'JSON'> => ({ name: '', type: 'JSON' }),
206
-
207
- /**
208
- * Creates a boolean column definition
209
- * @returns ColumnDef with BOOLEAN type
210
- */
211
- boolean: (): ColumnDef<'BOOLEAN'> => ({ name: '', type: 'BOOLEAN' }),
212
-
213
- /**
214
- * Creates an enum column definition
215
- * @param values - Enum values
216
- */
217
- enum: (values: string[]): ColumnDef<'ENUM'> => ({ name: '', type: 'ENUM', args: values }),
218
-
219
- /**
220
- * Marks a column definition as a primary key
221
- * @param def - Column definition to modify
222
- * @returns Modified ColumnDef with primary: true
223
- */
224
- primaryKey: <T extends ColumnType>(def: ColumnDef<T>): ColumnDef<T> =>
225
- ({ ...def, primary: true }),
226
-
227
- /**
228
- * Marks a column as NOT NULL
229
- */
230
- notNull: <T extends ColumnType>(def: ColumnDef<T>): ColumnDef<T> =>
231
- ({ ...def, notNull: true }),
232
-
233
- /**
234
- * Marks a column as UNIQUE
235
- */
236
- unique: <T extends ColumnType>(def: ColumnDef<T>, name?: string): ColumnDef<T> =>
237
- ({
238
- ...def,
239
- unique: name ?? true
240
- }),
241
-
242
- /**
243
- * Sets a default value for the column
244
- */
245
- default: <T extends ColumnType>(def: ColumnDef<T>, value: unknown): ColumnDef<T> =>
246
- ({
247
- ...def,
248
- default: value
249
- }),
250
-
251
- /**
252
- * Sets a raw SQL default value for the column
253
- */
254
- defaultRaw: <T extends ColumnType>(def: ColumnDef<T>, expression: string): ColumnDef<T> =>
255
- ({
256
- ...def,
257
- default: { raw: expression }
258
- }),
259
-
260
- /**
261
- * Marks a column as auto-increment / identity
262
- */
263
- autoIncrement: <T extends ColumnType>(
264
- def: ColumnDef<T>,
265
- strategy: ColumnDef['generated'] = 'byDefault'
266
- ): ColumnDef<T> =>
267
- ({
268
- ...def,
269
- autoIncrement: true,
270
- generated: strategy
271
- }),
272
-
273
- /**
274
- * Adds a foreign key reference
275
- */
276
- references: <T extends ColumnType>(def: ColumnDef<T>, ref: ForeignKeyReference): ColumnDef<T> =>
277
- ({
278
- ...def,
279
- references: ref
280
- }),
281
-
282
- /**
283
- * Adds a check constraint to the column
284
- */
285
- check: <T extends ColumnType>(def: ColumnDef<T>, expression: string): ColumnDef<T> =>
286
- ({
287
- ...def,
288
- check: expression
289
- })
290
- };
1
+ /**
2
+ * Canonical, dialect-agnostic column data types.
3
+ * Keep this intentionally small; dialect-specific names should be expressed via `dialectTypes`.
4
+ */
5
+ export const STANDARD_COLUMN_TYPES = [
6
+ 'INT',
7
+ 'INTEGER',
8
+ 'BIGINT',
9
+ 'VARCHAR',
10
+ 'TEXT',
11
+ 'JSON',
12
+ 'ENUM',
13
+ 'DECIMAL',
14
+ 'FLOAT',
15
+ 'DOUBLE',
16
+ 'UUID',
17
+ 'BINARY',
18
+ 'VARBINARY',
19
+ 'BLOB',
20
+ 'DATE',
21
+ 'DATETIME',
22
+ 'TIMESTAMP',
23
+ 'TIMESTAMPTZ',
24
+ 'BOOLEAN'
25
+ ] as const;
26
+
27
+ /** Known logical types the ORM understands. */
28
+ export type StandardColumnType = (typeof STANDARD_COLUMN_TYPES)[number];
29
+
30
+ /**
31
+ * Column type value.
32
+ * We allow arbitrary strings so new/dialect-specific types don't require touching this module.
33
+ */
34
+ export type ColumnType = StandardColumnType | (string & {});
35
+
36
+ const STANDARD_TYPE_SET = new Set<string>(STANDARD_COLUMN_TYPES.map(t => t.toLowerCase()));
37
+
38
+ /**
39
+ * Normalizes a column type to its canonical lowercase form when it's one of the known logical types.
40
+ * Unknown/custom types are returned untouched to avoid clobbering dialect-specific casing.
41
+ */
42
+ export const normalizeColumnType = (type: ColumnType): ColumnType => {
43
+ if (typeof type !== 'string') return type;
44
+ const lower = type.toLowerCase();
45
+ return STANDARD_TYPE_SET.has(lower) ? lower : type;
46
+ };
47
+
48
+ /**
49
+ * Renders a raw SQL type name with optional parameters.
50
+ */
51
+ export const renderTypeWithArgs = (sqlType: string, args?: unknown[]): string => {
52
+ if (!args || args.length === 0) return sqlType;
53
+ return `${sqlType}(${args.join(', ')})`;
54
+ };
55
+
56
+ export type ReferentialAction =
57
+ | 'NO ACTION'
58
+ | 'RESTRICT'
59
+ | 'CASCADE'
60
+ | 'SET NULL'
61
+ | 'SET DEFAULT';
62
+
63
+ export interface RawDefaultValue {
64
+ raw: string;
65
+ }
66
+
67
+ export type DefaultValue = unknown | RawDefaultValue;
68
+
69
+ export interface ForeignKeyReference {
70
+ /** Target table name */
71
+ table: string;
72
+ /** Target column name */
73
+ column: string;
74
+ /** Optional constraint name */
75
+ name?: string;
76
+ /** ON DELETE action */
77
+ onDelete?: ReferentialAction;
78
+ /** ON UPDATE action */
79
+ onUpdate?: ReferentialAction;
80
+ /** Whether the constraint is deferrable (Postgres) */
81
+ deferrable?: boolean;
82
+ }
83
+
84
+ /**
85
+ * Definition of a database column
86
+ */
87
+ export interface ColumnDef<T extends ColumnType = ColumnType, TRuntime = unknown> {
88
+ /** Column name (filled at runtime by defineTable) */
89
+ name: string;
90
+ /** Data type of the column */
91
+ type: T;
92
+ /** Optional explicit SQL type per dialect (e.g., { postgres: 'bytea' }) */
93
+ dialectTypes?: Partial<Record<string, string>>;
94
+ /** Optional override for the inferred TypeScript type */
95
+ tsType?: TRuntime;
96
+ /** Whether this column is a primary key */
97
+ primary?: boolean;
98
+ /** Whether this column cannot be null */
99
+ notNull?: boolean;
100
+ /** Whether this column must be unique (or name of the unique constraint) */
101
+ unique?: boolean | string;
102
+ /** Default value for the column */
103
+ default?: DefaultValue;
104
+ /** Whether the column auto-increments / identity */
105
+ autoIncrement?: boolean;
106
+ /** Identity strategy where supported */
107
+ generated?: 'always' | 'byDefault';
108
+ /** Inline check constraint expression */
109
+ check?: string;
110
+ /** Foreign key reference */
111
+ references?: ForeignKeyReference;
112
+ /** Column comment/description */
113
+ comment?: string;
114
+ /** Additional arguments for the column type (e.g., VARCHAR length) */
115
+ args?: unknown[];
116
+ /** Table name this column belongs to (filled at runtime by defineTable) */
117
+ table?: string;
118
+ }
119
+
120
+ /**
121
+ * Factory for creating column definitions with common data types
122
+ */
123
+ export const col = {
124
+ /**
125
+ * Creates an integer column definition
126
+ * @returns ColumnDef with INT type
127
+ */
128
+ int: (): ColumnDef<'INT'> => ({ name: '', type: 'INT' }),
129
+
130
+ /**
131
+ * Creates a big integer column definition
132
+ */
133
+ bigint: (): ColumnDef<'BIGINT'> => ({ name: '', type: 'BIGINT' }),
134
+
135
+ /**
136
+ * Creates a variable character column definition
137
+ * @param length - Maximum length of the string
138
+ * @returns ColumnDef with VARCHAR type
139
+ */
140
+ varchar: (length: number): ColumnDef<'VARCHAR'> => ({ name: '', type: 'VARCHAR', args: [length] }),
141
+
142
+ /**
143
+ * Creates a fixed precision decimal column definition
144
+ */
145
+ decimal: (precision: number, scale = 0): ColumnDef<'DECIMAL'> => ({
146
+ name: '',
147
+ type: 'DECIMAL',
148
+ args: [precision, scale]
149
+ }),
150
+
151
+ /**
152
+ * Creates a floating point column definition
153
+ */
154
+ float: (precision?: number): ColumnDef<'FLOAT'> => ({
155
+ name: '',
156
+ type: 'FLOAT',
157
+ args: precision !== undefined ? [precision] : undefined
158
+ }),
159
+
160
+ /**
161
+ * Creates a UUID column definition
162
+ */
163
+ uuid: (): ColumnDef<'UUID'> => ({ name: '', type: 'UUID' }),
164
+
165
+ /**
166
+ * Creates a binary large object column definition
167
+ */
168
+ blob: (): ColumnDef<'BLOB'> => ({ name: '', type: 'BLOB' }),
169
+
170
+ /**
171
+ * Creates a fixed-length binary column definition
172
+ */
173
+ binary: (length?: number): ColumnDef<'BINARY'> => ({
174
+ name: '',
175
+ type: 'BINARY',
176
+ args: length !== undefined ? [length] : undefined
177
+ }),
178
+
179
+ /**
180
+ * Creates a variable-length binary column definition
181
+ */
182
+ varbinary: (length?: number): ColumnDef<'VARBINARY'> => ({
183
+ name: '',
184
+ type: 'VARBINARY',
185
+ args: length !== undefined ? [length] : undefined
186
+ }),
187
+
188
+ /**
189
+ * Creates a Postgres bytea column definition
190
+ */
191
+ bytea: (): ColumnDef<'BYTEA'> => ({
192
+ name: '',
193
+ type: 'BYTEA'
194
+ }),
195
+
196
+ /**
197
+ * Creates a timestamp column definition
198
+ */
199
+ timestamp: <TRuntime = string>(): ColumnDef<'TIMESTAMP', TRuntime> => ({ name: '', type: 'TIMESTAMP' }),
200
+
201
+ /**
202
+ * Creates a timestamptz column definition
203
+ */
204
+ timestamptz: <TRuntime = string>(): ColumnDef<'TIMESTAMPTZ', TRuntime> => ({ name: '', type: 'TIMESTAMPTZ' }),
205
+
206
+ /**
207
+ * Creates a date column definition
208
+ */
209
+ date: <TRuntime = string>(): ColumnDef<'DATE', TRuntime> => ({ name: '', type: 'DATE' }),
210
+
211
+ /**
212
+ * Creates a datetime column definition
213
+ */
214
+ datetime: <TRuntime = string>(): ColumnDef<'DATETIME', TRuntime> => ({ name: '', type: 'DATETIME' }),
215
+
216
+ /**
217
+ * Creates a JSON column definition
218
+ * @returns ColumnDef with JSON type
219
+ */
220
+ json: (): ColumnDef<'JSON'> => ({ name: '', type: 'JSON' }),
221
+
222
+ /**
223
+ * Creates a boolean column definition
224
+ * @returns ColumnDef with BOOLEAN type
225
+ */
226
+ boolean: (): ColumnDef<'BOOLEAN'> => ({ name: '', type: 'BOOLEAN' }),
227
+
228
+ /**
229
+ * Creates an enum column definition
230
+ * @param values - Enum values
231
+ */
232
+ enum: (values: string[]): ColumnDef<'ENUM'> => ({ name: '', type: 'ENUM', args: values }),
233
+
234
+ /**
235
+ * Creates a column definition with a custom SQL type.
236
+ * Useful for dialect-specific types without polluting the standard set.
237
+ */
238
+ custom: (type: string, opts: { dialect?: string; args?: unknown[]; tsType?: unknown } = {}): ColumnDef => ({
239
+ name: '',
240
+ type,
241
+ args: opts.args,
242
+ tsType: opts.tsType,
243
+ dialectTypes: opts.dialect ? { [opts.dialect]: type } : undefined
244
+ }),
245
+
246
+ /**
247
+ * Marks a column definition as a primary key
248
+ * @param def - Column definition to modify
249
+ * @returns Modified ColumnDef with primary: true
250
+ */
251
+ primaryKey: <T extends ColumnType>(def: ColumnDef<T>): ColumnDef<T> =>
252
+ ({ ...def, primary: true }),
253
+
254
+ /**
255
+ * Marks a column as NOT NULL
256
+ */
257
+ notNull: <T extends ColumnType>(def: ColumnDef<T>): ColumnDef<T> =>
258
+ ({ ...def, notNull: true }),
259
+
260
+ /**
261
+ * Marks a column as UNIQUE
262
+ */
263
+ unique: <T extends ColumnType>(def: ColumnDef<T>, name?: string): ColumnDef<T> =>
264
+ ({
265
+ ...def,
266
+ unique: name ?? true
267
+ }),
268
+
269
+ /**
270
+ * Sets a default value for the column
271
+ */
272
+ default: <T extends ColumnType>(def: ColumnDef<T>, value: unknown): ColumnDef<T> =>
273
+ ({
274
+ ...def,
275
+ default: value
276
+ }),
277
+
278
+ /**
279
+ * Sets a raw SQL default value for the column
280
+ */
281
+ defaultRaw: <T extends ColumnType>(def: ColumnDef<T>, expression: string): ColumnDef<T> =>
282
+ ({
283
+ ...def,
284
+ default: { raw: expression }
285
+ }),
286
+
287
+ /**
288
+ * Marks a column as auto-increment / identity
289
+ */
290
+ autoIncrement: <T extends ColumnType>(
291
+ def: ColumnDef<T>,
292
+ strategy: ColumnDef['generated'] = 'byDefault'
293
+ ): ColumnDef<T> =>
294
+ ({
295
+ ...def,
296
+ autoIncrement: true,
297
+ generated: strategy
298
+ }),
299
+
300
+ /**
301
+ * Adds a foreign key reference
302
+ */
303
+ references: <T extends ColumnType>(def: ColumnDef<T>, ref: ForeignKeyReference): ColumnDef<T> =>
304
+ ({
305
+ ...def,
306
+ references: ref
307
+ }),
308
+
309
+ /**
310
+ * Adds a check constraint to the column
311
+ */
312
+ check: <T extends ColumnType>(def: ColumnDef<T>, expression: string): ColumnDef<T> =>
313
+ ({
314
+ ...def,
315
+ check: expression
316
+ })
317
+ };
@@ -1,4 +1,4 @@
1
- import { ColumnDef } from './column.js';
1
+ import { ColumnDef } from './column-types.js';
2
2
  import type { TableDef } from './table.js';
3
3
 
4
4
  const isColumnsRecord = (columns: unknown): columns is Record<string, ColumnDef> => {
@@ -1,4 +1,4 @@
1
- import type { ColumnDef } from './column.js';
1
+ import type { ColumnDef } from './column-types.js';
2
2
  import type { RelationDef } from './relation.js';
3
3
 
4
4
  export interface IndexColumn {