@db-bridge/core 1.1.7 → 1.2.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.
package/dist/index.d.ts CHANGED
@@ -130,6 +130,154 @@ declare const ISOLATION_LEVELS: {
130
130
  };
131
131
  type StrictIsolationLevel = (typeof ISOLATION_LEVELS)[keyof typeof ISOLATION_LEVELS];
132
132
 
133
+ interface PaginationResult<T> {
134
+ data: T[];
135
+ pagination: {
136
+ page: number;
137
+ perPage: number;
138
+ total: number;
139
+ totalPages: number;
140
+ hasMore: boolean;
141
+ from: number;
142
+ to: number;
143
+ };
144
+ }
145
+ interface CursorPaginationResult<T> {
146
+ data: T[];
147
+ nextCursor: number | string | null;
148
+ hasMore: boolean;
149
+ }
150
+ interface QueryBuilder<T = unknown> {
151
+ select(...columns: string[]): QueryBuilder<T>;
152
+ select(columns: string[]): QueryBuilder<T>;
153
+ from(table: string, alias?: string): QueryBuilder<T>;
154
+ table(table: string, alias?: string): QueryBuilder<T>;
155
+ distinct(): QueryBuilder<T>;
156
+ join(table: string, on: string, type?: 'INNER' | 'LEFT' | 'RIGHT' | 'FULL'): QueryBuilder<T>;
157
+ innerJoin(table: string, on: string): QueryBuilder<T>;
158
+ leftJoin(table: string, on: string): QueryBuilder<T>;
159
+ rightJoin(table: string, on: string): QueryBuilder<T>;
160
+ fullJoin(table: string, on: string): QueryBuilder<T>;
161
+ where(condition: string | Record<string, unknown>, operator?: string, value?: unknown): QueryBuilder<T>;
162
+ where(column: string, operator: string, value: unknown): QueryBuilder<T>;
163
+ whereIn(column: string, values: unknown[]): QueryBuilder<T>;
164
+ whereNotIn(column: string, values: unknown[]): QueryBuilder<T>;
165
+ whereBetween(column: string, min: unknown, max: unknown): QueryBuilder<T>;
166
+ whereNull(column: string): QueryBuilder<T>;
167
+ whereNotNull(column: string): QueryBuilder<T>;
168
+ orWhere(condition: string | Record<string, unknown>, operator?: string, value?: unknown): QueryBuilder<T>;
169
+ orWhere(column: string, operator: string, value: unknown): QueryBuilder<T>;
170
+ whereDate(column: string, operator: string, date: Date | string): QueryBuilder<T>;
171
+ whereYear(column: string, operator: string, year: number): QueryBuilder<T>;
172
+ whereMonth(column: string, operator: string, month: number): QueryBuilder<T>;
173
+ whereDay(column: string, operator: string, day: number): QueryBuilder<T>;
174
+ whereToday(column: string): QueryBuilder<T>;
175
+ whereYesterday(column: string): QueryBuilder<T>;
176
+ whereBetweenDates(column: string, startDate: Date | string, endDate: Date | string): QueryBuilder<T>;
177
+ whereLastDays(column: string, days: number): QueryBuilder<T>;
178
+ groupBy(...columns: string[]): QueryBuilder<T>;
179
+ having(condition: string): QueryBuilder<T>;
180
+ orderBy(column: string, direction?: 'ASC' | 'DESC'): QueryBuilder<T>;
181
+ limit(limit: number): QueryBuilder<T>;
182
+ offset(offset: number): QueryBuilder<T>;
183
+ insert(table: string, data: Record<string, unknown> | Record<string, unknown>[]): QueryBuilder<T>;
184
+ update(table: string, data: Record<string, unknown>): QueryBuilder<T>;
185
+ delete(table: string): QueryBuilder<T>;
186
+ raw(sql: string, bindings?: unknown[]): QueryBuilder<T>;
187
+ encrypt(...fields: string[]): QueryBuilder<T>;
188
+ decrypt(...fields: string[]): QueryBuilder<T>;
189
+ toSQL(): {
190
+ sql: string;
191
+ bindings: unknown[];
192
+ };
193
+ execute(options?: QueryOptions): Promise<QueryResult<T>>;
194
+ first(options?: QueryOptions): Promise<T | null>;
195
+ count(column?: string, options?: QueryOptions): Promise<number>;
196
+ sum(column: string, options?: QueryOptions): Promise<number>;
197
+ avg(column: string, options?: QueryOptions): Promise<number>;
198
+ min(column: string, options?: QueryOptions): Promise<number | null>;
199
+ max(column: string, options?: QueryOptions): Promise<number | null>;
200
+ exists(options?: QueryOptions): Promise<boolean>;
201
+ paginate(page?: number, perPage?: number, options?: QueryOptions): Promise<PaginationResult<T>>;
202
+ cursorPaginate(cursorColumn: string, cursor?: number | string | null, limit?: number, options?: QueryOptions): Promise<CursorPaginationResult<T>>;
203
+ pluck<K = unknown>(column: string, options?: QueryOptions): Promise<K[]>;
204
+ value<K = unknown>(column: string, options?: QueryOptions): Promise<K | null>;
205
+ chunk(size: number, callback: (items: T[], page: number) => Promise<void | false>, options?: QueryOptions): Promise<void>;
206
+ }
207
+
208
+ interface DatabaseAdapter {
209
+ readonly name: string;
210
+ readonly version: string;
211
+ readonly isConnected: boolean;
212
+ connect(config: ConnectionConfig): Promise<void>;
213
+ disconnect(): Promise<void>;
214
+ query<T = unknown>(sql: string, params?: QueryParams, options?: QueryOptions): Promise<QueryResult<T>>;
215
+ execute<T = unknown>(sql: string, params?: QueryParams, options?: QueryOptions): Promise<QueryResult<T>>;
216
+ prepare<T = unknown>(sql: string, name?: string): Promise<PreparedStatement<T>>;
217
+ beginTransaction(options?: TransactionOptions): Promise<Transaction>;
218
+ getPoolStats(): PoolStats;
219
+ ping(): Promise<boolean>;
220
+ escape(value: unknown): string;
221
+ escapeIdentifier(identifier: string): string;
222
+ createQueryBuilder<T = unknown>(): QueryBuilder<T>;
223
+ }
224
+
225
+ interface CacheAdapter {
226
+ get<T = unknown>(key: string): Promise<T | null>;
227
+ set<T = unknown>(key: string, value: T, ttl?: number): Promise<void>;
228
+ delete(key: string): Promise<boolean>;
229
+ exists(key: string): Promise<boolean>;
230
+ clear(): Promise<void>;
231
+ mget<T = unknown>(keys: string[]): Promise<(T | null)[]>;
232
+ mset<T = unknown>(items: Array<{
233
+ key: string;
234
+ value: T;
235
+ ttl?: number;
236
+ }>): Promise<void>;
237
+ keys(pattern?: string): Promise<string[]>;
238
+ ttl(key: string): Promise<number>;
239
+ expire(key: string, ttl: number): Promise<boolean>;
240
+ increment(key: string, value?: number): Promise<number>;
241
+ decrement(key: string, value?: number): Promise<number>;
242
+ }
243
+
244
+ interface ColumnInfo {
245
+ name: string;
246
+ type: string;
247
+ nullable: boolean;
248
+ defaultValue: string | null;
249
+ isPrimary: boolean;
250
+ isAutoIncrement: boolean;
251
+ comment?: string;
252
+ }
253
+ interface TableInfo {
254
+ name: string;
255
+ columns: ColumnInfo[];
256
+ }
257
+ interface TypeGeneratorOptions {
258
+ tables?: string[];
259
+ exclude?: string[];
260
+ includeComments?: boolean;
261
+ camelCase?: boolean;
262
+ optionalNullable?: boolean;
263
+ header?: string;
264
+ }
265
+ declare class TypeGenerator {
266
+ private readonly adapter;
267
+ private readonly dialect;
268
+ constructor(adapter: DatabaseAdapter, dialect: 'mysql' | 'postgresql');
269
+ generate(options?: TypeGeneratorOptions): Promise<string>;
270
+ private getTables;
271
+ private getTableInfo;
272
+ private getMySQLColumns;
273
+ private getPostgreSQLColumns;
274
+ private parseColumnType;
275
+ private mapType;
276
+ private generateInterface;
277
+ private toInterfaceName;
278
+ private toCamelCase;
279
+ }
280
+
133
281
  interface ConnectionConfig {
134
282
  host?: string;
135
283
  port?: number;
@@ -324,117 +472,6 @@ declare const SIZE_UNITS: {
324
472
  readonly BYTES_PER_GB: number;
325
473
  };
326
474
 
327
- interface PaginationResult<T> {
328
- data: T[];
329
- pagination: {
330
- page: number;
331
- perPage: number;
332
- total: number;
333
- totalPages: number;
334
- hasMore: boolean;
335
- from: number;
336
- to: number;
337
- };
338
- }
339
- interface CursorPaginationResult<T> {
340
- data: T[];
341
- nextCursor: number | string | null;
342
- hasMore: boolean;
343
- }
344
- interface QueryBuilder<T = unknown> {
345
- select(...columns: string[]): QueryBuilder<T>;
346
- select(columns: string[]): QueryBuilder<T>;
347
- from(table: string, alias?: string): QueryBuilder<T>;
348
- table(table: string, alias?: string): QueryBuilder<T>;
349
- distinct(): QueryBuilder<T>;
350
- join(table: string, on: string, type?: 'INNER' | 'LEFT' | 'RIGHT' | 'FULL'): QueryBuilder<T>;
351
- innerJoin(table: string, on: string): QueryBuilder<T>;
352
- leftJoin(table: string, on: string): QueryBuilder<T>;
353
- rightJoin(table: string, on: string): QueryBuilder<T>;
354
- fullJoin(table: string, on: string): QueryBuilder<T>;
355
- where(condition: string | Record<string, unknown>, operator?: string, value?: unknown): QueryBuilder<T>;
356
- where(column: string, operator: string, value: unknown): QueryBuilder<T>;
357
- whereIn(column: string, values: unknown[]): QueryBuilder<T>;
358
- whereNotIn(column: string, values: unknown[]): QueryBuilder<T>;
359
- whereBetween(column: string, min: unknown, max: unknown): QueryBuilder<T>;
360
- whereNull(column: string): QueryBuilder<T>;
361
- whereNotNull(column: string): QueryBuilder<T>;
362
- orWhere(condition: string | Record<string, unknown>, operator?: string, value?: unknown): QueryBuilder<T>;
363
- orWhere(column: string, operator: string, value: unknown): QueryBuilder<T>;
364
- whereDate(column: string, operator: string, date: Date | string): QueryBuilder<T>;
365
- whereYear(column: string, operator: string, year: number): QueryBuilder<T>;
366
- whereMonth(column: string, operator: string, month: number): QueryBuilder<T>;
367
- whereDay(column: string, operator: string, day: number): QueryBuilder<T>;
368
- whereToday(column: string): QueryBuilder<T>;
369
- whereYesterday(column: string): QueryBuilder<T>;
370
- whereBetweenDates(column: string, startDate: Date | string, endDate: Date | string): QueryBuilder<T>;
371
- whereLastDays(column: string, days: number): QueryBuilder<T>;
372
- groupBy(...columns: string[]): QueryBuilder<T>;
373
- having(condition: string): QueryBuilder<T>;
374
- orderBy(column: string, direction?: 'ASC' | 'DESC'): QueryBuilder<T>;
375
- limit(limit: number): QueryBuilder<T>;
376
- offset(offset: number): QueryBuilder<T>;
377
- insert(table: string, data: Record<string, unknown> | Record<string, unknown>[]): QueryBuilder<T>;
378
- update(table: string, data: Record<string, unknown>): QueryBuilder<T>;
379
- delete(table: string): QueryBuilder<T>;
380
- raw(sql: string, bindings?: unknown[]): QueryBuilder<T>;
381
- encrypt(...fields: string[]): QueryBuilder<T>;
382
- decrypt(...fields: string[]): QueryBuilder<T>;
383
- toSQL(): {
384
- sql: string;
385
- bindings: unknown[];
386
- };
387
- execute(options?: QueryOptions): Promise<QueryResult<T>>;
388
- first(options?: QueryOptions): Promise<T | null>;
389
- count(column?: string, options?: QueryOptions): Promise<number>;
390
- sum(column: string, options?: QueryOptions): Promise<number>;
391
- avg(column: string, options?: QueryOptions): Promise<number>;
392
- min(column: string, options?: QueryOptions): Promise<number | null>;
393
- max(column: string, options?: QueryOptions): Promise<number | null>;
394
- exists(options?: QueryOptions): Promise<boolean>;
395
- paginate(page?: number, perPage?: number, options?: QueryOptions): Promise<PaginationResult<T>>;
396
- cursorPaginate(cursorColumn: string, cursor?: number | string | null, limit?: number, options?: QueryOptions): Promise<CursorPaginationResult<T>>;
397
- pluck<K = unknown>(column: string, options?: QueryOptions): Promise<K[]>;
398
- value<K = unknown>(column: string, options?: QueryOptions): Promise<K | null>;
399
- chunk(size: number, callback: (items: T[], page: number) => Promise<void | false>, options?: QueryOptions): Promise<void>;
400
- }
401
-
402
- interface DatabaseAdapter {
403
- readonly name: string;
404
- readonly version: string;
405
- readonly isConnected: boolean;
406
- connect(config: ConnectionConfig): Promise<void>;
407
- disconnect(): Promise<void>;
408
- query<T = unknown>(sql: string, params?: QueryParams, options?: QueryOptions): Promise<QueryResult<T>>;
409
- execute<T = unknown>(sql: string, params?: QueryParams, options?: QueryOptions): Promise<QueryResult<T>>;
410
- prepare<T = unknown>(sql: string, name?: string): Promise<PreparedStatement<T>>;
411
- beginTransaction(options?: TransactionOptions): Promise<Transaction>;
412
- getPoolStats(): PoolStats;
413
- ping(): Promise<boolean>;
414
- escape(value: unknown): string;
415
- escapeIdentifier(identifier: string): string;
416
- createQueryBuilder<T = unknown>(): QueryBuilder<T>;
417
- }
418
-
419
- interface CacheAdapter {
420
- get<T = unknown>(key: string): Promise<T | null>;
421
- set<T = unknown>(key: string, value: T, ttl?: number): Promise<void>;
422
- delete(key: string): Promise<boolean>;
423
- exists(key: string): Promise<boolean>;
424
- clear(): Promise<void>;
425
- mget<T = unknown>(keys: string[]): Promise<(T | null)[]>;
426
- mset<T = unknown>(items: Array<{
427
- key: string;
428
- value: T;
429
- ttl?: number;
430
- }>): Promise<void>;
431
- keys(pattern?: string): Promise<string[]>;
432
- ttl(key: string): Promise<number>;
433
- expire(key: string, ttl: number): Promise<boolean>;
434
- increment(key: string, value?: number): Promise<number>;
435
- decrement(key: string, value?: number): Promise<number>;
436
- }
437
-
438
475
  declare class DatabaseError extends Error {
439
476
  code?: string | undefined;
440
477
  cause?: Error | undefined;
@@ -1190,10 +1227,13 @@ declare class ForeignKeyChain {
1190
1227
  interface SchemaBuilderOptions {
1191
1228
  dialect: Dialect;
1192
1229
  adapter?: DatabaseAdapter;
1230
+ collectMode?: boolean;
1193
1231
  }
1194
1232
  declare class SchemaBuilder {
1195
1233
  private dialectInstance;
1196
1234
  private adapter?;
1235
+ private collectMode;
1236
+ private collectedStatements;
1197
1237
  constructor(options: SchemaBuilderOptions);
1198
1238
  get dialect(): SchemaDialect;
1199
1239
  createTable(tableName: string, callback: (table: TableBuilder) => void): Promise<void>;
@@ -1206,6 +1246,8 @@ declare class SchemaBuilder {
1206
1246
  alterTable(tableName: string, callback: (table: AlterTableBuilder) => void): Promise<void>;
1207
1247
  raw(sql: string, params?: unknown[]): Promise<void>;
1208
1248
  private execute;
1249
+ getCollectedStatements(): string[];
1250
+ clearCollectedStatements(): void;
1209
1251
  private query;
1210
1252
  generateCreateTableSQL(tableName: string, callback: (table: TableBuilder) => void): string;
1211
1253
  generateAlterTableSQL(tableName: string, callback: (table: AlterTableBuilder) => void): string[];
@@ -1418,11 +1460,15 @@ declare function createExpandContractHelper(adapter: DatabaseAdapter, schema: Sc
1418
1460
 
1419
1461
  interface Seeder {
1420
1462
  name?: string;
1463
+ priority?: number;
1464
+ depends?: string[];
1421
1465
  run(adapter: DatabaseAdapter): Promise<void>;
1422
1466
  }
1423
1467
  interface SeederFile {
1424
1468
  name: string;
1425
1469
  path: string;
1470
+ priority?: number;
1471
+ depends?: string[];
1426
1472
  }
1427
1473
  interface SeederRunnerOptions {
1428
1474
  directory: string;
@@ -1437,6 +1483,7 @@ declare class SeederLoader {
1437
1483
  private readonly directory;
1438
1484
  constructor(directory: string);
1439
1485
  loadAll(): Promise<SeederFile[]>;
1486
+ private sortByDependencies;
1440
1487
  load(seederPath: string): Promise<Seeder>;
1441
1488
  private getSeederName;
1442
1489
  static generateFilename(name: string, prefix?: string): string;
@@ -2900,4 +2947,4 @@ declare class DBBridge {
2900
2947
  getAdapter(): DatabaseAdapter | undefined;
2901
2948
  }
2902
2949
 
2903
- 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 };
2950
+ 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 ColumnInfo, 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 TableInfo, type TableName, type TableSchema, TimeoutError, type TimeoutMiddlewareOptions, type Transaction, type TransactionConnection, TransactionError, type TransactionMetrics, type TransactionOptions, TypeGenerator, type TypeGeneratorOptions, 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 };