/** * MariaDB Adapter * * Database adapter for MariaDB databases using the 'mysql2' library. * MariaDB is a fork of MySQL with high compatibility, so this adapter * extends MySQLAdapter and overrides MariaDB-specific functionality. * * Key MariaDB-specific features: * - SEQUENCE support * - System versioned tables * - JSON enhancements * - Window functions (earlier support than MySQL) * - CTE and Recursive CTE (earlier support than MySQL) */ import { MySQLAdapter } from './mysql.adapter'; import { DatabaseType } from '../types/enums'; import { DatabaseFeature } from './base.adapter'; import { IAdapterConnectionOptions, IAdapterConnectionResult } from '../types/connection.interface'; /** * MariaDB database adapter * Extends MySQL adapter with MariaDB-specific functionality */ export declare class MariaDBAdapter extends MySQLAdapter { protected databaseType: DatabaseType; connect(options: IAdapterConnectionOptions): Promise; testConnection(options: IAdapterConnectionOptions): Promise; /** * MariaDB supports additional column types */ getColumnTypeString(columnType: string, options?: { minLength?: number; maxLength?: number; precision?: number; scale?: number; enumValues?: string[]; arrayType?: string; }): string; /** * MariaDB supports additional features compared to MySQL */ getSupportedFeatures(): DatabaseFeature[]; /** * Parse MariaDB-specific errors */ parseError(error: any): { type: string; message: string; code?: string; details?: Record; }; /** * Create sequence (MariaDB-specific feature) * @param sequenceName Name of the sequence * @param options Sequence options */ createSequence(sequenceName: string, options?: { start?: number; increment?: number; minValue?: number; maxValue?: number; cycle?: boolean; cache?: number; }): Promise; /** * Drop sequence * @param sequenceName Name of the sequence * @param ifExists Only drop if exists */ dropSequence(sequenceName: string, ifExists?: boolean): Promise; /** * Get next value from sequence * @param sequenceName Name of the sequence * @returns Next value from the sequence */ nextSequenceValue(sequenceName: string): Promise; /** * Create system-versioned table (MariaDB 10.3.4+) * System versioning automatically tracks row history */ createSystemVersionedTable(tableName: string, columns: any[], options?: { historyTable?: string; partitioning?: string; }): Promise; /** * Query historical data from system-versioned table * @param tableName Table name * @param asOfTimestamp Point in time to query */ queryAsOf(tableName: string, asOfTimestamp: Date): Promise; /** * Query historical data between two points in time * @param tableName Table name * @param fromTimestamp Start of time range * @param toTimestamp End of time range */ queryBetween(tableName: string, fromTimestamp: Date, toTimestamp: Date): Promise; private getPool; protected ensureConnected(): void; protected buildColumnDefinition(column: any): string; }