@housekit/orm 0.1.47 → 0.1.49

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 (79) hide show
  1. package/README.md +120 -5
  2. package/dist/builders/delete.js +112 -0
  3. package/dist/builders/insert.d.ts +0 -91
  4. package/dist/builders/insert.js +393 -0
  5. package/dist/builders/prepared.d.ts +1 -2
  6. package/dist/builders/prepared.js +30 -0
  7. package/dist/builders/select.d.ts +0 -161
  8. package/dist/builders/select.js +562 -0
  9. package/dist/builders/select.types.js +1 -0
  10. package/dist/builders/update.js +136 -0
  11. package/dist/client.d.ts +0 -6
  12. package/dist/client.js +140 -0
  13. package/dist/codegen/zod.js +107 -0
  14. package/dist/column.d.ts +1 -25
  15. package/dist/column.js +133 -0
  16. package/dist/compiler.d.ts +0 -7
  17. package/dist/compiler.js +513 -0
  18. package/dist/core.js +6 -0
  19. package/dist/data-types.d.ts +0 -61
  20. package/dist/data-types.js +127 -0
  21. package/dist/dictionary.d.ts +0 -149
  22. package/dist/dictionary.js +158 -0
  23. package/dist/engines.d.ts +0 -385
  24. package/dist/engines.js +292 -0
  25. package/dist/expressions.d.ts +0 -10
  26. package/dist/expressions.js +268 -0
  27. package/dist/external.d.ts +0 -112
  28. package/dist/external.js +224 -0
  29. package/dist/index.d.ts +0 -51
  30. package/dist/index.js +139 -6853
  31. package/dist/logger.js +36 -0
  32. package/dist/materialized-views.d.ts +0 -188
  33. package/dist/materialized-views.js +380 -0
  34. package/dist/metadata.js +59 -0
  35. package/dist/modules/aggregates.d.ts +0 -164
  36. package/dist/modules/aggregates.js +121 -0
  37. package/dist/modules/array.d.ts +0 -98
  38. package/dist/modules/array.js +71 -0
  39. package/dist/modules/conditional.d.ts +0 -84
  40. package/dist/modules/conditional.js +138 -0
  41. package/dist/modules/conversion.d.ts +0 -147
  42. package/dist/modules/conversion.js +109 -0
  43. package/dist/modules/geo.d.ts +0 -164
  44. package/dist/modules/geo.js +112 -0
  45. package/dist/modules/hash.js +4 -0
  46. package/dist/modules/index.js +12 -0
  47. package/dist/modules/json.d.ts +0 -106
  48. package/dist/modules/json.js +76 -0
  49. package/dist/modules/math.d.ts +0 -16
  50. package/dist/modules/math.js +16 -0
  51. package/dist/modules/string.d.ts +0 -136
  52. package/dist/modules/string.js +89 -0
  53. package/dist/modules/time.d.ts +0 -123
  54. package/dist/modules/time.js +91 -0
  55. package/dist/modules/types.d.ts +0 -133
  56. package/dist/modules/types.js +114 -0
  57. package/dist/modules/window.js +140 -0
  58. package/dist/relational.d.ts +0 -82
  59. package/dist/relational.js +290 -0
  60. package/dist/relations.js +21 -0
  61. package/dist/schema-builder.d.ts +0 -90
  62. package/dist/schema-builder.js +140 -0
  63. package/dist/table.d.ts +0 -42
  64. package/dist/table.js +406 -0
  65. package/dist/utils/background-batcher.js +75 -0
  66. package/dist/utils/batch-transform.js +51 -0
  67. package/dist/utils/binary-reader.d.ts +0 -6
  68. package/dist/utils/binary-reader.js +334 -0
  69. package/dist/utils/binary-serializer.d.ts +0 -125
  70. package/dist/utils/binary-serializer.js +637 -0
  71. package/dist/utils/binary-worker-code.js +1 -0
  72. package/dist/utils/binary-worker-pool.d.ts +0 -34
  73. package/dist/utils/binary-worker-pool.js +206 -0
  74. package/dist/utils/binary-worker.d.ts +0 -11
  75. package/dist/utils/binary-worker.js +63 -0
  76. package/dist/utils/insert-processing.d.ts +0 -2
  77. package/dist/utils/insert-processing.js +163 -0
  78. package/dist/utils/lru-cache.js +30 -0
  79. package/package.json +68 -3
package/dist/engines.d.ts CHANGED
@@ -1,429 +1,148 @@
1
- /**
2
- * HouseKit Engine DSL - First-class ClickHouse Engine Support
3
- *
4
- * This module provides type-safe engine configurations for ClickHouse tables.
5
- * Unlike generic ORMs which often treat engines as raw strings, HouseKit validates engine
6
- * parameters at compile-time and provides intelligent defaults.
7
- */
8
1
  import type { TableDefinition, TableColumns } from './table';
9
- /**
10
- * Base configuration shared by all MergeTree-family engines
11
- */
12
2
  export interface MergeTreeBaseConfig {
13
- /**
14
- * Experimental: Enable lightweight DELETE/UPDATE operations
15
- * Requires ClickHouse 23.3+
16
- */
17
3
  enableLightweightDeletes?: boolean;
18
4
  }
19
- /**
20
- * Configuration for basic MergeTree engine
21
- */
22
5
  export interface MergeTreeConfig extends MergeTreeBaseConfig {
23
6
  type: 'MergeTree';
24
7
  }
25
- /**
26
- * Configuration for ReplacingMergeTree engine
27
- * Used for deduplication scenarios where the last version of a row should be kept
28
- */
29
8
  export interface ReplacingMergeTreeConfig extends MergeTreeBaseConfig {
30
9
  type: 'ReplacingMergeTree';
31
- /** Column used to determine which row version to keep (newer wins) */
32
10
  versionColumn?: string;
33
- /**
34
- * Column indicating if row is deleted (ClickHouse 23.2+)
35
- * When 1, the row is considered deleted during FINAL merges
36
- */
37
11
  isDeletedColumn?: string;
38
12
  }
39
- /**
40
- * Configuration for SummingMergeTree engine
41
- * Automatically sums numeric columns during merges
42
- */
43
13
  export interface SummingMergeTreeConfig extends MergeTreeBaseConfig {
44
14
  type: 'SummingMergeTree';
45
- /** Columns to sum. If empty, sums all numeric columns not in ORDER BY */
46
15
  columns?: string[];
47
16
  }
48
- /**
49
- * Configuration for AggregatingMergeTree engine
50
- * Used with AggregateFunction columns for pre-aggregated materialized views
51
- */
52
17
  export interface AggregatingMergeTreeConfig extends MergeTreeBaseConfig {
53
18
  type: 'AggregatingMergeTree';
54
19
  }
55
- /**
56
- * Configuration for CollapsingMergeTree engine
57
- * Uses a sign column to collapse pairs of rows with opposite signs
58
- */
59
20
  export interface CollapsingMergeTreeConfig extends MergeTreeBaseConfig {
60
21
  type: 'CollapsingMergeTree';
61
- /** Column containing 1 or -1 to indicate row state */
62
22
  signColumn: string;
63
23
  }
64
- /**
65
- * Configuration for VersionedCollapsingMergeTree engine
66
- * Like CollapsingMergeTree but with version column for more robust deduplication
67
- */
68
24
  export interface VersionedCollapsingMergeTreeConfig extends MergeTreeBaseConfig {
69
25
  type: 'VersionedCollapsingMergeTree';
70
- /** Column containing 1 or -1 to indicate row state */
71
26
  signColumn: string;
72
- /** Version column for ordering rows */
73
27
  versionColumn: string;
74
28
  }
75
- /**
76
- * Configuration for GraphiteMergeTree engine
77
- * Optimized for storing Graphite metrics data
78
- */
79
29
  export interface GraphiteMergeTreeConfig extends MergeTreeBaseConfig {
80
30
  type: 'GraphiteMergeTree';
81
- /** Name of the Graphite rollup configuration */
82
31
  configSection: string;
83
32
  }
84
- /**
85
- * Configuration for ReplicatedMergeTree engine
86
- * Provides data replication across ClickHouse cluster nodes
87
- */
88
33
  export interface ReplicatedMergeTreeConfig extends MergeTreeBaseConfig {
89
34
  type: 'ReplicatedMergeTree';
90
- /**
91
- * Path in ZooKeeper for this table's replication
92
- * Supports macros: {shard}, {replica}, {database}, {table}
93
- * @default '/clickhouse/tables/{shard}/{database}/{table}'
94
- */
95
35
  zkPath?: string;
96
- /**
97
- * Unique replica identifier
98
- * Supports macros: {replica}, {hostname}
99
- * @default '{replica}'
100
- */
101
36
  replicaName?: string;
102
- /** Base engine type to replicate (defaults to MergeTree) */
103
37
  baseEngine?: 'MergeTree' | 'ReplacingMergeTree' | 'SummingMergeTree' | 'AggregatingMergeTree' | 'CollapsingMergeTree' | 'VersionedCollapsingMergeTree';
104
- /** Configuration for ReplacingMergeTree base */
105
38
  versionColumn?: string;
106
39
  isDeletedColumn?: string;
107
- /** Configuration for SummingMergeTree base */
108
40
  sumColumns?: string[];
109
- /** Configuration for CollapsingMergeTree base */
110
41
  signColumn?: string;
111
42
  }
112
- /**
113
- * Configuration for Buffer engine
114
- * Buffers writes in memory before flushing to a target table
115
- * Excellent for high-throughput insert scenarios
116
- */
117
43
  export interface BufferConfig {
118
44
  type: 'Buffer';
119
- /** Database of the target table (use 'currentDatabase()' for same database) */
120
45
  database: string;
121
- /** Name of the target table */
122
46
  table: string;
123
- /** Number of buffer layers (typically 16) */
124
47
  layers: number;
125
- /** Minimum time (seconds) before flush */
126
48
  minTime: number;
127
- /** Maximum time (seconds) before flush */
128
49
  maxTime: number;
129
- /** Minimum rows before flush */
130
50
  minRows: number;
131
- /** Maximum rows before flush */
132
51
  maxRows: number;
133
- /** Minimum bytes before flush */
134
52
  minBytes: number;
135
- /** Maximum bytes before flush */
136
53
  maxBytes: number;
137
54
  }
138
- /**
139
- * Configuration for Distributed engine
140
- * Routes queries across a cluster of ClickHouse nodes
141
- */
142
55
  export interface DistributedConfig {
143
56
  type: 'Distributed';
144
- /** Cluster name as defined in ClickHouse configuration */
145
57
  cluster: string;
146
- /** Database name on remote servers */
147
58
  database: string;
148
- /** Table name on remote servers */
149
59
  table: string;
150
- /**
151
- * Expression to determine which shard receives each row
152
- * @default 'rand()'
153
- */
154
60
  shardingKey?: string;
155
- /** Policy name for selecting replicas */
156
61
  policyName?: string;
157
62
  }
158
- /**
159
- * Configuration for Null engine
160
- * Data is discarded (useful for testing or as data sink)
161
- */
162
63
  export interface NullConfig {
163
64
  type: 'Null';
164
65
  }
165
- /**
166
- * Configuration for Log engine
167
- * Simple append-only storage, no indices
168
- */
169
66
  export interface LogConfig {
170
67
  type: 'Log';
171
68
  }
172
- /**
173
- * Configuration for TinyLog engine
174
- * Like Log but stores each column in a separate file
175
- */
176
69
  export interface TinyLogConfig {
177
70
  type: 'TinyLog';
178
71
  }
179
- /**
180
- * Configuration for Memory engine
181
- * Stores data in RAM, lost on restart
182
- */
183
72
  export interface MemoryConfig {
184
73
  type: 'Memory';
185
- /** Maximum number of rows to store */
186
74
  maxRows?: number;
187
- /** Maximum bytes to store */
188
75
  maxBytes?: number;
189
- /** Compress data in memory */
190
76
  compress?: boolean;
191
77
  }
192
- /**
193
- * Configuration for Join engine
194
- * Stores data for JOIN operations
195
- */
196
78
  export interface JoinConfig {
197
79
  type: 'Join';
198
- /** Join strictness: any match or all matches */
199
80
  strictness: 'Any' | 'All' | 'Semi' | 'Anti';
200
- /** Join type */
201
81
  joinType: 'Inner' | 'Left' | 'Right' | 'Full' | 'Cross';
202
- /** Key columns for the join */
203
82
  keys: string[];
204
83
  }
205
- /**
206
- * Configuration for Dictionary engine
207
- * Wraps a ClickHouse dictionary as a table
208
- */
209
84
  export interface DictionaryConfig {
210
85
  type: 'Dictionary';
211
- /** Name of the dictionary */
212
86
  dictionaryName: string;
213
87
  }
214
- /**
215
- * Configuration for File engine
216
- * Reads/writes data from/to a file in a specified format
217
- */
218
88
  export interface FileConfig {
219
89
  type: 'File';
220
- /** Data format (e.g., 'TabSeparated', 'CSV', 'JSONEachRow') */
221
90
  format: string;
222
- /** Optional: compression type */
223
91
  compression?: 'none' | 'gzip' | 'lz4' | 'zstd';
224
92
  }
225
- /**
226
- * Configuration for URL engine
227
- * Reads data from a remote URL
228
- */
229
93
  export interface URLConfig {
230
94
  type: 'URL';
231
- /** URL to read from */
232
95
  url: string;
233
- /** Data format */
234
96
  format: string;
235
- /** Optional: compression type */
236
97
  compression?: 'none' | 'gzip' | 'lz4' | 'zstd';
237
98
  }
238
- /**
239
- * Configuration for S3 engine
240
- * Reads/writes data to Amazon S3
241
- */
242
99
  export interface S3Config {
243
100
  type: 'S3';
244
- /** S3 URL pattern */
245
101
  path: string;
246
- /** Data format */
247
102
  format: string;
248
- /** Optional: AWS access key ID */
249
103
  accessKeyId?: string;
250
- /** Optional: AWS secret access key */
251
104
  secretAccessKey?: string;
252
- /** Optional: compression type */
253
105
  compression?: 'none' | 'gzip' | 'lz4' | 'zstd';
254
106
  }
255
- /**
256
- * Configuration for Kafka engine
257
- * Consumes messages from Apache Kafka
258
- */
259
107
  export interface KafkaConfig {
260
108
  type: 'Kafka';
261
- /** Kafka broker list */
262
109
  brokerList: string;
263
- /** Topic name(s) */
264
110
  topicList: string | string[];
265
- /** Consumer group ID */
266
111
  groupName: string;
267
- /** Data format for messages */
268
112
  format: string;
269
- /** Number of polling threads */
270
113
  numConsumers?: number;
271
- /** Max rows per poll */
272
114
  maxBlockSize?: number;
273
- /** Skip broken messages */
274
115
  skipBroken?: number;
275
116
  }
276
- /**
277
- * Configuration for PostgreSQL engine
278
- * Reads data from PostgreSQL database
279
- */
280
117
  export interface PostgreSQLConfig {
281
118
  type: 'PostgreSQL';
282
- /** PostgreSQL host */
283
119
  host: string;
284
- /** PostgreSQL port */
285
120
  port: number;
286
- /** Database name */
287
121
  database: string;
288
- /** Table name */
289
122
  table: string;
290
- /** Username */
291
123
  user: string;
292
- /** Password */
293
124
  password: string;
294
- /** Schema name */
295
125
  schema?: string;
296
126
  }
297
- /**
298
- * Configuration for MySQL engine
299
- * Reads data from MySQL database
300
- */
301
127
  export interface MySQLConfig {
302
128
  type: 'MySQL';
303
- /** MySQL host */
304
129
  host: string;
305
- /** MySQL port */
306
130
  port: number;
307
- /** Database name */
308
131
  database: string;
309
- /** Table name */
310
132
  table: string;
311
- /** Username */
312
133
  user: string;
313
- /** Password */
314
134
  password: string;
315
135
  }
316
- /**
317
- * Union type of all supported engine configurations
318
- */
319
136
  export type EngineConfiguration = MergeTreeConfig | ReplacingMergeTreeConfig | SummingMergeTreeConfig | AggregatingMergeTreeConfig | CollapsingMergeTreeConfig | VersionedCollapsingMergeTreeConfig | GraphiteMergeTreeConfig | ReplicatedMergeTreeConfig | BufferConfig | DistributedConfig | NullConfig | LogConfig | TinyLogConfig | MemoryConfig | JoinConfig | DictionaryConfig | FileConfig | URLConfig | S3Config | KafkaConfig | PostgreSQLConfig | MySQLConfig;
320
- /**
321
- * Factory functions for creating type-safe engine configurations.
322
- *
323
- * @example
324
- * ```typescript
325
- * import { table, t, Engine } from '@housekit/orm';
326
- *
327
- * const events = table('events', (t) => ({
328
- * id: text('id'),
329
- * timestamp: timestamp('timestamp'),
330
- * }, {
331
- * engine: Engine.ReplicatedMergeTree(),
332
- * orderBy: 'timestamp',
333
- * });
334
- * ```
335
- */
336
137
  export declare const Engine: {
337
- /**
338
- * The most versatile and powerful ClickHouse engine.
339
- * Designed for high-volume data insertion.
340
- * @see https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree
341
- */
342
138
  MergeTree: (options?: Omit<MergeTreeConfig, "type">) => MergeTreeConfig;
343
- /**
344
- * Removes duplicates with the same sorting key during merges.
345
- * @param versionColumn - Column (UInt* or DateTime) to determine which row is the latest.
346
- */
347
139
  ReplacingMergeTree: (versionColumn?: string, isDeletedColumn?: string, options?: Omit<ReplacingMergeTreeConfig, "type" | "versionColumn" | "isDeletedColumn">) => ReplacingMergeTreeConfig;
348
- /**
349
- * SummingMergeTree - automatic summation of numeric columns during merges
350
- *
351
- * @example
352
- * ```typescript
353
- * engine: Engine.SummingMergeTree(['amount', 'count'])
354
- * ```
355
- */
356
140
  SummingMergeTree: (columns?: string[], options?: Omit<SummingMergeTreeConfig, "type" | "columns">) => SummingMergeTreeConfig;
357
- /**
358
- * AggregatingMergeTree - for use with AggregateFunction columns
359
- */
360
141
  AggregatingMergeTree: (options?: Omit<AggregatingMergeTreeConfig, "type">) => AggregatingMergeTreeConfig;
361
- /**
362
- * CollapsingMergeTree - uses sign column to collapse row pairs
363
- *
364
- * @example
365
- * ```typescript
366
- * engine: Engine.CollapsingMergeTree('sign')
367
- * ```
368
- */
369
142
  CollapsingMergeTree: (signColumn: string, options?: Omit<CollapsingMergeTreeConfig, "type" | "signColumn">) => CollapsingMergeTreeConfig;
370
- /**
371
- * VersionedCollapsingMergeTree - CollapsingMergeTree with version support
372
- *
373
- * @example
374
- * ```typescript
375
- * engine: Engine.VersionedCollapsingMergeTree('sign', 'version')
376
- * ```
377
- */
378
143
  VersionedCollapsingMergeTree: (signColumn: string, versionColumn: string, options?: Omit<VersionedCollapsingMergeTreeConfig, "type" | "signColumn" | "versionColumn">) => VersionedCollapsingMergeTreeConfig;
379
- /**
380
- * GraphiteMergeTree - optimized for Graphite metrics
381
- *
382
- * @example
383
- * ```typescript
384
- * engine: Engine.GraphiteMergeTree('graphite_rollup')
385
- * ```
386
- */
387
144
  GraphiteMergeTree: (configSection: string, options?: Omit<GraphiteMergeTreeConfig, "type" | "configSection">) => GraphiteMergeTreeConfig;
388
- /**
389
- * ReplicatedMergeTree - data replication across cluster nodes
390
- *
391
- * HouseKit provides sensible defaults using ClickHouse macros that work
392
- * out-of-the-box in most cluster configurations.
393
- *
394
- * @example
395
- * ```typescript
396
- * // Basic usage with defaults
397
- * engine: Engine.ReplicatedMergeTree()
398
- *
399
- * // Custom ZK path
400
- * engine: Engine.ReplicatedMergeTree({
401
- * zkPath: '/clickhouse/prod/tables/{shard}/events',
402
- * replicaName: '{replica}'
403
- * })
404
- *
405
- * // Replicated ReplacingMergeTree
406
- * engine: Engine.ReplicatedMergeTree({
407
- * baseEngine: 'ReplacingMergeTree',
408
- * versionColumn: 'updated_at'
409
- * })
410
- * ```
411
- */
412
145
  ReplicatedMergeTree: (config?: Omit<ReplicatedMergeTreeConfig, "type">) => ReplicatedMergeTreeConfig;
413
- /**
414
- * Buffer engine - buffers inserts before flushing to a target table
415
- *
416
- * Excellent for high-throughput scenarios where you want to reduce
417
- * the number of parts created by batching inserts.
418
- *
419
- * @example
420
- * ```typescript
421
- * // Create buffer with target table reference
422
- * const eventsBuffer = table('events_buffer', events.$columns, {
423
- * engine: Engine.Buffer(events, { minRows: 1000, maxRows: 10000 })
424
- * });
425
- * ```
426
- */
427
146
  Buffer: <T extends TableColumns>(targetTable: TableDefinition<T>, opts: {
428
147
  minRows: number;
429
148
  maxRows: number;
@@ -433,126 +152,22 @@ export declare const Engine: {
433
152
  minBytes?: number;
434
153
  maxBytes?: number;
435
154
  }) => BufferConfig;
436
- /**
437
- * Buffer engine with explicit database and table names
438
- */
439
155
  BufferExplicit: (config: Omit<BufferConfig, "type">) => BufferConfig;
440
- /**
441
- * Distributed engine - distributes queries across cluster shards
442
- *
443
- * @example
444
- * ```typescript
445
- * const eventsDistributed = table('events_distributed', events.$columns, {
446
- * engine: Engine.Distributed({
447
- * cluster: 'my_cluster',
448
- * database: 'default',
449
- * table: 'events_local',
450
- * shardingKey: 'user_id'
451
- * })
452
- * });
453
- * ```
454
- */
455
156
  Distributed: (config: Omit<DistributedConfig, "type">) => DistributedConfig;
456
- /**
457
- * Null engine - discards all data (useful for testing)
458
- */
459
157
  Null: () => NullConfig;
460
- /**
461
- * Log engine - simple append-only storage
462
- */
463
158
  Log: () => LogConfig;
464
- /**
465
- * TinyLog engine - lightweight logging
466
- */
467
159
  TinyLog: () => TinyLogConfig;
468
- /**
469
- * Memory engine - stores all data in RAM
470
- *
471
- * @example
472
- * ```typescript
473
- * engine: Engine.Memory({ maxRows: 100000 })
474
- * ```
475
- */
476
160
  Memory: (config?: Omit<MemoryConfig, "type">) => MemoryConfig;
477
- /**
478
- * Join engine - optimized for JOIN operations
479
- *
480
- * @example
481
- * ```typescript
482
- * engine: Engine.Join('Any', 'Left', ['user_id'])
483
- * ```
484
- */
485
161
  Join: (strictness: JoinConfig["strictness"], joinType: JoinConfig["joinType"], keys: string[]) => JoinConfig;
486
- /**
487
- * Dictionary engine - wraps a dictionary as a table
488
- */
489
162
  Dictionary: (dictionaryName: string) => DictionaryConfig;
490
- /**
491
- * File engine - read/write from files
492
- *
493
- * @example
494
- * ```typescript
495
- * engine: Engine.File('CSV')
496
- * engine: Engine.File('JSONEachRow', 'gzip')
497
- * ```
498
- */
499
163
  File: (format: string, compression?: FileConfig["compression"]) => FileConfig;
500
- /**
501
- * URL engine - read from remote URLs
502
- */
503
164
  URL: (url: string, format: string, compression?: URLConfig["compression"]) => URLConfig;
504
- /**
505
- * S3 engine - read/write to Amazon S3
506
- *
507
- * @example
508
- * ```typescript
509
- * engine: Engine.S3({
510
- * path: 's3://bucket/path/data.parquet',
511
- * format: 'Parquet'
512
- * })
513
- * ```
514
- */
515
165
  S3: (config: Omit<S3Config, "type">) => S3Config;
516
- /**
517
- * Kafka engine - consume from Kafka topics
518
- *
519
- * @example
520
- * ```typescript
521
- * engine: Engine.Kafka({
522
- * brokerList: 'kafka:9092',
523
- * topicList: 'events',
524
- * groupName: 'clickhouse_consumer',
525
- * format: 'JSONEachRow'
526
- * })
527
- * ```
528
- */
529
166
  Kafka: (config: Omit<KafkaConfig, "type">) => KafkaConfig;
530
- /**
531
- * PostgreSQL engine - read from PostgreSQL
532
- */
533
167
  PostgreSQL: (config: Omit<PostgreSQLConfig, "type">) => PostgreSQLConfig;
534
- /**
535
- * MySQL engine - read from MySQL
536
- */
537
168
  MySQL: (config: Omit<MySQLConfig, "type">) => MySQLConfig;
538
169
  };
539
- /**
540
- * Renders an EngineConfiguration to its SQL representation.
541
- * This is used internally by defineTable() but can be useful for debugging.
542
- *
543
- * @param engine - The engine configuration or raw string
544
- * @returns SQL string for the ENGINE clause
545
- */
546
170
  export declare function renderEngineSQL(engine: EngineConfiguration | undefined): string;
547
- /**
548
- * Checks if an engine configuration is from the MergeTree family
549
- */
550
171
  export declare function isMergeTreeFamily(engine: string | EngineConfiguration | undefined): boolean;
551
- /**
552
- * Checks if an engine configuration is replicated
553
- */
554
172
  export declare function isReplicatedEngine(engine: string | EngineConfiguration | undefined): boolean;
555
- /**
556
- * Extracts the version column from an engine configuration if applicable
557
- */
558
173
  export declare function getVersionColumn(engine: string | EngineConfiguration | undefined): string | undefined;