@db-bridge/core 1.0.0 → 1.1.3

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.
package/dist/index.d.ts CHANGED
@@ -90,11 +90,11 @@ type AggregateFunction = 'COUNT' | 'SUM' | 'AVG' | 'MIN' | 'MAX';
90
90
  interface TableSchema<T extends Record<string, unknown>> {
91
91
  name: TableName;
92
92
  columns: {
93
- [K in keyof T]: ColumnDefinition<T[K]>;
93
+ [K in keyof T]: ColumnDefinition$1<T[K]>;
94
94
  };
95
95
  primaryKey: keyof T;
96
96
  }
97
- interface ColumnDefinition<T> {
97
+ interface ColumnDefinition$1<T> {
98
98
  type: FieldType;
99
99
  nullable: boolean;
100
100
  defaultValue?: T;
@@ -939,7 +939,7 @@ declare class MetricsCollector extends EventEmitter {
939
939
  exportPrometheus(): string;
940
940
  }
941
941
 
942
- interface Migration {
942
+ interface Migration$1 {
943
943
  id: string;
944
944
  version: number;
945
945
  name: string;
@@ -967,10 +967,10 @@ declare class MigrationRunner {
967
967
  private options;
968
968
  constructor(adapter: DatabaseAdapter, options?: MigrationRunnerOptions);
969
969
  initialize(): Promise<void>;
970
- addMigration(migration: Migration): void;
971
- addMigrations(migrations: Migration[]): void;
970
+ addMigration(migration: Migration$1): void;
971
+ addMigrations(migrations: Migration$1[]): void;
972
972
  getExecutedMigrations(): Promise<MigrationHistory[]>;
973
- getPendingMigrations(): Promise<Migration[]>;
973
+ getPendingMigrations(): Promise<Migration$1[]>;
974
974
  private calculateChecksum;
975
975
  up(targetVersion?: number): Promise<void>;
976
976
  down(targetVersion: number): Promise<void>;
@@ -981,7 +981,7 @@ declare class MigrationRunner {
981
981
  private runMigration;
982
982
  status(): Promise<{
983
983
  executed: MigrationHistory[];
984
- pending: Migration[];
984
+ pending: Migration$1[];
985
985
  current: number | null;
986
986
  }>;
987
987
  validate(): Promise<{
@@ -990,6 +990,475 @@ declare class MigrationRunner {
990
990
  }>;
991
991
  }
992
992
 
993
+ type ColumnType = 'increments' | 'bigIncrements' | 'integer' | 'bigInteger' | 'smallInteger' | 'tinyInteger' | 'float' | 'double' | 'decimal' | 'string' | 'text' | 'mediumText' | 'longText' | 'boolean' | 'date' | 'datetime' | 'timestamp' | 'time' | 'json' | 'jsonb' | 'uuid' | 'binary' | 'enum';
994
+ interface ColumnDefinition {
995
+ name: string;
996
+ type: ColumnType;
997
+ length?: number;
998
+ precision?: number;
999
+ scale?: number;
1000
+ enumValues?: string[];
1001
+ nullable: boolean;
1002
+ defaultValue?: unknown;
1003
+ defaultRaw?: string;
1004
+ unsigned: boolean;
1005
+ autoIncrement: boolean;
1006
+ primary: boolean;
1007
+ unique: boolean;
1008
+ index: boolean;
1009
+ comment?: string;
1010
+ after?: string;
1011
+ first: boolean;
1012
+ references?: ForeignKeyDefinition;
1013
+ }
1014
+ interface ForeignKeyDefinition {
1015
+ column: string;
1016
+ table: string;
1017
+ referenceColumn: string;
1018
+ onDelete?: ForeignKeyAction;
1019
+ onUpdate?: ForeignKeyAction;
1020
+ name?: string;
1021
+ }
1022
+ type ForeignKeyAction = 'CASCADE' | 'SET NULL' | 'SET DEFAULT' | 'RESTRICT' | 'NO ACTION';
1023
+ interface IndexDefinition {
1024
+ name?: string;
1025
+ columns: string[];
1026
+ unique: boolean;
1027
+ type?: 'btree' | 'hash' | 'fulltext' | 'spatial';
1028
+ }
1029
+ interface TableDefinition {
1030
+ name: string;
1031
+ columns: ColumnDefinition[];
1032
+ indexes: IndexDefinition[];
1033
+ foreignKeys: ForeignKeyDefinition[];
1034
+ primaryKey?: string[];
1035
+ engine?: string;
1036
+ charset?: string;
1037
+ collation?: string;
1038
+ comment?: string;
1039
+ }
1040
+ type AlterOperation = {
1041
+ type: 'addColumn';
1042
+ column: ColumnDefinition;
1043
+ } | {
1044
+ type: 'dropColumn';
1045
+ name: string;
1046
+ } | {
1047
+ type: 'renameColumn';
1048
+ from: string;
1049
+ to: string;
1050
+ } | {
1051
+ type: 'modifyColumn';
1052
+ column: ColumnDefinition;
1053
+ } | {
1054
+ type: 'addIndex';
1055
+ index: IndexDefinition;
1056
+ } | {
1057
+ type: 'dropIndex';
1058
+ name: string;
1059
+ } | {
1060
+ type: 'addForeignKey';
1061
+ foreignKey: ForeignKeyDefinition;
1062
+ } | {
1063
+ type: 'dropForeignKey';
1064
+ name: string;
1065
+ } | {
1066
+ type: 'addPrimary';
1067
+ columns: string[];
1068
+ } | {
1069
+ type: 'dropPrimary';
1070
+ };
1071
+ interface AlterTableDefinition {
1072
+ tableName: string;
1073
+ operations: AlterOperation[];
1074
+ }
1075
+ type Dialect = 'mysql' | 'postgresql';
1076
+ interface SchemaDialect {
1077
+ dialect: Dialect;
1078
+ createTable(definition: TableDefinition): string;
1079
+ dropTable(tableName: string): string;
1080
+ dropTableIfExists(tableName: string): string;
1081
+ renameTable(from: string, to: string): string;
1082
+ alterTable(definition: AlterTableDefinition): string[];
1083
+ hasTable(tableName: string): string;
1084
+ hasColumn(tableName: string, columnName: string): string;
1085
+ quoteIdentifier(name: string): string;
1086
+ quoteValue(value: unknown): string;
1087
+ }
1088
+
1089
+ declare class ColumnBuilder {
1090
+ private definition;
1091
+ constructor(name: string, type: ColumnType);
1092
+ length(length: number): this;
1093
+ precision(precision: number, scale?: number): this;
1094
+ nullable(): this;
1095
+ notNull(): this;
1096
+ notNullable(): this;
1097
+ default(value: unknown): this;
1098
+ defaultRaw(sql: string): this;
1099
+ defaultNow(): this;
1100
+ unsigned(): this;
1101
+ autoIncrement(): this;
1102
+ primary(): this;
1103
+ unique(): this;
1104
+ index(): this;
1105
+ comment(comment: string): this;
1106
+ after(columnName: string): this;
1107
+ first(): this;
1108
+ values(values: string[]): this;
1109
+ references(column: string): ForeignKeyBuilder;
1110
+ setForeignKey(fk: ForeignKeyDefinition): void;
1111
+ getDefinition(): ColumnDefinition;
1112
+ }
1113
+ declare class ForeignKeyBuilder {
1114
+ private columnBuilder;
1115
+ private fkDefinition;
1116
+ constructor(columnBuilder: ColumnBuilder, referenceColumn: string);
1117
+ on(tableName: string): this;
1118
+ inTable(tableName: string): this;
1119
+ onDelete(action: ForeignKeyAction): this;
1120
+ onUpdate(action: ForeignKeyAction): this;
1121
+ name(name: string): this;
1122
+ private applyToColumn;
1123
+ getColumnBuilder(): ColumnBuilder;
1124
+ }
1125
+
1126
+ declare class TableBuilder {
1127
+ private tableName;
1128
+ private columns;
1129
+ private indexes;
1130
+ private foreignKeys;
1131
+ private primaryKeyColumns?;
1132
+ private tableEngine?;
1133
+ private tableCharset?;
1134
+ private tableCollation?;
1135
+ private tableComment?;
1136
+ constructor(tableName: string);
1137
+ increments(name?: string): ColumnBuilder;
1138
+ bigIncrements(name?: string): ColumnBuilder;
1139
+ integer(name: string): ColumnBuilder;
1140
+ bigInteger(name: string): ColumnBuilder;
1141
+ smallInteger(name: string): ColumnBuilder;
1142
+ tinyInteger(name: string): ColumnBuilder;
1143
+ float(name: string): ColumnBuilder;
1144
+ double(name: string): ColumnBuilder;
1145
+ decimal(name: string, precision?: number, scale?: number): ColumnBuilder;
1146
+ string(name: string, length?: number): ColumnBuilder;
1147
+ text(name: string): ColumnBuilder;
1148
+ mediumText(name: string): ColumnBuilder;
1149
+ longText(name: string): ColumnBuilder;
1150
+ boolean(name: string): ColumnBuilder;
1151
+ date(name: string): ColumnBuilder;
1152
+ datetime(name: string): ColumnBuilder;
1153
+ timestamp(name: string): ColumnBuilder;
1154
+ time(name: string): ColumnBuilder;
1155
+ json(name: string): ColumnBuilder;
1156
+ jsonb(name: string): ColumnBuilder;
1157
+ uuid(name: string): ColumnBuilder;
1158
+ binary(name: string): ColumnBuilder;
1159
+ enum(name: string, values: string[]): ColumnBuilder;
1160
+ timestamps(): void;
1161
+ softDeletes(): ColumnBuilder;
1162
+ foreignId(name: string): ColumnBuilder;
1163
+ uuidPrimary(name?: string): ColumnBuilder;
1164
+ index(columns: string | string[], name?: string): this;
1165
+ unique(columns: string | string[], name?: string): this;
1166
+ fulltext(columns: string | string[], name?: string): this;
1167
+ primary(columns: string | string[]): this;
1168
+ foreign(column: string): ForeignKeyChain;
1169
+ addForeignKey(fk: ForeignKeyDefinition): void;
1170
+ engine(engine: string): this;
1171
+ charset(charset: string): this;
1172
+ collation(collation: string): this;
1173
+ comment(comment: string): this;
1174
+ private addColumn;
1175
+ getDefinition(): TableDefinition;
1176
+ }
1177
+ declare class ForeignKeyChain {
1178
+ private tableBuilder;
1179
+ private fkDefinition;
1180
+ constructor(tableBuilder: TableBuilder, column: string);
1181
+ references(column: string): this;
1182
+ on(tableName: string): this;
1183
+ inTable(tableName: string): this;
1184
+ onDelete(action: ForeignKeyAction): this;
1185
+ onUpdate(action: ForeignKeyAction): this;
1186
+ name(name: string): this;
1187
+ private apply;
1188
+ }
1189
+
1190
+ interface SchemaBuilderOptions {
1191
+ dialect: Dialect;
1192
+ adapter?: DatabaseAdapter;
1193
+ }
1194
+ declare class SchemaBuilder {
1195
+ private dialectInstance;
1196
+ private adapter?;
1197
+ constructor(options: SchemaBuilderOptions);
1198
+ get dialect(): SchemaDialect;
1199
+ createTable(tableName: string, callback: (table: TableBuilder) => void): Promise<void>;
1200
+ createTableIfNotExists(tableName: string, callback: (table: TableBuilder) => void): Promise<void>;
1201
+ dropTable(tableName: string): Promise<void>;
1202
+ dropTableIfExists(tableName: string): Promise<void>;
1203
+ renameTable(from: string, to: string): Promise<void>;
1204
+ hasTable(tableName: string): Promise<boolean>;
1205
+ hasColumn(tableName: string, columnName: string): Promise<boolean>;
1206
+ alterTable(tableName: string, callback: (table: AlterTableBuilder) => void): Promise<void>;
1207
+ raw(sql: string, params?: unknown[]): Promise<void>;
1208
+ private execute;
1209
+ private query;
1210
+ generateCreateTableSQL(tableName: string, callback: (table: TableBuilder) => void): string;
1211
+ generateAlterTableSQL(tableName: string, callback: (table: AlterTableBuilder) => void): string[];
1212
+ }
1213
+ declare class AlterTableBuilder {
1214
+ private tableName;
1215
+ private operations;
1216
+ constructor(tableName: string);
1217
+ addColumn(name: string, type: ColumnDefinition['type'], options?: Partial<Omit<ColumnDefinition, 'name' | 'type'>>): this;
1218
+ dropColumn(name: string): this;
1219
+ renameColumn(from: string, to: string): this;
1220
+ modifyColumn(name: string, type: ColumnDefinition['type'], options?: Partial<Omit<ColumnDefinition, 'name' | 'type'>>): this;
1221
+ addIndex(columns: string | string[], name?: string): this;
1222
+ addUnique(columns: string | string[], name?: string): this;
1223
+ dropIndex(name: string): this;
1224
+ addForeign(column: string): AlterForeignKeyBuilder;
1225
+ addForeignKeyOperation(fk: ForeignKeyDefinition): void;
1226
+ dropForeign(name: string): this;
1227
+ addPrimary(columns: string | string[]): this;
1228
+ dropPrimary(): this;
1229
+ getDefinition(): AlterTableDefinition;
1230
+ }
1231
+ declare class AlterForeignKeyBuilder {
1232
+ private builder;
1233
+ private fkDefinition;
1234
+ constructor(builder: AlterTableBuilder, column: string);
1235
+ references(column: string): this;
1236
+ on(tableName: string): this;
1237
+ onDelete(action: ForeignKeyDefinition['onDelete']): this;
1238
+ onUpdate(action: ForeignKeyDefinition['onUpdate']): this;
1239
+ name(name: string): this;
1240
+ private apply;
1241
+ }
1242
+
1243
+ declare class MySQLDialect$1 implements SchemaDialect {
1244
+ readonly dialect: "mysql";
1245
+ quoteIdentifier(name: string): string;
1246
+ quoteValue(value: unknown): string;
1247
+ createTable(definition: TableDefinition): string;
1248
+ dropTable(tableName: string): string;
1249
+ dropTableIfExists(tableName: string): string;
1250
+ renameTable(from: string, to: string): string;
1251
+ alterTable(definition: AlterTableDefinition): string[];
1252
+ hasTable(tableName: string): string;
1253
+ hasColumn(tableName: string, columnName: string): string;
1254
+ private columnToSQL;
1255
+ private columnTypeToSQL;
1256
+ private indexToSQL;
1257
+ private foreignKeyToSQL;
1258
+ }
1259
+
1260
+ declare class PostgreSQLDialect$1 implements SchemaDialect {
1261
+ readonly dialect: "postgresql";
1262
+ quoteIdentifier(name: string): string;
1263
+ quoteValue(value: unknown): string;
1264
+ createTable(definition: TableDefinition): string;
1265
+ dropTable(tableName: string): string;
1266
+ dropTableIfExists(tableName: string): string;
1267
+ renameTable(from: string, to: string): string;
1268
+ alterTable(definition: AlterTableDefinition): string[];
1269
+ hasTable(tableName: string): string;
1270
+ hasColumn(tableName: string, columnName: string): string;
1271
+ createIndex(tableName: string, index: IndexDefinition): string;
1272
+ private columnToSQL;
1273
+ private columnTypeToSQL;
1274
+ private foreignKeyToSQL;
1275
+ }
1276
+
1277
+ interface MigrationFile {
1278
+ name: string;
1279
+ path: string;
1280
+ timestamp: string;
1281
+ description: string;
1282
+ }
1283
+ interface Migration {
1284
+ name: string;
1285
+ up: (schema: SchemaBuilder) => Promise<void>;
1286
+ down: (schema: SchemaBuilder) => Promise<void>;
1287
+ transactional?: boolean;
1288
+ phase?: 'expand' | 'migrate' | 'contract';
1289
+ }
1290
+ interface MigrationRecord {
1291
+ id: number;
1292
+ name: string;
1293
+ batch: number;
1294
+ executed_at: Date;
1295
+ execution_time_ms: number;
1296
+ checksum: string;
1297
+ }
1298
+ interface MigrationStatus {
1299
+ name: string;
1300
+ batch: number | null;
1301
+ executedAt: Date | null;
1302
+ pending: boolean;
1303
+ }
1304
+ interface MigrationConfig {
1305
+ directory: string;
1306
+ tableName?: string;
1307
+ lockTableName?: string;
1308
+ lockTimeout?: number;
1309
+ validateChecksums?: boolean;
1310
+ dialect: 'mysql' | 'postgresql';
1311
+ }
1312
+ interface MigrationLock$1 {
1313
+ id: number;
1314
+ is_locked: boolean;
1315
+ locked_at: Date | null;
1316
+ locked_by: string | null;
1317
+ }
1318
+ interface BatchInfo {
1319
+ batch: number;
1320
+ migrations: MigrationRecord[];
1321
+ }
1322
+
1323
+ interface FileMigrationRunnerOptions extends MigrationConfig {
1324
+ logger?: Logger;
1325
+ dryRun?: boolean;
1326
+ }
1327
+ declare class FileMigrationRunner {
1328
+ private adapter;
1329
+ private loader;
1330
+ private lock;
1331
+ private schema;
1332
+ private options;
1333
+ constructor(adapter: DatabaseAdapter, options: FileMigrationRunnerOptions);
1334
+ initialize(): Promise<void>;
1335
+ latest(): Promise<string[]>;
1336
+ rollback(steps?: number): Promise<string[]>;
1337
+ reset(): Promise<string[]>;
1338
+ fresh(): Promise<string[]>;
1339
+ status(): Promise<MigrationStatus[]>;
1340
+ validate(): Promise<{
1341
+ valid: boolean;
1342
+ errors: string[];
1343
+ }>;
1344
+ getPendingMigrations(): Promise<Migration[]>;
1345
+ private getExecutedMigrations;
1346
+ private getNextBatch;
1347
+ private getLastBatches;
1348
+ private loadMigrationsByName;
1349
+ private runMigration;
1350
+ private calculateChecksum;
1351
+ }
1352
+
1353
+ declare class MigrationLoader {
1354
+ private directory;
1355
+ private extensions;
1356
+ constructor(directory: string, extensions?: string[]);
1357
+ scanDirectory(): Promise<MigrationFile[]>;
1358
+ loadMigration(file: MigrationFile): Promise<Migration>;
1359
+ loadAll(): Promise<Migration[]>;
1360
+ getMigrationFiles(): Promise<MigrationFile[]>;
1361
+ calculateChecksum(file: MigrationFile): Promise<string>;
1362
+ calculateAllChecksums(): Promise<Map<string, string>>;
1363
+ static generateFilename(description: string): string;
1364
+ static getMigrationTemplate(name: string): string;
1365
+ }
1366
+
1367
+ interface MigrationLockOptions {
1368
+ tableName?: string;
1369
+ timeout?: number;
1370
+ dialect: 'mysql' | 'postgresql';
1371
+ }
1372
+ declare class MigrationLock {
1373
+ private adapter;
1374
+ private tableName;
1375
+ private timeout;
1376
+ private dialect;
1377
+ private lockId;
1378
+ private isLocked;
1379
+ constructor(adapter: DatabaseAdapter, options: MigrationLockOptions);
1380
+ initialize(): Promise<void>;
1381
+ acquire(): Promise<boolean>;
1382
+ release(): Promise<void>;
1383
+ forceRelease(): Promise<void>;
1384
+ isHeld(): Promise<boolean>;
1385
+ getLockInfo(): Promise<{
1386
+ isLocked: boolean;
1387
+ lockedAt: Date | null;
1388
+ lockedBy: string | null;
1389
+ }>;
1390
+ withLock<T>(fn: () => Promise<T>): Promise<T>;
1391
+ private sleep;
1392
+ }
1393
+
1394
+ type Phase = 'expand' | 'migrate' | 'contract';
1395
+ interface ExpandContractMigration {
1396
+ name: string;
1397
+ phase: Phase;
1398
+ description?: string;
1399
+ expand?: (schema: SchemaBuilder) => Promise<void>;
1400
+ migrate?: (adapter: DatabaseAdapter, schema: SchemaBuilder) => Promise<void>;
1401
+ contract?: (schema: SchemaBuilder) => Promise<void>;
1402
+ rollbackExpand?: (schema: SchemaBuilder) => Promise<void>;
1403
+ rollbackMigrate?: (adapter: DatabaseAdapter, schema: SchemaBuilder) => Promise<void>;
1404
+ rollbackContract?: (schema: SchemaBuilder) => Promise<void>;
1405
+ }
1406
+ declare class ExpandContractHelper {
1407
+ private readonly adapter;
1408
+ private readonly schema;
1409
+ constructor(adapter: DatabaseAdapter, schema: SchemaBuilder);
1410
+ renameColumn(table: string, oldColumn: string, newColumn: string, phase: Phase): Promise<void>;
1411
+ changeColumnType(table: string, column: string, newType: string, transform: string, phase: Phase): Promise<void>;
1412
+ splitTable(sourceTable: string, newTable: string, columnsToMove: string[], foreignKeyColumn: string, phase: Phase): Promise<void>;
1413
+ mergeTables(targetTable: string, sourceTable: string, columnsToMerge: string[], joinColumn: string, phase: Phase): Promise<void>;
1414
+ addNotNullConstraint(table: string, column: string, defaultValue: string, phase: Phase): Promise<void>;
1415
+ }
1416
+ declare function createExpandContractHelper(adapter: DatabaseAdapter, schema: SchemaBuilder): ExpandContractHelper;
1417
+
1418
+ interface Seeder {
1419
+ name?: string;
1420
+ run(adapter: DatabaseAdapter): Promise<void>;
1421
+ }
1422
+ interface SeederFile {
1423
+ name: string;
1424
+ path: string;
1425
+ }
1426
+ interface SeederRunnerOptions {
1427
+ directory: string;
1428
+ only?: string[];
1429
+ except?: string[];
1430
+ }
1431
+ interface SeederFactory {
1432
+ (adapter: DatabaseAdapter): Promise<void>;
1433
+ }
1434
+
1435
+ declare class SeederLoader {
1436
+ private readonly directory;
1437
+ constructor(directory: string);
1438
+ loadAll(): Promise<SeederFile[]>;
1439
+ load(seederPath: string): Promise<Seeder>;
1440
+ private getSeederName;
1441
+ static generateFilename(name: string): string;
1442
+ static getSeederTemplate(name: string): string;
1443
+ }
1444
+
1445
+ interface SeederResult {
1446
+ name: string;
1447
+ success: boolean;
1448
+ error?: string;
1449
+ duration: number;
1450
+ }
1451
+ declare class SeederRunner {
1452
+ private readonly adapter;
1453
+ private readonly loader;
1454
+ private readonly options;
1455
+ constructor(adapter: DatabaseAdapter, options: SeederRunnerOptions);
1456
+ run(): Promise<SeederResult[]>;
1457
+ runSeeder(name: string): Promise<SeederResult>;
1458
+ private filterSeeders;
1459
+ list(): Promise<SeederFile[]>;
1460
+ }
1461
+
993
1462
  interface PerformanceTrace$1 {
994
1463
  id: string;
995
1464
  operation: string;
@@ -2430,4 +2899,4 @@ declare class DBBridge {
2430
2899
  getAdapter(): DatabaseAdapter | undefined;
2431
2900
  }
2432
2901
 
2433
- export { ANALYSIS_DEFAULTS, type AdapterFactory, type AggregateContext, type AggregateFunction, BaseAdapter, type BaseAdapterOptions, BaseQueryBuilder, BaseTransaction, type BetweenOperator, CACHE_DEFAULTS, CONNECTION_DEFAULTS, CRYPTO_DEFAULTS, CacheAPI, type CacheAPIOptions, type CacheAPIStats, type CacheAdapter, type CacheConfig, type CacheEntry, CacheError, type CacheInvalidateOptions, CacheKeyGenerator, type CacheKeyOptions, type CacheKeyPattern, CacheManager, type CacheManagerOptions, type CacheMiddlewareOptions, type CacheOption, type CacheOptions$1 as CacheOptions, type CacheSetOptions, type CacheStats, type CacheStrategy, type CacheWarmupQuery, CacheableQuery, CachedAdapter, type CachedAdapterOptions, CachedDBBridge, type CachedDBBridgeConfig, DBBridge$2 as Client, type ClientOptions, type ColumnDefinition, type ColumnName, type ComparisonOperator, type CompressionOptions, type ConnectionConfig, ConnectionError, type ConnectionMetrics, type ConnectionStringConfig, type CryptoAlgorithm, CryptoAlgorithms, type CryptoConfig, CryptoProvider, type CursorPaginationResult, DBBridge$1 as DBBridge, type DBBridgeConfig$1 as DBBridgeConfig, DBBridgeError, DBBridge as DBBridgeFactory, DEFAULT_POOL_CONFIG, DEFAULT_TIMEOUTS, DURATION_BUCKETS, type DatabaseAdapter, DatabaseError, DatabaseType$2 as DatabaseType, type DateFilterContext, type DeepPartial, type DeepRequired, DefaultCacheStrategy, DeleteBuilder, type DeleteResult, type DialectConfig, type DialectDatabaseType, DialectFactory, type EncryptedData, type EncryptionContext, type EncryptionOptions, type ExecuteResult, type ExtractRow, type FieldInfo, type FieldType, HEALTH_DEFAULTS, type HealthCheckOptions, type HealthCheckResult, HealthChecker, type HostConnectionConfig, ISOLATION_LEVELS, type InOperator, type InferQueryResult, InsertBuilder, type InsertData, type InsertResult, IsolationLevel, type JoinClause, type JoinType, LOGGING_DEFAULTS, type LikeOperator, type LogLevel, type Logger, type LoggingMiddlewareOptions, MetricsCollector, type MetricsSnapshot, type MiddlewareCacheAdapter, MiddlewareChain, type MiddlewareConfig, type MiddlewareLogger, type MiddlewareQueryMetrics, type Migration, type MigrationHistory, MigrationRunner, type MigrationRunnerOptions, ModularCacheManager, ModularPerformanceMonitor, type ModularQueryBuilder, type ModularQueryBuilderOptions, MySQLDialect, type NextMiddleware, NotImplementedError, type NullOperator, type Nullable, type OptionalKeys, type OrderByClause, type OrderDirection, POOL_DEFAULTS, POOL_DEFAULTS_LEGACY, type PaginationContext, type PaginationResult, type PaginationState, PerformanceMonitor, type PerformanceReport$1 as PerformanceReport, type PerformanceTrace$1 as PerformanceTrace, type PoolConfig, PoolExhaustedError, type PoolStats, PostgreSQLDialect, type PreparedStatement, QUERY_DEFAULTS, type QueryBuilder, type QueryBuilderCacheConfig, type QueryBuilderOptions, type QueryCacheConfig, type QueryCacheOptions, QueryContext, type QueryContextCacheConfig, QueryError, type QueryExecutor, type QueryMetrics, type QueryMiddleware, type QueryMiddlewareContext, type QueryMiddlewareResult, type QueryOptions, type QueryParams, type QueryPlan$1 as QueryPlan, type QueryResult, type QueryState, QueryTimeoutError, type QueryValue, RETRY_DEFAULTS, type RequireKeys, type RetryMiddlewareOptions, type RetryOptions, SIZE_UNITS, type SQLCommand, SQLDialect, type SSLConfig, type SafeSQL, SelectBuilder, type SelectResult, SmartCacheStrategy, type StrictConnectionConfig, type StrictFieldInfo, type StrictIsolationLevel, type StrictPoolConfig, type StrictQueryResult, type SystemMetrics, TIME_UNITS, type TableName, type TableSchema, TimeoutError, type TimeoutMiddlewareOptions, type Transaction, type TransactionConnection, TransactionError, type TransactionMetrics, type TransactionOptions, UpdateBuilder, type UpdateData, type UpdateResult, ValidationError, WhereBuilder, type WhereClause, type WhereConditionInput, type WhereOperator, avg, cacheKey, chunk, composeMiddleware, compress, count, createAdapter, createCacheInvalidationMiddleware, createCacheKeyPattern, createCacheMiddleware, createCachedAdapter, createCircuitBreakerMiddleware, createDeadlineMiddleware, createLoggingMiddleware, createMetricsMiddleware, createModularQueryBuilder, createQueryState, createRetryMiddleware, createTimeoutMiddleware, crypto, cursorPaginate, decompress, encryptRow, exists, generateCacheKey, generateUUID, getCompressionRatio, isCompressed, isDeleteResult, isInsertResult, isSelectResult, isUpdateResult, max, min, paginate, parseCacheKey, processDataForEncryption, processResultsForDecryption, registerAdapterFactory, retry, sanitizeCacheKey, shouldCompress, sql, sum, validateColumnName, validateConnectionConfig, validateSQL, validateTableName, whereBetweenDates, whereDate, whereDay, whereLastDays, whereMonth, whereToday, whereYear, whereYesterday, withTimeout };
2902
+ export { ANALYSIS_DEFAULTS, type AdapterFactory, type AggregateContext, type AggregateFunction, AlterTableBuilder, BaseAdapter, type BaseAdapterOptions, BaseQueryBuilder, BaseTransaction, type BatchInfo, type BetweenOperator, CACHE_DEFAULTS, CONNECTION_DEFAULTS, CRYPTO_DEFAULTS, CacheAPI, type CacheAPIOptions, type CacheAPIStats, type CacheAdapter, type CacheConfig, type CacheEntry, CacheError, type CacheInvalidateOptions, CacheKeyGenerator, type CacheKeyOptions, type CacheKeyPattern, CacheManager, type CacheManagerOptions, type CacheMiddlewareOptions, type CacheOption, type CacheOptions$1 as CacheOptions, type CacheSetOptions, type CacheStats, type CacheStrategy, type CacheWarmupQuery, CacheableQuery, CachedAdapter, type CachedAdapterOptions, CachedDBBridge, type CachedDBBridgeConfig, DBBridge$2 as Client, type ClientOptions, ColumnBuilder, type ColumnDefinition$1 as ColumnDefinition, type ColumnName, type ComparisonOperator, type CompressionOptions, type ConnectionConfig, ConnectionError, type ConnectionMetrics, type ConnectionStringConfig, type CryptoAlgorithm, CryptoAlgorithms, type CryptoConfig, CryptoProvider, type CursorPaginationResult, DBBridge$1 as DBBridge, type DBBridgeConfig$1 as DBBridgeConfig, DBBridgeError, DBBridge as DBBridgeFactory, DEFAULT_POOL_CONFIG, DEFAULT_TIMEOUTS, DURATION_BUCKETS, type DatabaseAdapter, DatabaseError, DatabaseType$2 as DatabaseType, type DateFilterContext, type DeepPartial, type DeepRequired, DefaultCacheStrategy, DeleteBuilder, type DeleteResult, type DialectConfig, type DialectDatabaseType, DialectFactory, type EncryptedData, type EncryptionContext, type EncryptionOptions, type ExecuteResult, ExpandContractHelper, type ExpandContractMigration, type ExtractRow, type FieldInfo, type FieldType, FileMigrationRunner, type FileMigrationRunnerOptions, ForeignKeyBuilder, ForeignKeyChain, HEALTH_DEFAULTS, type HealthCheckOptions, type HealthCheckResult, HealthChecker, type HostConnectionConfig, ISOLATION_LEVELS, type InOperator, type InferQueryResult, InsertBuilder, type InsertData, type InsertResult, IsolationLevel, type JoinClause, type JoinType, LOGGING_DEFAULTS, type Migration$1 as LegacyMigration, type LikeOperator, type LogLevel, type Logger, type LoggingMiddlewareOptions, MetricsCollector, type MetricsSnapshot, type MiddlewareCacheAdapter, MiddlewareChain, type MiddlewareConfig, type MiddlewareLogger, type MiddlewareQueryMetrics, type Migration, type MigrationConfig, type MigrationFile, type MigrationHistory, MigrationLoader, MigrationLock, type MigrationLockOptions, type MigrationLock$1 as MigrationLockRecord, type MigrationRecord, MigrationRunner, type MigrationRunnerOptions, type MigrationStatus, ModularCacheManager, ModularPerformanceMonitor, type ModularQueryBuilder, type ModularQueryBuilderOptions, MySQLDialect, type NextMiddleware, NotImplementedError, type NullOperator, type Nullable, type OptionalKeys, type OrderByClause, type OrderDirection, POOL_DEFAULTS, POOL_DEFAULTS_LEGACY, type PaginationContext, type PaginationResult, type PaginationState, PerformanceMonitor, type PerformanceReport$1 as PerformanceReport, type PerformanceTrace$1 as PerformanceTrace, type Phase, type PoolConfig, PoolExhaustedError, type PoolStats, PostgreSQLDialect, type PreparedStatement, QUERY_DEFAULTS, type QueryBuilder, type QueryBuilderCacheConfig, type QueryBuilderOptions, type QueryCacheConfig, type QueryCacheOptions, QueryContext, type QueryContextCacheConfig, QueryError, type QueryExecutor, type QueryMetrics, type QueryMiddleware, type QueryMiddlewareContext, type QueryMiddlewareResult, type QueryOptions, type QueryParams, type QueryPlan$1 as QueryPlan, type QueryResult, type QueryState, QueryTimeoutError, type QueryValue, RETRY_DEFAULTS, type RequireKeys, type RetryMiddlewareOptions, type RetryOptions, SIZE_UNITS, type SQLCommand, SQLDialect, type SSLConfig, type SafeSQL, type AlterOperation as SchemaAlterOperation, type AlterTableDefinition as SchemaAlterTableDefinition, SchemaBuilder, type SchemaBuilderOptions, type ColumnDefinition as SchemaColumnDefinition, type ColumnType as SchemaColumnType, type Dialect as SchemaDialect, type SchemaDialect as SchemaDialectInterface, type ForeignKeyAction as SchemaForeignKeyAction, type ForeignKeyDefinition as SchemaForeignKeyDefinition, type IndexDefinition as SchemaIndexDefinition, MySQLDialect$1 as SchemaMySQLDialect, PostgreSQLDialect$1 as SchemaPostgreSQLDialect, type TableDefinition as SchemaTableDefinition, type Seeder, type SeederFactory, type SeederFile, SeederLoader, type SeederResult, SeederRunner, type SeederRunnerOptions, SelectBuilder, type SelectResult, SmartCacheStrategy, type StrictConnectionConfig, type StrictFieldInfo, type StrictIsolationLevel, type StrictPoolConfig, type StrictQueryResult, type SystemMetrics, TIME_UNITS, TableBuilder, type TableName, type TableSchema, TimeoutError, type TimeoutMiddlewareOptions, type Transaction, type TransactionConnection, TransactionError, type TransactionMetrics, type TransactionOptions, UpdateBuilder, type UpdateData, type UpdateResult, ValidationError, WhereBuilder, type WhereClause, type WhereConditionInput, type WhereOperator, avg, cacheKey, chunk, composeMiddleware, compress, count, createAdapter, createCacheInvalidationMiddleware, createCacheKeyPattern, createCacheMiddleware, createCachedAdapter, createCircuitBreakerMiddleware, createDeadlineMiddleware, createExpandContractHelper, createLoggingMiddleware, createMetricsMiddleware, createModularQueryBuilder, createQueryState, createRetryMiddleware, createTimeoutMiddleware, crypto, cursorPaginate, decompress, encryptRow, exists, generateCacheKey, generateUUID, getCompressionRatio, isCompressed, isDeleteResult, isInsertResult, isSelectResult, isUpdateResult, max, min, paginate, parseCacheKey, processDataForEncryption, processResultsForDecryption, registerAdapterFactory, retry, sanitizeCacheKey, shouldCompress, sql, sum, validateColumnName, validateConnectionConfig, validateSQL, validateTableName, whereBetweenDates, whereDate, whereDay, whereLastDays, whereMonth, whereToday, whereYear, whereYesterday, withTimeout };