Greeting JRubyists.
I’m glad to announce that AR-JDBC 1.3.0.beta2 has been released
recently.
It’s a bit late due “technical difficulities” (a broken 4yr-old laptop
:))
… yet one can almost consider this as a release candidate, but since
there’s quite some refactoring done I decided to hit you with another
beta
before 1.3.0 rc/final (+ I might still get in some work e.g. prepared
statement support).
For JRuby users the 1.3.x releases are expected to support all
ActiveRecords versions from 2.3 all the way up till 4.0. We would love
to
hear how the beta is doing for you, please test it (should be production
ready) - even if you’re not running with Rails master - with Rails
3.x/2.3
and provide feedback if there are issues. Note that ActiveRecord (Rails)
4.0 should be out very soon.
Changes in this release that might be (more or less) noticeable :
- rake tasks where completely rewritten so we can share/override them
between all AR versions, there’s also some new goodness (long time
missing
db: tasks) for the adapters we support - automatic reconnection (e.g. if you restart the DB) as well as manual
reconnect! calls should now happen “correctly” and configure the
connection
to an initial state before executing any SQL - just like the native MRI
adapters do (esp. matters on MySQL/PostgreSQL) - connection.active? now actually verifies if the connection is valid -
means sending a “ping” statement (connection_alive_sql), for JDBC 4.0
compilant drivers having a connection_alive_sql is no longer necessary
since the API includes such functionality for the drivers to implement - boolean emulation using (tiny) integers can now be turned off for
MySQL/Oracle and DB2 - prepared_statement option is now picked up and used but it’s untested
so
far thus you might need to set it to false if you do have it enabled in
your configuration
Also for disabled functional changes there’s likely a system property to
switch back to previous behaviour, check the wiki:
For those (extensions) depending heavily on our Java API, it should be
pretty stable now except for the prepared statement support, which is
kind
of experimental and untested - hopefully it will make it to the final
release but no promises here.
Since the (1.3.0) final release is still ahead of us and is taking quite
some effort already, I’d like to ask those who care although can not
support AR-JDBC by giving their precious time continuously for
testing/fixing or adding missing/new features to consider buying (me) a
beer or 10 Bountysource to help me squeeze some more
(almost)
full-time into AR-JDBC.
Changelog for 1.3.0.beta2 (since the previous 1.3.0.beta1) :
- only load rake tasks if AR is being used - AR::Railtie is loaded
(#234) - override #structure_dump so it won’t silently return while doing
nothing - [h2] support empty insert statement (actually used by AR 4.0)
- [postgres] support 4.0 options for #indexes + dumping partial indexes
- [oracle] “better” rake tasks (kindly borrowed from the
enhanced-adapter) - [db2] some database tasks - with a tested (and fixed) structure_dump
- [db2] should set schema on configure_connection
- [mssql] Fix SQL server version matching on SQL Azure
- [mssql] collation and database_exists? helpers for SQLServer
- [h2] rake db: tasks support (db:structure: dump/load as well as
db:drop) - [hsqldb] structure:dump structure:load and fixed drop database support
- [hsqldb] handle config[:database] with db specific prefix
- [as400] error support for execure_and_auto_confirm
- [db2] remove unused explain method
- AR-4.0 inspired rake task impl (usable and shared with Rails 3.x/2.3
tasks) - jdbc connection updates to better follow AR semantics
- #active? should check whether connection is valid
- #reconnect! should #configure_connection if available
- use JDBC 4 isValid as alive check fallback (no need for
connection_alive_sql)
- [sqlite3] missing adapter.encoding method
- [as400] auto discover support (+ current_schema) for AS/400 with jndi
- use (module) spec.initiialize! convention to perform (lazy) AR
initialization - allow for (potential) adapter_spec overides by user on connection
method - [oracle] column/table name (+ raw) quoting - inspired by enhanced
adapter - [db2] support for
ArJdbc::DB2.emulate_booleans = false
- [oracle] support for
ArJdbc::Oracle.emulate_booleans = false
(#225) - [mysql] AR::ConnectionAdapters::MysqlAdapter.emulate_booleans support
- [mysql] #indexes compatible with 4.0 as well as #pk_and_sequence_for
- add config parameter to disable (JDBC) statement escaping and
disable statement escape processing by default for all (#243) - [as400] add db2_schema to table_exists? + add support for nil schema
- [mssql] SQLServer visitor compat with next AREL
- [mssql] quote_table_name_for_assignment for MS-SQL
- quote_table_name_for_assignment should only be added on AR >= 4.0
- disable extension auto-discovery for installed gems (unless specified)
- [as400] fix as400 system schema + re-add jndi schema support
- [db2] separate AS400 code into a module + stadalone connection method
- [postgres] quoting that uses column.type (thus works with defs as
well)
only use #sql_type when necessary - better compatibility with native MySQL/SQLite3 adapter (constants)
- [postgres] restore PostgreSQLColumn.new < 4.0 compatibility
- [h2] allow H2 to set auto increment default value
- [postgres] make sure intifnite date/time values are handled correctly
- [postgres] use quote_table_name_for_assignment from AR-4.0
- [sqlite3] fix remove_column on AR-4.0
- do not load the AR built-in adapters eagerly - but on demand (#353)
- [postgres] ignore encoding option, print a warning about it (#376)
- [h2] check if offset is set, otherwise use the Arel::Node::Offset#expr
- [as400] adding ordering support when using both limit and offset
- [as400] force decimal field with 0 scale to be integers
- [sqlite3] let the JDBC API to figure out indexes (#377)
- support for loading only the necessary Java parts per adapter (#353)
- AREL visitors base impl revisited (to fix long broken query cache),
make sure a visitor is instantiated by the JDBC adapter (2.3
compatible) - introduced ArJdbc.modules method that should return adapter modules
- move mysql gem API faking into (rails loadable) test code
- there should be no more need to fake out pg.rb (due native ‘pg’ gem)
- do not fake out SQLite3::Version … gets only loaded while running
tests now
For more details check the commits :
I’d also like to thank those that contributed code into this release,
namely :
Jason Franklin, Alexey Noskov, Brian Kulyk, Pierrick Rouxel, Mike Poltyn
and Steve Lorek
Have a great week,
with <3 The AR-JDBC Team