import type { Knex } from 'knex'; import type { Database } from '..'; import type { ForeignKey, Index, Schema } from '../schema'; export interface SchemaInspector { getSchema(): Promise; getIndexes(tableName: string): Promise; getForeignKeys(tableName: string): Promise; getTables(): Promise; } export default class Dialect { db: Database; schemaInspector: SchemaInspector; client: string; constructor(db: Database, client: string); configure(conn?: any): void; initialize(_nativeConnection?: unknown): Promise; getTables(): void; getSqlType(type: unknown): unknown; canAlterConstraints(): boolean; usesForeignKeys(): boolean; useReturning(): boolean; supportsUnsigned(): boolean; supportsOperator(operator?: string): boolean; startSchemaUpdate(): Promise; endSchemaUpdate(): Promise; transformErrors(error: Error | { message: string; }): void; canAddIncrements(): boolean; /** * Whether indexes and constraints can be renamed in place (used by the rename * migration helpers to keep index/constraint names in sync with a renamed * column or table). When false, schema sync drops and recreates them by name. */ canRenameSchemaObjects(): boolean; /** * Renames the index or constraint `from` on `table` to `to`, if it exists and * `to` is free. Runs on the given transaction. Returns whether a rename happened. */ renameSchemaObject(trx: Knex, params: { table: string; from: string; to: string; }): Promise; /** * Drops the index (and, where foreign keys are named, the foreign-key * constraint) called `name` on `table`, if it exists. Used by the rename * migration helpers on dialects that cannot rename schema objects in place, * so a renamed table/column does not keep an index under its old name * (schema sync never drops it and would collide when re-creating it). Runs on * the given transaction. Returns whether anything was dropped. */ dropSchemaObject(trx: Knex, params: { table: string; name: string; }): Promise; /** * Max rows per batch for bulk inserts. * Some databases limit multi-row insert size; override in dialect when a lower limit is required. */ getBatchInsertSize(): number; /** * Get column type conversion SQL for complex type changes * Override in specific dialects to handle database-specific conversions * @param currentType - The current database data type * @param targetType - The target Strapi type * @returns Conversion SQL details or null if no special handling needed */ getColumnTypeConversionSQL(currentType: string, targetType: string): { sql: string; typeClause: string; warning?: string; } | null; } //# sourceMappingURL=dialect.d.ts.map