UNPKG

@mikro-orm/core

Version:

TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.

18 lines (17 loc) 1.03 kB
/** * Normalize a partition name for collision detection. Mirrors PostgreSQL identifier * resolution: unquoted segments fold to lower case, quoted segments preserve case and * un-escape embedded `""`. Returns a canonical `schema.name` form so both schema-qualified * and bare names compare consistently (`.name` vs `schema.name` stay distinguishable). * * `Part_1`, `part_1`, and `"part_1"` all normalize to the same value, catching collisions * that would otherwise only surface as runtime PG "relation already exists" errors. */ export declare function normalizePartitionNameForComparison(name: string): string; /** * Split a comma-list of identifiers, respecting double-quoted identifiers (which may contain * commas and use `""` to escape embedded quotes). Returns `null` when the input is not a clean * comma-list of identifiers (e.g. contains function calls or literals), so callers treat it * as an opaque expression. */ export declare function splitCommaSeparatedIdentifiers(value: string): string[] | null;