/** * Multi-dialect configuration system for static analysis * * This module defines the abstraction layer for different SQL dialects. * Currently implements MSSQL and PostgreSQL with placeholders for future dialects. */ /** * Supported database dialects for Rayfin Data API. * Matches the DatabaseDialects constants in Microsoft.Rayfin.Common. */ /** @internal */ export declare const DatabaseDialect: { readonly MsSql: "mssql"; readonly PostgreSql: "postgresql"; }; /** @internal */ export type Dialect = (typeof DatabaseDialect)[keyof typeof DatabaseDialect]; /** @internal */ export interface DialectConfig { /** Default primary key type (usually UUID/GUID) */ defaultIdType: string; /** Default string type with optional length */ defaultStringType: (length?: number) => string; /** Default integer type */ defaultIntegerType: string; /** Default boolean type */ defaultBooleanType: string; /** Default date/datetime type */ defaultDateType: string; /** Default decimal type with optional precision and scale. * When called without arguments, returns the dialect's default decimal type * (e.g., DECIMAL(18,2) for MSSQL, NUMERIC(18,2) for PostgreSQL). */ defaultDecimalType: (precision?: number, scale?: number) => string; /** Default text type for large content */ defaultTextType: string; /** Default schema name (null means no default schema) */ defaultSchema: string | null; /** Check constraint syntax template */ checkConstraintTemplate: (columnName: string, values: string[]) => string; /** Minimum length check constraint syntax template */ minLengthConstraintTemplate: (columnName: string, minLength: number) => string; /** Maximum allowed precision for DECIMAL/NUMERIC types. * Capped at 28 to match the .NET decimal type used by Data API Builder at runtime. */ maxDecimalPrecision: number; /** Maximum allowed length for sized string types (e.g., NVARCHAR(n)). * `null` means no limit (e.g., PostgreSQL VARCHAR(n) has no practical cap). * MSSQL NVARCHAR(n) is capped at 4000; values above that are rejected with an error. */ maxStringLength: number | null; } /** * Multi-dialect configurations * MSSQL and PostgreSQL are both implemented */ /** @internal */ export declare const DIALECT_CONFIGS: Record; /** * Get dialect configuration with validation */ /** @internal */ export declare function getDialectConfig(dialect: Dialect): DialectConfig; /** * Validate if a dialect is supported in the current implementation */ /** @internal */ export declare function isDialectSupported(dialect: string): dialect is Dialect; /** * Get list of supported dialects for CLI help text */ /** @internal */ export declare function getSupportedDialects(): Dialect[]; //# sourceMappingURL=dialect-config.d.ts.map