export type QueryType = 'SELECT' | 'SHOW' | 'DESCRIBE' | 'UPDATE' | 'DELETE' | 'INSERT' | 'CREATE' | 'DROP' | 'ALTER' | 'MERGE' | 'UNKNOWN'; export interface ValidationResult { isValid: boolean; queryType: QueryType; error?: string; } /** * Validates SQL queries for security and permission constraints */ export declare class QueryValidator { private readonly enableUpdates; constructor(enableUpdates?: boolean); /** * Validates a SQL query based on the current security settings * @param sql - SQL query to validate * @returns Validation result with query type and any errors */ validate(sql: string): ValidationResult; /** * Detects the type of SQL query */ private detectQueryType; /** * Checks if a SQL fragment contains write operations */ private containsWriteOperations; /** * Checks if a query type is read-only * @param queryType - Type of query to check * @returns true if the query type is read-only */ isReadOnly(queryType: QueryType): boolean; /** * Checks if a query type is a write operation * @param queryType - Type of query to check * @returns true if the query type is a write operation */ isWriteOperation(queryType: QueryType): boolean; } //# sourceMappingURL=query-validator.d.ts.map