preserveIdentifierCasing
Toggle whether all table and column identifiers should be quoted to preserve their case sensitivity. When enabled, identifiers will be quoted regardless of their casing, ensuring case-sensitive matching in databases like PostgreSQL.
Example usage:
Database.connect(
url = "...",
databaseConfig = DatabaseConfig {
preserveIdentifierCasing = true
}
)Content copied to clipboard
With this flag enabled:
Table("MyTable")will generate"MyTable"in SQL (preserving case)integer("UpperCaseColumn")will generate"UpperCaseColumn"in SQL
Without this flag (default):
PostgreSQL would fold unquoted identifiers to lowercase:
mytable,uppercasecolumn
Default is false.