522 lines (375 sloc) 16.3 KB
- @BindIn: fix handling of empty lists on Postgres
- clear SqlObject ThreadLocals on close, fixes leak on e.g. webapp reload
- expose Script.getStatements()
- Improved BindIn functionality: can now process Iterables and arrays/varargs
of any type, and has configurable handling for a null/empty argument.
Check the source code comments or your IDE hints for details.
- SPRING BREAKING CHANGE: move from Spring 2 to Spring 3, how timely of us
- SQL lookups in the context of a SqlObject method now also find according
to the same rules as annotation
- DefaultMapper now has option to disable case folding
- Fix AbstractMethodError swallowing in SqlObject methods
- simple @GetGeneratedKeys @SqlBatch support (only int keys for now)
- ClasspathStatementLocator performance improvements
- cglib 3.2.2, asm 5.1; fixes codegen for new Java 8 bridge methods
- @UseStringTemplate3StatementLocator now caches created locators
- new @OutParameter annotation for fetching named out params on @SqlCall methods
- expose Handle.isClosed
- Allow clearing of bindings in SQLStatement
- (finally!) parse Postgres CAST syntax 'value::type' properly in colon
prefix statements
- fix @SqlBatch hanging if you forget to include an Iterable-like param
- fix @SqlUpdate @GetGeneratedKeys to allow non-number return types
- Expose Foreman on StatementContext
- Support for the ability to provide a list of the column names returned
in a prepared batch #254
- fix @BindBean of private subtypes, #242
2.70 *** MAJOR CHANGES ***
- allow JDK8 default methods in SQLObject interfaces. Backport of #190.
- switch to standard Maven toolchains.xml for cross-compilation, #169.
for instructions on how to use it.
- Correctly handle semicolons and inline comments in SQL statements.
Existing SQL statements may break due to lexer changes, ensure you have
test coverage.
- Introduce "column mappers" which dramatically improve type handling
for BeanMapper-style automatic mapping
- Disallow "nested" transactions explicitly. They almost certainly don't
work the way you expect. Use savepoints instead.
- Eagerly check return type of @SqlUpdate annotated SqlObject methods
- Allow getting generated keys by name for Oracle
- Allow getting generated keys from prepared Batch statements
- Cache StatementRewriter parsing of statements
- Support mapping of URI, char, Character types
- Include lambda-friendly callback methods on Handle and DBI, #156
- Also include asm in shade, fixes build. Sorry about the broken releases...
2.61 *** DO NOT USE ***
- Fix shading broken in 2.60, fixes #152
2.60 *** DO NOT USE ***
- Fix Javadoc generation for JDK6 and JDK8
- Add support for /* */ style comments in statements
- Add @BindMap annotation which allows parameters passed in a Map<String, Object>
- Add support for running Script objects as individual statements rather than batch
- Add support for default bind name based on argument position number (thanks @arteam)
- Fix SqlObject connection leak through result iterator (thanks @pierre)
- Switch to using cglib instead of cglib-nodep so we can pull ASM 5.0.2 which is Java 8 compatible
- Classmate to 1.1.0
- Fixes #137, broken ClasspathStatementLocator cache (thanks @HiJon89).
- Recognize MySQL REPLACE statements
- Identical to 2.57 except that the jar is correctly shaded.
2.57 *** DO NOT USE *** - Packaging for 2.57 was accidentially broken, use 2.58 instead.
Thanks to @HiJon89 for spotting the problem!
- use Types.NULL for null objects (thanks @christophercurrie)
- improve behavior on transactional autocommit (thanks @hawkan)
- fix connection leak in on-demand sqlobject (thanks @pmaury)
- code cleanups
- fix cleanup bug when e.g. cleanupHandle was called multiple times
on the same query.
- Generic object binding uses specific type if value is non-null.
- Tests now run in parallel
- Added Template supergroup loading to StringTemplate3StatementLocator
- add a global cache for templates loaded from an annotation.
- fix a handler cache bug.
- not released
- fix PMD, Findbugs and javadoc complaints
- clean license headers in all source files
- use standard-oss base pom to build,
build with all checkers enabled
- build with antlr 3.4
- use classmate 0.9.0 (from 0.8.0)
- make all dependencies that are not required optional (not provided)
- add travis setup for autobuilds
- Remove log4j dependency for slf4j logger
- Ensure that compilation using JDK7 or better uses a JDK6 rt.jar
- Fix the @BindBean / Foreman.waffle code to use correct ArgumentFactories
and not just the ObjectArgumentFactory
- fix spurious test failures when using newer versions of the surefire plugin
- Support for setting Enum values from strings in BeanMapper
- Add to Handle and ResultIterator
- Use CGLIB for sql objects instead of dyanmic proxies
- Support for classes as well as interfaces in the sql object api
- Add @Transaction for non @Sql* methods in sql objects
- @CreateSqlObject annotation sql objects to replace Transmogrifier
- Add access to ResultSet on FoldController
- Registered Mappers on DBi and Handle, and the Query#mapTo addition
- Sql Object API
- Botched release attempt with Maven 3
- Bugfix: Allow escaping of arbitrary characters in the SQL source, especially allow
escaping of ':' (which is needed for postgres type casts)
- minor code cleanups to reduce number of warnings
- Expose NamedArgumentFinder to allow custom lookup of Arguments. JDBI already provides
two implementations of the Interface, one for Maps and one for BeanProperties.
- Add ability to set query timeout (in seconds) on SQLStatement
- Add <url /> element to pom so can get into central :-)
- Add ` as a legal SQL character in colon prefix grammar
- non-existent release, fighting maven
- First 2.9 series release
- Make the DefaultMapper public.
- Aborted, trying to make gpg signing work correctly
- Add methods to SQLStatement and PreparedBatch that allow adding a set of defines
to the context in one go.
- Add ~ { and } as legal characters in the colon prefix grammar
- A TimingCollector was added which can be registered on the DBI or handle which then
gets called with nanosecond resolution elapsed time every time a statement is run
against the data base.
- re-added some Exception constructors that were accidentially removed in 2.3.0 making
2.4.0-2.6.x non-backwards compatible.
- Bind java.util.Date as a timestamp because it contains time and date.
- BasicHandle constructor is now package private (which it always should have been)
- add Clirr Report to the Maven Site
- convert all calls to System.currentTimeMillis() to System.nanoTime(), which is more
accurate and much more lightweight. As we only calculate time differences, it is
good enough.
- fix more compiler warnings
- add null checks for all object types on SQLStatement
- move object null checks, that don't require boxing/unboxing
into the Argument classes. Keep the checks for object/primitive
types in SQL to avoid boxing/unboxing overhead.
Fix a number of compiler warnings
Add new binding methods for SQLStatement
- Integer, Boolean, Byte, Long, Short Object
- double, float, short primitive
All bind methods taking an object should check
for null values and bind a NullArgument accordingly.
Add new binding methods for SQLStatement
- char types
- boolean as int (for DBs missing a boolean type)
Re-add unit test removed in 2.4.9 with unicode escapes
Remove Unit tests that fails depending on Platform Encoding
Switch to ANTLR 3 for grammars so that shading works again
Move source code to github
Fix several dependency and shading issues which came up from the
ant to conversion.
Add better messages on statement exceptions
Switch to maven2 for builds
Add the statement context to statement related exceptions, including a new
DBIExcpetion abstact subclass, StatementException, which exposes this.
Fix OracleReturning compile time dependency using Reflection.
Deprecated OracleReturning.
Added CallableStatement support :
- new method handle.prepareCall
- new Call class and CallableStatementMapper interface
Fixes to colon prefix grammar to support empty string literals and
escaped quotes.
Added access to more of the actual context for a statement to StatementContext
Change OracleReturning to use oracle.jdbc.oraclePreparedStatement for
compatibility with ojdbc6.jar compatibility
Fix a result set leak in the case of a Mapper raising an exception rather
than returning cleanly
Add DBI#inTransaction
Add timing info to logging calls
Add Query#fold
Add additional logging around handles and transactions
Clean up a NullPointerException which was masking an
Add '!' to the characters for LITERAL in the colon prefix grammar
Add Query#list(int) in order to allow for a maximum resukt size from
eager query execution.
Add sql logging facility
Fix an NPE when dealing with metadata in Args.
Change statement customizer to have before and after callbacks
Change OracleReturning to use the after callback to extract results
Clean up the build so the stringtemplate stuff is useful
SQLStatement#bind(*, Character) which converts to a string
Provide a non-caching default statement builder
Allow setting the statement builder on a DBI explicitely
Allow re-use of a prepared batch by clearing the parts prior to execution
Change query iterated results to clean resources in the same manner as list,
just later
Move StringTemplate stuff back into unstable
Support for checkpointed transactions
Add convenience classes for one value result sets
StringTemplate 3.0 based statement locator and a classpath based loader
Improve grammar for named param parsing (| in LITERAL)
Spring (2.0) support classes
Add ability to define statement attributes at the DBI and Handle levels
Have prepared batch use the statement locator
Bean resultset mapper invokes the right ResultSet.getXXX() for each
property type (getObject() on Oracle returns internal Oracle types)
Allow positional binding for PreparedBatch
Renamed PreparedBatchPart.another() to next()
Change SQLStatement#first to return null on an empty result instead of an NPE
Allow setting attributes on statement contexts for batches and prepared batches
[bugfix] Pass statement context into result mapped queries
Create the StatementContext to allow for tunneling state into the various
client defined tweakables
allow numbers in named params
Fix up IDBI to have the DBI functional methods and not the config methods
Add double quote handling to named param magic
Added Oracle DML Returning features
Pluggable statement builders
More literal characters in the named statement parser
Improve grammar for named param parsing (_ @ and _ in LITERAL)
Switch to an ANTLR based grammar for named param parsing
JDBC4 Style "Ease of Development" and API Docs
Flesh out convenience APIS
Complete Rewrite
Fix bug in caching added in 1.4.4
Optimize statement literal or named statement detection
Allow for create/drop/alter statements
Cache whether or not a driver supports asking for prepared statement parameter types
Handle drivers (such as Oracle) which throw an exception when trying to retrieve
prepared statement parameter type information.
Be explicit about target jdk version (1.4) for this branch
Fixed bug where null is being set via setObject instead of setNull
Thank you, Simone Gianni!
Expose the new functionality on interfaces as well as concrete classes
Expose the handle decorator functionality on the IDBI interface
Add a script locator mechanism analogous to the statement locator
Save SQLException to provide more information to the DBIException on
statement execution
Issue with a matcher not being reset which only showed up under jdk 1.5. Thank you Patrick!
Wrap exceptions thrown from handle in Spring DataAccessExceptions for the
Spring adaptor. Thank you Thomas Risberg.
Support for "global" named parameters at the handle and DBI levels
Change Handle#script to batch the statements in the script
Bug fix in named parameter handling with quotes (would ignore some named params incorrectly)
Allow configuring transaction handlers in properties
Allow configuring of externalized sql locating (ie, non-classpath)
Add callback based transaction handling in order to cleanly support the various
transactional contexts (CMT, BMT, Spring, Local) etc.
Via the Spring DBIBean, IDBI#open(HandleCallback) now uses the transactionally bound handle
if there is one.
DBIException now extends RuntimeException. The 7 character change major release =)
Added DBIUtils.closeHandleIfNecessary(Handle, IDBI) to allow for transparently managing
transactions and connections in Spring whteher tx's are enabled or not.
Handle#query(String, RowCallback): void no longer starts a transaction
Support full-line comments in external sql and sql scripts. Full line comments
must begin with # or // or -- as the first character(s) on the line.
Added handle#first(..): Map convenience functions to query for individual rows
Removed DBITransactionFailedException and used plain old DBIException
in its place
Added unstable package for holding elements subject to API changes
during a major release cycle.
Handle decorator functionality added to unstable feature set
JavaBean mapped named parameter support
Renamed Handle#preparedBatch to Handle#prepareBatch
Queries return java.util.List instead of java.util.Collection
Much more sophisticated auto-configuration
Broke backwards compatibility on handle.query(String, Object) method behavior
(this is reason why 1.1.0 version increment)
(read the javadocs if you use this method)
Removed method Handle#query(String, Object, Object)
Could lea to confusion with changed behavior mentioned above
Batch and PreparedBatch Support
Removed an unused exception
Fixed bug in named parameter extractor (would miss named params not preceeded by whitespace)
Better auto-detection of statement type (named, raw sql, etc)
Spring integration tools
Provide an interface for the DBI class in order to play nicer with proxies
Prepared statement re-use was failing on Oracle, fixed.
Fleshed out the execute(..) methods to take full array of arguments, like
Added update(..): int which return number of rows affected
Lots of internal refactoring
Was swallowing an exception in one place for the (brief) 1.0.3 release.
Definately upgrade if using 1.0.3
Fixed a bug where quoted text could be interpreted as named tokens, bad me.
Added HandleCallback methods to DBI to manage handle db resources etc for
Removed test dependency on Jakarta commons-io, which had been used, previously,
for deleting the test database. Tests now depend only on derby and junit, still
with no runtime dependencies (other than the JDBC driver for your database).
Added facility for loading connection info from properties file
for convenience. Totally optional, thankfully.
Added overloaded argument signatures to callback-based queries
Initial Release