/** * PostgreSQL identifier validation utilities * * Provides validation for PostgreSQL identifiers (table names, column names, etc.) * following PostgreSQL naming rules and security best practices. */ /** * PostgreSQL identifier validation pattern * Identifiers must start with a letter or underscore, followed by letters, numbers, or underscores * * Note: PostgreSQL also allows $ in identifiers, but we disallow it for security */ export declare const POSTGRES_IDENTIFIER_PATTERN: RegExp; /** * Maximum length for PostgreSQL identifiers (63 characters) */ export declare const MAX_IDENTIFIER_LENGTH = 63; /** * Checks if a name is a valid PostgreSQL identifier * * @param name - The identifier to validate * @returns true if the identifier is valid, false otherwise */ export declare function isValidIdentifier(name: string): boolean; /** * Validates a PostgreSQL identifier (table name or column name) * * @param name - The identifier to validate * @param type - The type of identifier ('table' or 'column') for error messages * @throws Error if the identifier is invalid */ export declare function validateIdentifier(name: string, type?: 'table' | 'column'): void; /** * Validates a schema-qualified PostgreSQL name (e.g., "public.users") * * @param name - The schema-qualified name to validate (schema.identifier) * @throws Error if the name is invalid */ export declare function validateSchemaQualifiedName(name: string): void; //# sourceMappingURL=validation.d.ts.map