Repository navigation
v0.1.2
Groundwork for running the real clojure.jdbc on jolt instead of reimplementing its API here. Nothing is switched over yet and the jdbc.core API is unchanged, so this is a no-op for existing code.
Ordered row access
A JDBC ResultSet is read by column index and ResultSetMetaData reports labels by index, but both drivers returned keyword-keyed maps with column order already lost. db.sqlite/query-raw and db.pg/all-raw now return {:labels [...] :rows [[v ...]]}, and query and all build their maps from that, so the map-shaped API is untouched.
The ? rewriter moved into db.pg
Rewriting JDBC ? placeholders to $N moved from jdbc.core into db.pg, which is where it belongs, and db.pg/run applies it so every caller gets it rather than each one remembering to. Its lexer table moved with it and still runs in the sqlite-only build.
The java.sql shim, present but unwired
db.jdbc-shim and db.jdbc are the java.sql surface clojure.jdbc drives — Connection, Statement, PreparedStatement, ResultSet, ResultSetMetaData, DatabaseMetaData and Savepoint — over the native drivers.
They are deliberately not in use. While this repo still ships its own clj/jdbc/core.clj, that copy shadows the dependency on the classpath, so db.jdbc resolves to ours rather than to clojure.jdbc. Removing it is the switchover, and it lands with the test-suite migration in a later release.
For what it is worth, the shim already works: with the three host fixes in jolt-lang/jolt#585, the published clojure.jdbc runs unmodified against native sqlite through it, including generated keys, transactions, nested savepoints and column-ordered as-rows? results. The switchover is gated on a jolt release carrying those fixes, since CI installs jolt from its latest release.
Changes
- #9 Groundwork for running the real clojure.jdbc on a java.sql shim