/** * SQL Migration Parser * * Parses SQL migration files to detect: * - CREATE TABLE without tenant columns * - Missing ENABLE ROW LEVEL SECURITY * - RLS policies with USING(true) or WITH CHECK(true) * - Missing indexes on tenant columns */ import type { ParsedFile, Location } from '../types.js'; export interface SqlTable { name: string; columns: string[]; hasTenantColumn: boolean; tenantColumnName?: string; location: Location; } export interface SqlRlsPolicy { tableName: string; policyName: string; using: string; withCheck: string; isBypassed: boolean; location: Location; } export interface SqlIndex { tableName: string; columns: string[]; hasTenantFirst: boolean; location: Location; } export interface SqlParseResult { tables: SqlTable[]; rlsEnabledTables: string[]; rlsPolicies: SqlRlsPolicy[]; indexes: SqlIndex[]; file: ParsedFile; } export declare function parseSqlMigration(sourceCode: string, filename: string, projectRoot: string): SqlParseResult; export declare function findTablesWithoutRls(tables: SqlTable[], rlsEnabledTables: string[]): SqlTable[]; export declare function findBypassedRlsPolicies(policies: SqlRlsPolicy[]): SqlRlsPolicy[]; //# sourceMappingURL=sql-parser.d.ts.map