38 KiB
Change Log
Only accretive/fixative changes will be made from now on.
-
1.3.next in progress
-
1.3.1002 -- 2025-03-06
- Address #296 by adding an explicit check (and
throw) forsql-paramsinnext.jdbcfunctions. - Address #295 by providing a way to tell
next.jdbcthat certain options should be passed "as-is" in thePropertiesobject when creating aConnection--:next.jdbc/as-is-propertiesaccepts a sequence (or set) of keywords, identifying properties that should not be converted to strings. - Fix #181 (again!) by adding
Wrappedprotocol as a way forDefaultOptionsandSQLLoggingto consistently expose the underlying connectable, even when nested.
- Address #296 by adding an explicit check (and
-
1.3.994 -- 2025-01-28
- Fix #293 by no longer
lockingon theConnectionretrieved from aDataSource. - Fix documentation examples of
execute-batch!via PR #292 from @devurandom. - Update
java.datato 1.3.113. - Beef up bit/boolean tests and enable them for XTDB.
- Fix #293 by no longer
-
1.3.981 -- 2024-12-13
- Address #291 by adding an XTDB section to Tips & Tricks.
- Added XTDB as a supported database for testing via PR #290. Note: not all features are tested against XTDB due to several fundamental differences in architecture, mostly around primary key/generated keys and lack of DDL operations (since XTDB is schemaless).
- Update dev/test dependencies.
-
1.3.967 -- 2024-12-02
- Address #288 by adding speculative support for
:dbtype "xtdb". - Fix #287 by merging user-supplied options over
:return-keys true. - Fix #282 by tracking raw
Connectionobjects for active TXs, which relaxes several of the conditions around nested transactions. - Replace
assertcalls with proper validation, throwingIllegalArgumentExceptionon failure. - Removed (experimental)
:name-fnoption since the driver for it no longer exists (qualified columns names in XTDB).
- Address #288 by adding speculative support for
-
1.3.955 -- 2024-10-06
- Address #285 by setting the default Clojure version to the earliest supported (1.10.3) to give a better hint to users.
- Update PostgreSQL Tips & Tricks example code to fix possible NPE. PR #284 from @ExNexu.
- Address #283 by adding a note in the documentation, linking to the PostgreSQL bug report about
ANY(array). Address #269 by adding[This was removed in 1.3.967 since XTDB no longer supports qualified column names]:name-fnas an option (primarily for the SQL builder functions, but also for result set processing); the default isclojure.core/namebut you can now usenext.jdbc.sql.builder/qualified-nameto preserve the qualifier.- Update testing deps;
docker-compose=>docker compose.
-
1.3.939 -- 2024-05-17
-
1.3.925 -- 2024-03-15
- Address #275 by noting that PostgreSQL may perform additional SQL queries to produce table names used in qualified result set builders.
- Address #274 by adding
next.jdbc.sql/aggregate-by-keysas a convenient wrapper aroundfind-by-keyswhen you want just a single aggregate value back (such ascount,max, etc). - Address #273 by linking to PG2 in the PostgreSQL Tips & Tricks section.
- Address #268 by expanding the documentation around
insert-multi!andinsert!. - Update dependency versions (including Clojure).
- Code cleanup per
clj-kondo.
-
1.3.909 -- 2023-12-16
- Address #267 by adding the
:schema-optsoption to override the default conventions for identifying foreign keys in columns. - Address #264 by letting
insert-multi!accept empty rows (and producing an empty result vector). This improves compatibility withclojure.java.jdbc. - Address #258 by updating all the library (driver) versions in Getting Started to match the latest versions being tested (from
deps.edn). - Update
java.datato 1.1.103 so thatnext.jdbcno longer has a transitive dependency onorg.clojure/tools.logging! - Attempt to clarify that when calling
reduceon the result ofplan, you must provide an initial value. - Expand examples for calling
next.jdbc.sql/find-by-keysto showLIKEandINclauses. - Update
tools.buildto 0.9.6 (and get rid oftemplate/pom.xmlin favor of new:pom-dataoption tob/write-pom).
- Address #267 by adding the
-
1.3.894 -- 2023-09-24
- Fix #257 by making the
fdefspec forwith-transactionmore permissive. Also add specs foron-connectionand the+optionsvariants of both macros. - Address #256 by adding
with-transaction+optionsandon-connection+options. - Updates most of the JDBC drivers used for testing, including SQLite 3.43.0.0 which now throws an exception when
.getGeneratedKeys()is called so you cannot use:return-generated-keys truewith it but you can addRETURNING *to your SQL statements instead (the tests have been updated to reflect this). - Update
tools.buildto 0.9.5 (and remove:java-optsfrombuild/test)
- Fix #257 by making the
-
1.3.883 -- 2023-06-25
- Address #254 by adding
next.jdbc/active-tx?and adding more explanation to Transactions about the conventions behind transactions and the limitations of thread-local tracking of active transactions innext.jdbc. - Address #251 by updating
next.jdbc/with-loggingdocstring. - Update dev/test dependencies.
- Address #254 by adding
-
1.3.874 -- 2023-04-15
-
1.3.865 -- 2023-03-31
-
1.3.862 -- 2023-03-13
-
1.3.858 -- 2023-03-05
- Address #241 by correcting link to PostgreSQL docs.
- Address clj-kondo#1685 by using
.clj_kondoextension for hook files. - Improve docs for SQLite users per #239 -- peristeri.
- Address #236 by showing examples of
run!overplan.
-
1.3.847 -- 2022-11-04
- Fix #232 by using
as-colsininsert-multi!SQL builder. Thanks to @changsu-farmmorning for spotting that bug! - Fix #229 by adding
next.jdbc.connect/uri->db-specwhich converts a URI string to a db-spec hash map; in addition, ifDriverManager/getConnectionfails, it assumes it was passed a URI instead of a JDBC URL, and retries after calling that function and then recreating the JDBC URL (which should have the effect of moving the embedded user/password credentials into the properties structure instead of the URL). - Address #228 by adding
PreparedStatementcaveat to the Oracle Tips & Tricks section. - Address #226 by adding a section on exception handling to Tips & Tricks (TL;DR: it's all horribly vendor-specific!).
- Add
on-connectionto exportedclj-kondoconfiguration. - Switch
run-testfromshtobb.
- Fix #232 by using
-
1.3.834 -- 2022-09-23
-
1.3.828 -- 2022-09-11
- Fix #222 by correcting implementation of
.conson a row. - Address #221 by supporting
:column-fna top-level option inplan-related functions to transform keys used in reducing function contexts. Also corrects handling of column names in schemanavigation (which previously only supported:table-fnand incorrectly applied it to columns as well). - Address #218 by moving
:extend-via-metadata trueafter the protocols' docstrings. - Document
:useBulkCopyForBatchInsertfor Microsoft SQL Server via PR #216 -- danskarda. - Address #215 by dropping official support for JDK 8 and updating various JDBC drivers in the testing matrix.
- Address #214 by updating test/CI versions.
- Address #212 by documenting the problem with SQLite's JDBC driver.
- Fix #211 by auto-creating
clojure_testDB in MySQL if needed; also streamline the CI processes. - Fix #210 by updating CI to test against MySQL and SQL Server.
- Switch SQL Server testing setup to
docker-compose.
- Fix #222 by correcting implementation of
-
1.2.796 -- 2022-08-01
-
1.2.790 -- 2022-07-29
- Address #207 by supporting "db-spec" hash maps containing
:datasourceor:connection-uri(this is otherwise undocumented and intended to aid migration fromclojure.java.jdbc). - Address #199 by adding notes on UTC usage -- @denismccarthykerry.
- Enhance
insert-multi!to accept a sequence of hash maps and also to support batch execution, via PR #206 -- @rschmukler. - Fix HikariCP pooling example.
- Address #207 by supporting "db-spec" hash maps containing
-
1.2.780 -- 2022-04-04
-
1.2.772 -- 2022-02-09
- To support more tools that perform
datafy/nav, make rows directlynavable (even though this is not really the correct behavior). - Address #193 by expanding the argument specs for
get-datasourceandget-connection. - Streamline
execute-batch!forwith-optionsandwith-logging(and this should generalize to any wrapper that satisfiesConnectableand stores the actualConnectionunder the:connectablekey). - Update log4j2 test dependency.
- Update
build-cljto v0.6.7.
- To support more tools that perform
-
1.2.761 -- 2021-12-15
- Fix #194 by throwing an exception if a table or column name used with the friendly SQL functions (or the SQL builder functions behind them) contains a "suspicious" character (currently, that's just
;). - Update several test dependencies (incl. log4j2).
- Update
build-cljto v0.6.3.
- Fix #194 by throwing an exception if a table or column name used with the friendly SQL functions (or the SQL builder functions behind them) contains a "suspicious" character (currently, that's just
-
1.2.753 -- 2021-11-17
- Address #187 by adding
clj-kondo.exportsfor future expansion (with-transactionis already built intoclj-kondo). - Documentation updates;
pom.xmltemplate cleanup. - Update
build-cljto v0.5.4.
- Address #187 by adding
-
1.2.737 -- 2021-10-17
- Address #186 by updating
java.datato 1.0.92 and documenting HikariCP's:dataSourceProperties. - Address #184 by improving documentation about
:jdbcUrl.
- Address #186 by updating
-
1.2.731 -- 2021-10-04
- Fix #181 by supporting option-wrapped connectables in
execute-batch!. - Address #179 by improving documentation around connection pool initialization.
- Update
build-cljto v0.5.0.
- Fix #181 by supporting option-wrapped connectables in
-
1.2.724 -- 2021-09-25
- Make
next.jdbccompatible with GraalVM 22+ (PR #178, @FieryCod). - Address #177 by adding an important performance tip for Oracle.
- Update most of the JDBC drivers for testing; make it easier to test MariaDB's driver;
- Make
-
1.2.709 -- 2021-08-30
- Fix #174 by removing
:property-separatorfrom "etc" map and defaulting H2 to";"for this. - Switch to
tools.buildfor running tests and JAR building etc.
- Fix #174 by removing
-
1.2.689 -- 2021-08-01
- Address #173 by extending
DatafiableRowtoResultSetso there's a public method to call on (rows of) a JDBC result set directly. - Address #171 by clarifying that you cannot use
clojure.java.jdbcfunctions insidenext.jdbc/with-transactionand discuss how to migrate transaction-based code in the Migration guide. - Address #169 by expanding the description of
with-transactionin Getting Started. - Cross-link to HoneySQL documentation for JSON/JSONB manipulation.
- Remove superfluous prev/next links in docs (cljdoc does this automatically now).
- Update
depstar,test-runner, and CI versions. Add examplebuild.cljto run tests in a subprocess (purely educational).
- Address #173 by extending
-
1.2.674 -- 2021-06-16
- Fix #167 by adding
:property-separatortonext.jdbc.connection/dbtypesand using it injdbc-url. - Address #166 by adding
next.jdbc/with-loggingto create a wrapped connectable that will invoke logging functions with the SQL/parameters and optionally the result or exception for each operation. - Fix
:unit_countreferences in Getting Started (were:unit_cost). - Update
test-runner.
- Fix #167 by adding
-
1.2.659 -- 2021-05-05
- Address #164 by making
clj-commons/camel-snake-kebaban unconditional dependency. [Being a conditional dependency that could be brought in at runtime caused problems with GraalVM-based native compilation as well as with multi-project monorepos] - Add Tips & Tricks section about working with PostgreSQL "interval" types (via PR #163 from @snorremd).
- Address #162 by adding GraalVM to the test matrix (thank you @DeLaGuardo).
- Update several dependency versions.
- Address #164 by making
-
1.1.646 -- 2021-03-15
- Fix #161 by allowing
execute-batch!to work with datasources and connections, and providing the SQL statement directly.
- Fix #161 by allowing
-
1.1.643 -- 2021-03-06
- Change coordinates to
com.github.seancorfield/next.jdbc(although new versions will continue to be deployed toseancorfield/next.jdbcfor a while -- see the Clojars Verified Group Names policy). - Documented
next.jdbc.transaction/*nested-tx*more thoroughly since that difference fromclojure.java.jdbchas come up in conversation a few times recently. - Fix #158 by documenting (and testing)
:allowMultiQueries trueas an option for MySQL/MariaDB to allow multiple statements to be executed and multiple result sets to be returned. - Fix #157 by copying
next.jdbc.prepare/execute-batch!tonext.jdbc/execute-batch!(to avoid a circular dependency that previously relied on requiringnext.jdbc.result-setat runtime -- which was problematic for GraalVM-based native compilation);next.jdbc.prepare/execute-batch!is deprecated: it will continue to exist and work, but is no longer documented. In addition,next.jdbc.prepare/execute-batch!now relies on a privatevolatile!in order to referencenext.jdbc.result-set/datafiable-result-setso that it is GraalVM-friendly. Note: code that requiresnext.jdbc.prepareand usesexecute-batch!without also requiring something that causesnext.jdbc.result-setto be loaded will no longer return generated keys fromexecute-batch!but that's an almost impossible path since nearly all code that usesexecute-batch!will have callednext.jdbc/prepareto get thePreparedStatementin the first place.
- Change coordinates to
-
1.1.613 -- 2020-11-05
- Fix #144 by ensuring
camel-snake-caseis properly required before use in an uberjar context.
- Fix #144 by ensuring
-
1.1.610 -- 2020-10-19
- Fix #140 by adding
"duckdb"tonext.jdbc.connection/dbtypes. - Change
next.jdbc.types/as-*functions to use a thunk instead of a vector to convey metadata, so that wrapped values do not get unpacked by HoneySQL. - Refactor reducing and folding code around
ResultSet, so thatreducible-result-setandfoldable-result-setcan be exposed for folks who want more control over processing result sets obtained from database metadata. datafiable-result-setcan now be called without theconnectableand/oroptsarguments; anilconnectable now disables foreign key navigation in datafied results (rather than throwing an obscure exception).
- Fix #140 by adding
-
1.1.588 -- 2020-09-09
- Fix #139 by adding
next.jdbc.plan/select-one!andnext.jdbc.plan/select!. - If
ResultSet.getMetaData()returnsnull, we assume the column count is zero, i.e., an empty result set. This should "never happen" but some JDBC drivers are badly behaved and their idea of an "empty result set" does not match the JDBC API spec.
- Fix #139 by adding
-
1.1.582 -- 2020-08-05
- Fix #138 by exposing
next.jdbc.connection/jdbc-urlto build:jdbcUrlvalues that can be passed to->poolorcomponent.
- Fix #138 by exposing
-
1.1.581 -- 2020-08-03
- Fix #137 by adding support for specifying username and password per-connection (if your datasource supports this).
- Document SQLite handling of
boolandbitcolumns in a new Tips & Tricks section, inspired by #134. - Address #133 by adding
:return-generated-keysas an option onexecute-batch!.
-
1.1.569 -- 2020-07-10
- Fix #132 by adding specs for
next.jdbc/with-optionsandnext.jdbc.prepare/statement; correct spec fornext.jdbc.connection/component. PR #131 from @Briaoeuidhtns. - Fix #130 by implementing
clojure.lang.ILookupon the three builder adapters. - Fix #129 by adding
with-column-valuetoRowBuilderand a more genericbuilder-adapter. - Fix #128 by adding a test for the "not found" arity of lookup on mapified result sets.
- Fix #121 by conditionally adding
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(which are present only ifcamel-snake-kebabis on your classpath). As of 1.2.659, these are included unconditionally andnext.jdbcdepends directly oncamel-snake-kebab. - 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).
- Fix #132 by adding specs for
-
1.1.547 -- 2020-06-29
- Address #125 by making the result of
planfoldable (in theclojure.core.reducerssense). - Address #124 by extending
next.jdbc.sql.builder/for-queryto support:top(SQL Server),:limit/:offset(MySQL/PostgreSQL),:offset/:fetch(SQL Standard) forfind-by-keys. - Address #117 by adding
next.jdbc.transaction/*nested-tx*to provide control over how attempts to create nested transactions should be handled. - Address #116 by adding a
:multi-rsoption toexecute!to retrieve multiple result sets, for example from stored procedure calls or T-SQL scripts. - Allow
:allto be passed intofind-by-keysinstead of an example hash map or a where clause vector so all rows will be returned (expected to be used with:offsetetc to support simple pagination of an entire table). - Add
:columnsoption tofind-by-keys(andget-by-id) to specify a subset of columns to be returned in each row. This can also specify an alias for the column and allows for computed expressions to be selected with an alias.
- Address #125 by making the result of
-
1.0.478 -- 2020-06-24
- Address #123 by adding
next.jdbc.typesnamespace, full of auto-generatedas-xxxfunctions, one for each of thejava.sql.Typesvalues.
- Address #123 by adding
-
1.0.476 -- 2020-06-22
- Extend default options behavior to
next.jdbc.sqlfunctions.
- Extend default options behavior to
-
1.0.475 -- 2020-06-22
- Add tests for
"jtds"database driver (against MS SQL Server), making it officially supported. - Switch from OpenTable Embedded PostgreSQL to Zonky's version, so that testing can move forward from PostgreSQL 10.11 to 12.2.0.
- Fix potential reflection warnings caused by
next.jdbc.prepare/statementbeing incorrectly type-hinted. - Address #122 by adding
next.jdbc/with-optionsthat lets you wrap up a connectable along with default options that should be applied to all operations on that connectable. - Address #119 by clarifying realization actions in the docstrings for
row-number,column-names, andmetadata. - Address #115 by adding equivalent of
db-do-commandsin theclojure.java.jdbcmigration guide. - Add log4j2 as a test dependency so that I have better control over logging (which makes debugging easier!).
- Add tests for
-
1.0.462 -- 2020-05-31
- Addition of
next.jdbc.datafyto provide moredatafy/navintrospection (see the additional section in datafy, nav, and :schema for details). - Addition of
next.jdbc.result-set/metadatato provide (datafied) result set metadata withinplan.
- Addition of
-
1.0.445 -- 2020-05-23
- Enhanced support in
planfor "metadata" access:row-numberandcolumn-namescan be called on the abstract row (even after callingdatafiable-row). In addition,Associativeaccess via numeric "keys" will read columns by index, and row abstractions now supportIndexedaccess 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. - Add example of getting generated keys from
execute-batch!. - Add MySQL-specific result set streaming tip.
- Add array handling example to PostgreSQL Tips & Tricks. PR #108 from @maxp.
- Investigate possible solutions for #106 (mutable transaction thread safety) -- experimental
lockingonConnectionobject.
- Enhanced support in
-
1.0.424 -- 2020-04-10
- In Tips & Tricks, noted that MySQL returns
BLOBcolumns asbyte[]instead ofjava.sql.Blob. - Address #103, #104 by adding a section on timeouts to Tips & Tricks.
- Fix #102 by allowing keywords or strings in
:return-keys. - Fix #101 by tightening the spec on a JDBC URL to correctly reflect that it must start with
jdbc:. - Add support for calling
.getLoginTimeout/.setLoginTimeouton the reifiedDataSourcereturned byget-datasourcewhen called on a hash map "db-spec" or JDBC URL string. - Documentation improvements based on feedback (mostly from Slack), including a section on database metadata near the end of Getting Started.
- In Tips & Tricks, noted that MySQL returns
-
1.0.409 -- 2020-03-16
- Address #100 by adding support for MariaDB (@green-coder). Set
NEXT_JDBC_TEST_MARIADB=trueas well asNEXT_JDBC_TEST_MYSQL=truein order to run tests against MariaDB.
- Address #100 by adding support for MariaDB (@green-coder). Set
-
1.0.405 -- 2020-03-14 (no code changes -- just documentation)
- Improve documentation around
plansoreduceetc is more obvious. - Attempt to drive readers to cljdoc.org instead of the GitHub version (which is harder to navigate).
- Improve documentation around
-
1.0.395 -- 2020-03-02
- Add
read-as-instantandread-as-localfunctions tonext.jdbc.date-timeto extendReadableColumnso that SQLDATEandTIMESTAMPcolumns can be read as Java Time types. - Specifically call out PostgreSQL as needing
next.jdbc.date-timeto enable automatic conversion ofjava.util.Dateobjects to SQL timestamps for prepared statements (#95). - Split Tips & Tricks into its own page, with a whole new section on using JSON data types with PostgreSQL (#94 -- thank you @vharmain).
- Bump dependencies to latest.
- Add
-
1.0.384 -- 2020-02-28
- Add PostgreSQL streaming option information to Tips & Tricks (#87).
- Minor documentation fixes (including #85, #92, #93).
- Improve
Unknown dbtypeexception message (to clarify that:classnameis also missing, #90). - Fix #88 by using 1-arity
keywordcall when table name unavailable (or:qualifier-fnreturnsnilor an empty string); also allows:qualifier-fnfunction to be called on empty table name (so:qualifier-fn (constantly "qual")will now work much likeclojure.java.jdbc's:qualifier "qual"worked). - Address #89, #91 by making minor performance tweaks to
next.jdbc.result-setfunctions. - Planning to move to MAJOR.MINOR.COMMITS versioning scheme (1.0.384).
-
1.0.13 -- 2019-12-20
- Fix #82 by adding
clojure.java.data-based support for setting arbitrary properties onConnectionandPreparedStatementobjects, post-creation. Note: this uses the Java reflection API under the hood. - Adds
next.jdbc.prepare/statementto createStatementobjects with all the options available toprepareexcept:return-keys. - Update
org.clojure/java.datato 0.1.5 (for property setting). - Additional clarifications in the documentation based on feedback on Slack.
- Fix #82 by adding
-
1.0.12 -- 2019-12-11
- Address #81 by splitting the SQL-building functions out of
next.jdbc.sqlintonext.jdbc.sql.builder. - Fix #80 by avoiding the auto-commit restore after a failed rollback in a failed transaction.
- Address #78 by documenting the
:connectionInitSqlworkaround for HikariCP/PostgreSQL and non-default schemas.
- Address #81 by splitting the SQL-building functions out of
-
1.0.11 -- 2019-12-07
- Fix #76 by avoiding conversions on
java.sql.Dateandjava.sql.Timestamp. - Add testing against Microsoft SQL Server (run tests with environment variables
NEXT_JDBC_TEST_MSSQL=yesandMSSQL_SA_PASSWORDset to your local --127.0.0.1:1433-- SQL Serversauser password; assumes that it can create and dropfruitandfruit_timetables in themodeldatabase). - Add testing against MySQL (run tests with environment variables
NEXT_JDBC_TEST_MYSQL=yesandMYSQL_ROOT_PASSWORDset to your local --127.0.0.1:3306-- MySQLrootuser password; assumes you have already created an empty database calledclojure_test). - Bump several JDBC driver versions for up-to-date testing.
- Minor documentation fixes.
- Fix #76 by avoiding conversions on
-
1.0.10 -- 2019-11-14
- Fix #75 by adding support for
java.sql.Statementtoplan,execute!, andexecute-one!. - Address #74 by making several small changes to satisfy Eastwood.
- Fix #73 by providing a new, optional namespace
next.jdbc.date-timethat can be required if your database driver needs assistance convertingjava.util.Date(PostgreSQL!) or the Java Time types to SQLtimestamp(or SQLdate/time). - Fix link to All The Options in Migration from
clojure.java.jdbc. PR #71 (@laurio). - Address #70 by adding CLOB & BLOB SQL Types to the Tips & Tricks section of Friendly SQL Functions and by adding
next.jdbc.result-set/clob-column-readerandnext.jdbc.result-set/clob->stringhelper to make it easier to deal withCLOBcolumn data. - Clarify what
execute!andexecute-one!produce when the result set is empty ([]andnilrespectively, and there are now tests for this). Similarly forfind-by-keysandget-by-id. - Add MS SQL Server section to Tips & Tricks to note that it returns an empty string for table names by default (so table-qualified column names are not available). Using the
:result-type(scroll) and:concurrencyoptions will cause table names to be returned. - Clarify that Friendly SQL Functions are deliberately simple (hint: they will not be enhanced or expanded -- use
plan,execute!, andexecute-one!instead, with a DSL library if you want!). - Improve migration docs: explicitly recommend the use of a datasource for code that needs to work with both
clojure.java.jdbcandnext.jdbc; add caveats about column name conflicts (in several places). - Improve
datafy/navdocumentation around:schema. - Update
org.clojure/java.datato"0.1.4"(0.1.2 fixes a number of reflection warnings).
- Fix #75 by adding support for
-
1.0.9 -- 2019-10-11
- Address #69 by trying to clarify when to use
execute-one!vsexecute!vsplan. - Address #68 by clarifying that builder functions do not affect the "fake result set" containing
:next.jdbc/update-count. - Fix #67 by adding
:jdbcUrlversion spec. - Add
next.jdbc.optional/as-maps-adapterto provide a way to override the default result set reading behavior of using.getObjectwhen omitting SQLNULLvalues from result set maps.
- Address #69 by trying to clarify when to use
-
1.0.8 -- 2019-09-27
- Fix #66 by adding support for a db-spec hash map format containing a
:jdbcUrlkey (consistent with->pool) so that you can create a datasource from a JDBC URL string and additional options. - Address #65 by adding a HugSQL "quick start" to the Friendly SQL Functions section of the docs.
- Add
next.jdbc.specs/unstrument. PR #64 (@gerred). - Address #63 by improving documentation around qualified column names and
:qualifier(clojure.java.jdbc) migration, with a specific caveat about Oracle not fully supporting.getTableName().
- Fix #66 by adding support for a db-spec hash map format containing a
-
1.0.7 -- 2019-09-09
- Address #60 by supporting simpler schema entry formats:
:table/columnis equivalent to the old[:table :column :one]and[:table/column]is equivalent to the old[:table :column :many]. The older formats will continue to be supported but should be considered deprecated. PR #62 (@seancorfield). - Added test for using
ANY(?)and arrays in PostgreSQL forIN (?,,,?)style queries. Added a Tips & Tricks section to Friendly SQL Functions with database-specific suggestions, that starts with this one. - Improved documentation in several areas.
- Address #60 by supporting simpler schema entry formats:
-
1.0.6 -- 2019-08-24
- Improved documentation around
insert-multi!andexecute-batch!(addresses #57). - Fix #54 by improving documentation around data type conversions (and the
ReadableColumnandSettableParameterprotocols). - Fix #52 by using a US-locale function in the "lower" result set builders to avoid unexpected character changes in column names in locales such as Turkish. If you want the locale-sensitive behavior, pass
clojure.string/lower-caseinto one of the "modified" result set builders. - Add
next.jdbc.result-set/as-maps-adapterandnext.jdbc.result-set/as-arrays-adapterto provide a way to override the default result set reading behavior of using.getObject. - Update
org.clojure/test.checkto"0.10.0".
- Improved documentation around
-
1.0.5 -- 2019-08-05
- Fix #51 by implementing
IPersistentMapfully for the "mapified" result set insideplan. This adds support fordissocandcons(which will both realize a row),count(which returns the column count but does not realize a row),empty(returns an empty hash map without realizing a row), etc. - Improved documentation around connection pooling (HikariCP caveats).
- Fix #51 by implementing
-
1.0.4 -- 2019-07-24
- Fix #50 by adding machinery to test against (embedded) PostgreSQL!
- Improved documentation for connection pooled datasources (including adding a Component example); clarified the recommendations for globally overriding default options (write a wrapper namespace that suits your usage).
- Note: this release is primarily to fix the cljdoc.org documentation via repackaging the JAR file.
-
1.0.3 -- 2019-07-23
- Fix #48 by adding
next.jdbc.connection/->pooland documenting how to use HikariCP and c3p0 in the Getting Started docs (as well as adding tests for both libraries). - Documentation improvements, including examples of extending
ReadableColumnandSettableParameter. - Updated test dependencies (testing against more recent versions of several drivers).
- Fix #48 by adding
-
1.0.2 -- 2019-07-15
- Fix #47 by refactoring database specs to be a single hash map instead of pouring multiple maps into one.
- Fix #46 by allowing
:hostto be:nonewhich tellsnext.jdbcto omit the host/port section of the JDBC URL, so that local databases can be used with:dbtype/:classnamefor database types thatnext.jdbcdoes not know. Also added:dbname-separatorand:host-prefixto the "db-spec" to allow fine-grained control over how the JDBC URL is assembled. - Fix #45 by adding TimesTen driver support.
- Fix #44 so that
insert-multi!with an emptyrowsvector returns[]. - Fix #43 by adjusting the spec for
insert-multi!to "require less" of thecolsandrowsarguments. - Fix #42 by adding specs for
execute-batch!andset-parametersinnext.jdbc.prepare. - Fix #41 by improving docstrings and documentation, especially around prepared statement handling.
- Fix #40 by adding
next.jdbc/execute-batch!(previouslynext.jdbc.prepare/execute-batch!). - Added
asserts innext.jdbc.sqlas more informative errors for cases that would generate SQL exceptions (from malformed SQL). - Added spec for
:order-byto reflect what is actually permitted. - Expose
next.jdbc.connect/dbtypesas a table of known database types and aliases, along with their class name(s), port, and other JDBC string components.
-
1.0.1 -- 2019-07-03
- Fix #37 by adjusting the spec for
with-transactionto "require less" of the:bindingvector. - Fix #36 by adding type hint in
with-transactionmacro. - Fix #35 by explaining the database-specific options needed to ensure
insert-multi!performs a single, batched operation. - Fix #34 by explaining save points (in the Transactions documentation).
- Fix #33 by updating the spec for the example
key-mapinfind-by-keys,update!, anddelete!to reflect that you cannot pass an empty map to these functions (and added tests to ensure the calls fail with spec errors).
- Fix #37 by adjusting the spec for
-
1.0.0 "gold" -- 2019-06-12
- Address #31 by making
reify'd objects produce a more informative string representation if they are printed (e.g., misusingplanby not reducing it or not mapping an operation over the rows). - Fix #26 by exposing
next.jdbc.result-set/datafiable-result-setso that variousjava.sql.DatabaseMetaDatamethods that return result metadata information inResultSets can be easily turned into a fully realized result set.
- Address #31 by making
-
1.0.0-rc1 -- 2019-06-04
- Fix #24 by adding return type hints to
next.jdbcfunctions. - Fix #22 by adding
next.jdbc.optionalwith six map builders that omitNULLcolumns from the row hash maps. - Documentation improvements (#27, #28, and #29), including changing "connectable" to "transactable" for the
transactfunction and thewith-transactionmacro (for consistency with the name of the underlying protocol). - Fix #30 by adding
modifiedvariants of column name functions and builders. Thelowervariants have been rewritten in terms of these newmodifiedvariants. This adds:label-fnand:qualifier-fnoptions that mirror:column-fnand:table-fnfor row builders.
- Fix #24 by adding return type hints to
-
1.0.0-beta1 -- 2019-05-24
- Set up CircleCI testing (just local DBs for now).
- Address #21 by adding
next.jdbc.specsand documenting basic usage. - Fix #19 by caching loaded database driver classes.
- Address #16 by renaming
reducible!toplan(BREAKING CHANGE!). - Address #3 by deciding to maintain this library outside Clojure Contrib.
Alpha Builds
- 1.0.0-alpha13 -- 2019-05-04 -- Fix #18 by removing more keys from properties when creating connections.
- 1.0.0-alpha12 -- 2019-04-26 -- Fix #17 by renaming
:next.jdbc/sql-stringto:next.jdbc/sql-params(BREAKING CHANGE!) and pass whole vector. - 1.0.0-alpha11 -- 2019-04-24 -- Rename
:gen-fnto:builder-fn(BREAKING CHANGE!); Fix #13 by adding documentation fordatafy/nav/:schema; Fix #15 by automatically adding:next.jdbc/sql-string(as of 1.0.0-alpha12::next.jdbc/sql-params) into the options hash map, so custom builders can depend on the SQL string. - 1.0.0-alpha9 -- 2019-04-22 -- Fix #14 by respecting
:gen-fn(as of 1.0.0-alpha11::builder-fn) inexecute-one!forPreparedStatement. - 1.0.0-alpha8 -- 2019-04-21 -- Initial publicly announced release.