Releases: seancorfield/next-jdbc
Release 1.1.588
Enhancements:
- Adds
next.jdbc.plan/select-one!
andnext.jdbc.plan/select!
to make certain common uses ofnext.jdbc/plan
easier. #139
Bug Fixes:
- For badly-behaved JDBC drivers that do not correctly implement empty result sets, treat
ResultSet.getMetaData()
returningnull
as if the column count is zero, instead of throwing an NPE. [I'm looking at you, Snowflake!]
Release 1.1.582
Adds next.jdbc.connection/jdbc-url
to turn a "db spec" into a JDBC URL, for use with ->pool
and component
.
Release 1.1.581
Enhancements:
- Added support for specifying username and password per-connection (if your datasource supports this). #137.
- Added
:return-generated-keys
option toexecute-batch!
so you can get back (all) the generated keys instead of update counts. #133
Documentation:
- Document SQLite handling of
bool
andbit
columns in a new Tips & Tricks section, inspired by #134.
Release 1.1.569
Bug Fixes:
- Fix Spec for
next.jdbc.connection/component
(PR #131 from @Briaoeuidhtns) andnext.jdbc.prepare/statement
(#132); add Spec fornext.jdbc/with-options
. - Fix support for
:cols
/:rsmeta
on builder adapters by implementingclojure.lang.ILookup
(#130).
Enhancements:
- Add
with-column-value
toRowBuilder
and a more genericbuilder-adapter
to provide more control over column reading (#129). - Conditionally add
next.jdbc/snake-kebab-opts
,next.jdbc/unqualified-snake-kebab-opts
,next.jdbc.result-set/as-kebab-maps
, andnext.jdbc.result-set/as-unqualified-kebab-maps
ifcamel-snake-kebab
is on your classpath (#121).
Documentation:
- Correct MySQL batch statement rewrite tip: it's
:rewriteBatchedStatements true
(plural). Also surface the batch statement tips in the Tips & Tricks page. - Clarify how combining is interleaving with reducing in Reducing and Folding with
plan
. - Use "JDBC URL" consistently everywhere (instead of "JDBC URI" in several places).
Testing:
- Add a test for the "not found" arity of lookup on mapified result sets (#128).
Release 1.1.547
Significant Enhancement:
- Multiple result sets can now be returned from
execute!
by specifying the:multi-rs true
option. This is useful when calling stored procedures and, for SQL Server, when working with T-SQL scripts. #116
Additional Enhancements:
- The result of
plan
is foldable, in theclojure.core.reducers
sense, and will use fork/join to support folding large result sets (while still supporting streaming of result sets). #125 find-by-keys
now supports column selection (via the:columns
option), all row fetching (via:all
in place of the where clause/example hash map), and pagination (via:top
-- SQL Server,:limit
/:offset
-- MySQL/PostgreSQL, and:offset
/:fetch
-- SQL Standard -- via the underlying SQL builderfor-query
). #124- The behavior of attempts to create nested transactions can now be controlled via
next.jdbc.transaction/*nested-tx*
::allow
-- default, existing behavior,:ignore
-- more compatible withclojure.java.jdbc
, or:prohibit
-- to ensure you don't accidentally try to create a nest transaction (on a given thread). #117
Release 1.0.478
Add next.jdbc.types
with as-xxx
wrapper functions corresponding to java.sql.Types/XXX
values.
Release 1.0.476
Extends default options behavior -- next.jdbc/with-options
-- to the friendly SQL functions in next.jdbc.sql
.
Release 1.0.475
Officially Supported:
- The jTDS driver (against Microsoft SQL Server).
- PostgreSQL 12.2.0 (previously only 10.11 was officially supported).
Bug Fixes:
- Fix potential reflection warnings caused by
next.jdbc.prepare/statement
being incorrectly type-hinted.
Enhancements:
- Address #122 by adding
next.jdbc.with-options
that lets you wrap up a connectable along with default options that should be applied to all operations on that connectable.
Documentation:
Release 1.0.462
A new, optional, namespace next.jdbc.datafy
has been added to expand dataification (and navigation) to several JDBC object types.
Inside the reducing function over the result of plan
, you can now call next.jdbc.result-set/metadata
to get at a datafication of the ResultSetMetaData
object from the underlying ResultSet
object.
Release 1.0.445
Enhancements:
- Enhanced support in
plan
for "metadata" access:row-number
andcolumn-names
can be called on the abstract row (even after callingdatafiable-row
). In addition,Associative
access via numeric "keys" will read columns by index, and row abstractions now supportIndexed
access vianth
(which will also read columns by index). Fixes #110. - Support for Stuart Sierra's Component library, via
next.jdbc.connection/component
. See updated Getting Started guide for usage. - Investigate possible solutions for #106 (mutable transaction thread safety) -- experimental
locking
onConnection
object.
Documentation: