1.9.3
·
13 commits
to master
since this release
Overview
In this release we're move toward better support of JDBC API (except features
that requires support on a server side).
The notable feature is support of logging. Consider README for more
information how to use it with your logging system.
Breaking changes
Misc
- Use CALL iproto command by default instead of old CALL_16 (#196).
- Cluster client: because of the change above a cluster discovery function
should always return a list of strings: a singleton return value will not be
automatically wrapped into an array anymore (#196). - Cluster client: the driver filters out ill-formatted addresses got from a
cluster discovery function rather then discarding a whole result. This change
is made for consistency with tarantool-python's MeshConnection (#195).
JDBC (alpha)
- Updated URL parameters (#163):
- Replaced
socketProvider
withsocketChannelProvider
. - Replaced
socketTimeout
withloginTimeout
andqueryTimeout
.
- Replaced
- Fixed the URI scheme: the new
jdbc:tarantool://
is JDBC compliant, while
oldtarantool://
is not (#175).
New features
Misc
- Added
operationExpiryTimeMillis
configuration parameter (1 second by
default) (#163). - Added
TarantoolException.isTransient()
method (PR #217). - Supported logging to JUL, SLF4J (logback) or a custom logger (#194). The
driver gives warnings on ill-formed cluster discovery addresses, on
reconnects. The driver allows to trace delayed and reissued requests, but
does not show them on a default log level.
JDBC (alpha)
- Supported
java.sql.Connection
methods (#75, #155):isValid(int timeout)
.
- Supported
java.sql.Statement
methods (#163):getQueryTimeout()
;setQueryTimeout(int seconds)
.
- Supported
javax.sql.DataSource
interface: a factory for connections (#175). - Supported
java.sql.ResultSet
methods (#179):wasNull()
.
- Supported
java.sql.Statement
methods (#180):closeOnCompletion()
;isCloseOnCompletion()
.
- Provide metadata for
ResultSet
s given byjava.sql.DatabaseMetadata
methods
(#74). - Supported
java.sql.Connection
methods (#74).getClientInfo(String name)
;getClientInfo()
;
The driver does not support any property at the moment, but now it conforms
the standard: it givesnull
as an unknown property value and raises an error
at attempt to set such property.
- Supported
java.sql.Statement
methods (#182):getMoreResults()
;getMoreResults(int current)
.
The driver only supports Statement.CLOSE_CURRENT_RESULT value as the argument
for the latter method. Tarantool does not support queries with multiple
statements at the moment, so those methods will always returnfalse
. The
methods were implemented to conform the standard.
- Supported all
java.sql.ResultSetMetaData
methods: they provide a name / type
information where possible or return a predefined value otherwise (#198). - Supported batching of DML requests. The following
java.sql.Statement
and
java.sql.PreparedStatement
methods are implemented (#62):addBatch(String sql)
;executeBatch()
;clearBatch()
.
The driver uses so called pipelining for requests in a batch: it sends them
all to a socket and wait for responses asynchronously. There are caveats due
to lack of interactive transactions on Tarantool side, see README for caveats.
https://github.com/tarantool/tarantool-java/blob/connector-1.9.3/README.md#batch-updates
- Supported
java.sql.Statement
andjava.sql.PreparedStatement
methods
(#181):isPoolable()
;setPoolable(boolean poolable)
.
The driver allows to get and set the hint, but ignores it. This is needed to
be compatible with the standard.
- Supported
java.sql.Connection
methods (#77):prepareStatement(sql, autoGeneratedKey)
for RETURN_GENERATED_KEYS as the
second argument. NO_GENERATED_KEYS was already supported.
- Supported
java.sql.Statement
methods (#189):getMaxFieldSize()
;setMaxFieldSize(int size)
.
- Supported new Tarantool/SQL types that were introduced in Tarantool 2.2
release: UNSIGNED, VARBINARY, NUMBER (BOOLEAN and BOOL were already
supported). Those types now will be correctly handled by
java.sql.ResultSetMetaData
methods. INTEGER and UNSIGNED types now mapped
to BIGINT JDBC type rather then INTEGER one (#67, #92, #209, #210). - Supported
java.sql.PreparedStatement
methods (#190):setAsciiStream(<...>)
;setUnicodeStream(<...>)
;setBinaryStream(<...>)
;setCharacterStream(<...>)
;setNCharacterStream(<...>)
.
Those methods allows to bind a string or a binary value that is obtained
from an InputStream or Reader instance. The driver materializes the streams
in memory, so using this API will not give performance benefits. Tarantool
usually used for relatively short pieces of data, so this should not be a
problem for most cases (see #219 for the discussion).
Bugfixes
Misc
- Fixed NoSuchMethodError on JREs before 9 (#215).
- Provide a cause of TarantoolClientImpl connection failure (#30).