You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extract MetadataSql query builders from LibsqlDatabaseMetaData #207
Move the metadata query builders out of LibsqlDatabaseMetaData. Nine builders use three different string-building idioms, and literal escaping is positional and repeated at four sites.
Depends on
None. First pass in the LibsqlDatabaseMetaData chain.
Pin
LibsqlDatabaseMetaDataTest covers escaping, type filters, schema ordering, index info round trips, and table types. The xerial DBMetaDataTest covers quote handling and column order. DatabaseMetaDataIT covers the live path.
Scope
Create MetadataSql with literal(String) and one method per query, tables, columns, imported keys, exported keys, primary keys, table types, schemas and catalogs, and index info.
Move escapeLiteral and the builders from 450 to 507, 671 to 702, and 909 to 1001.
Keep arg normalization and result shaping in the metadata class.
Preserve
Every SQL string byte for byte. Tests assert fragments, and the test doubles dispatch on substrings such as JOIN pragma_foreign_key_list.
AND TABLE_TYPE IN ('TABLE','VIEW') keeps no space after the comma.
types[i].toUpperCase() stays without a locale.
getColumns keeps passing a null originSql.
Empty types keeps behaving like null.
Acceptance
MetadataSql.java exists, and LibsqlDatabaseMetaData.java is under 950 lines.
The generated SQL is byte-identical. Prove it with the existing assertions, not by eye.
./mvnw -pl libsql-jdbc -am test green with no assertion edited.
Activity