Date: 2016-05-20
Fix statement leakage on fetch
functions.
Remove default fetch-size
parameter value.
Date: 2016-04-29
Add support for :returning
option for execute
.
Dependencies updates.
Bug fixes.
Date: 2016-03-20
Upgrade default clojure version to 1.8.0
Upgrade dependencies.
Date: 2015-08-26
Remove potemkin dependency.
Date: 2015-08-14
Remove deprecated code.
Update dependencies.
Date: 2015-04-28
Update dependencies versions.
Minor fix on tests.
Date: 2015-03-29
This is an other release focused in simplify the main api. It deprecates the old api but maintains full backward compatibility until 0.6.0.
New execute
function in terms of abstraction. This method replaces the execute!
and execute-prepared!
functions.
New fetch
function in terms of abstraction. This method replaces the query
function.
New transaction api based in new atomic
macro and atomic-apply
function located
now on core ns. The old functions (call-in-transaction
and with-transaction
) are
still available in now deprecated jdbc.transaction
namespace.
New name to lazy-query: fetch-lazy.
The major change of this release is make all query/statement executin functions works
in terms of generic abstractions defined as protocols. The api is highly influenced
by suricatta
api, making it mostly compatible with it.
Date: 2015-02-07
Fix wrong parsing boolean values in MSSQL (thanks to @vbedegi).
Date: 2015-01-11
This release is focused to simplify the code and use more clojure native constructions
like with-open
instead of own defined macros.
Relevant changes:
Connection is not longer defined as defrecord. It breaks apps that relies on hash-map interface of the connection. Now the connection is more extensible and it is defined in terms of protocols.
with-connection
macro is marked as deprecated, now the recommended way to handle
connection resources is using clojure builtin with-open
macro.
The make-query
function is replaced by lazy-query
. It is not simple rename.
lazy-query
function returns some kind of cursor object. That cursor allows create an
arbitrary number of lazyseqs (with new `cursor→lazyseq function) executing a query
using server side cursors if them are available.
Removed with-query
macro (because it depends on now also removed make-query
function)
and the behavior is replaced by lazy-query
.
Other changes:
Set more consistent name to protocol and protocol method that responsible for create preapare
statements: ISQLStatement/normalize
→ IPreparedStatementConstructor/prepared-statement
Make connection constructor extensible and implemented as IConnectionConstructor
protocol.
The function responsible of creating a connection, is renamed: make-connection
→ connection
(conserving an alias for backward compatibility).
Remove the :connection-uri
option because is almost same thing that uri.
Deprecated dbspecs with datasource as key. Now datasource instances can be passed directly to
connection
function without wrapping it in a hash-map.
The connection
function now accepts a optional second parameter in case when dbspec is not
in clojure hash-map format.
Deprecated own connection pool extensions. Because they are less flexible that creating own datasource instance. The documentation is updated with examples of how to create datasource instances for all previously supported connection pool implementations.
Move the rollback flag check to transaction strategy, instead of having it hardcoded in the call-in-transaction function. This change simplifies a little bit creating own transaction strategies implementations, removing unnecesary accidental complexity.
Date: 2014-11-20
Set default java version to java7
Date: 2014-10-28
Add some missing typehints.
Add documentation for new connection pool adapter: hikaricp
Remove useless usage of apply on transaction macro.
Restructure documentaion related to connection pool adapters.
Move tests related to connection pool to each adapter repository.
Date: 2014-10-11
Remove jdbc.types.connection namespace (records now on jdbc.types ns).
Remove jdbc.types.resultset namespace (records now on jdbc.types ns).
New jdbc.meta ns with connection metadata access functions (moved from jdbc.types.connection).
Type hints for almost all code.
Split types declaration, protocol defintion and implementation in different namespaces.
Normalize connection pool parameters, making them more plugable.
Improve documentation.
Date: 2014-07-18
Fixed bug related to max-rows parameter on make-prepared-statement
Fixed bug related to fetch-size that it was ignored.
Date: 2014-06-29
execute-prepared!
now accepts parametrized sql like other query
methods.
Minor fixes.
Date: 2014-06-15
Move jdbc namespace vars to jdbc.core. potemkin is used for conserve backward compatibility but it will be removed in 0.3
Date: 2014-06-08
Add query-first helper function.
Date: 2014-06-04
Add optional options parameter to with-transaction
macro.
Improved execute-prepared!
function. Now accepts self prepared statements like query
.
Improved make-prepared-statement
function. Now accept string and parametrized vector
as sql value.
Pretty dbspec format.
Read only connections.
Set schema to connection.
Date: 2014-04-06
Connection pooling is splited to separate module (it preserves same api, but should be declared as additional dependency if you want use it).
Set clojure 1.6 as default clojure version.
Add apache-commonds dbcp 2.0 connection pool support.
Breaking change: rename transaction strategy methods to: begin! rollback! commit!
Breaking change: call-in-transaction now accepts options map insted of named parameters.
Fix bugs on marking transaction rollback-only.
Allow set isolation level for transaction.
Allow set read-only transaction.
Date: 2014-02-16
jdk6 support added (java.lang.AutoCloseable
interface is replaced
with java.io.Closeable
interface)
Add ISQLStatement protocol for make easy extend query (and friends) function parameter.
Performance improvements (with micro bench suite)
Changed syntax for with-connection
for more idiomatic way (previous behavior
mantained for backward compatibility).
Date: 2014-01-21
Note: this should be a last beta release.
Query functions (make-query, query and with-query) now accepts prepared statements.
Add ability to extend all behavior between some type is set as parameter to prepared statement
and retrieved from resultset thanks to ISQLType
and ISQLResultSetReadColumn
(this allows
extend not default types, making it compatible for pass as paramater to jdbc and extend sql types for
automatically convert them to custom types when are retrieved from resultset).
Refactored jdbc.types namespace (rename QueryResult to ResultSet and put each type in their own namespace and add additional util functions for each type).
Move all transactions logic to separate namespace, removing it from a main jdbc namespace (breaking change).
Rename execute-statement
to execute-statement!
for more concise function naming.
Remove untested and unused execute-statement→query-result
function.
Date: 2013-12-14
Now transaction management is extensible. ITransactionStrategy is exposed and
DefaultTransactionStrategy is a default implementation that cases with previous transaction
behavior. If you want other transaction strategy, just implement ITransactionStrategy protocol
and pass it to call-in-transaction
function.
Custom sql types now supported. Extend your type with ISQLType protocol and implement as-sql-type
function for it, that should return database compatible type.
Backward incompatible change: mark-as-rollback-only!
, unmark-rollback-only!
and
is-rollback-only?
are renamed to more concise names: set-rollback!
, unset-rollback!
and is-rollback-set?
Rollback behavior changed. Now rollback functions only affects a current transaction or subtransaction and it never interferes in parent transactions.
Ensuers inmutablity on connection instance on transaction blocks. Now transaction blocks has only one clear defined side-effect: commit/rollback/setAutoCommit operations. Rollback flag is more limited side-effect that only change state of connection for current transaction.
Simplify isolation level setting. Now only can set isolation level on dbspec or on creating connection. All global state is removed.
Date: 2013-12-08
Minor code cleaning and function name consistency fixes.
Expose more private functions as public.
Fix wrong preconditions and some bugs introduced in previos version.
Add more tests.
Date: 2013-11-25
Remove some taken code from clojure.java.jdbc that are licensed under epl.
Add ability to set the isolation level.
Add new query
function.
Change default behavior for querying a database: now the default behavior is evaluate a request because of all jdbc implementation retrieves all resulset in memory and use lazy-seq is totally useless.
Date: 2013-11-14
Initial relase
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close