[ANN] AR-JDBC 1.3.0.beta1 released

Greeting JRubyists.

I’m very happy to announce that AR-JDBC 1.3.0.beta1 has been released.

This is the first beta of our updates (that are taking place on
master) since the 1.2.x line.

For users this shall be a drop-in replacement, should perform better
and be more compilant with ActiveRecord 3.x, we still support 2.3 as
well but no previous version.
If you’re running with AR-JDBC 1.2.9 please consider updating and
testing this release for us, there’s some more (long needed)
refactorings planned before a stable 1.3 release and we’d like it to
be rock solid.

Extension authors and those depending on our Java API should start
preparing for 1.3 - there’s a lot getting deprecated, we strive for
binary compatibility but there might be a place or two where we really
needed to change a (mostly internal) method signature.

Besides this is the first release that aims for AR 4.0 compatibility
as well. If you’re using Rails master now’s the time to start testing
and reporting bugs, missing features. Please note that you need a
recent Rails master snapshot, 4.0.0.beta1 release is not usable for
JRuby. Also rake tasks are awaiting for an update thus do not yet work
with AR 4.0 … stay tunned with master for now.

Changelog for 1.3.0.beta1 :

  • [db2] map datetime / timestamp / time types + correct time handling
    on AS400 - AREL values passed to #to_sql not handled correctly on
    AR-3.0 (#365) - (Ruby) API cleanup - removed ArJdbc::Jdbc::Mutex and
    CompatibilityMethods - new base implementations for all exec_xxx
    methods (introduced in AR 3.1) - returning AR::Result from #exec_query
  • #exec_query_raw for old behavior - [mssql] #table_exists? does not
    filter views (only #tables does) - [postgres] introduced new types on
    AR 4.0 - same ones native adapter supports (uuid values, arrays, json,
    hstore, ltree, PG ranges, interval, cidr etc.) - Java API - now
    compiled with Java 1.6 since we’re using JDBC 4 API anyways - generic
    #exec_query returning AR::Result + #exec_raw_query for compatibility -
    [postgres] improve #insert_sql (uses primary_key, supports all AR
    versions) - [postgres] support config[:insert_returning] - [postgres]
    always return correct primary key (failing if no sequence) - Java API
  • xxxToRuby refactorings - to allow for more flexible overrides -
    [postgres] support BIT(n) type where n > 1 as “bit strings” -
    [postgres] #disable_referential_integrity on USER level (AR 4.0
    compatible) - Java API - allow objectToRuby and arrayToRuby overrides
  • allow more-intuitive initialize arguments when sub-classing
    JdbcColumn - do not translate native (Java) exceptions into
    StatementInvalid (from #log) - Java API - replaced #tableLookupBlock
    with (a new) #matchTables - [mssql] better message for jTDS driver bug
    (support disabling explain) - Java API:- accept (and use) catalog as
    arg[1] in #columns which does leads to a refactoring of
    #extractTableName to accept a catalog name - [mssql] current_user and
    (change-able) default_schema support (#311) - [sqlite3] correct empty
    insert statement value (on AR-4.0) - Java API - do not wrap runtime
    exceptions when handling throwables - [mysql] correct empty insert
    statement value (was not working on 4.0) - Java API - handle :xml and
    :array AR column type to JDBC type conversion - Java API - SQL Array
    and Object JDBC type (to Ruby) mappings - Java API - reviewed (and
    updated) JDBC type handling for adapters : * FLOAT/DOUBLE types should
    be handled (just like REAL) as Double-s * NUMERIC/DECIMAL values
    should be handled as BigDecimal-s * BIT/BOOLEAN should be converted to
    (Ruby) true/false by default * NULL should always be returned as nil *
    close binary/character stream & free SQLXML once converted * JDBC 4.0
    N(CHAR) types should be handled - JdbcConnectionFactory.newConnection
    now throws SQLException - this is backwards incompatible but most
    extension do not need to deal with this interface (#347) - (AR 4.0
    compatible) transaction isolation support - Java API - deprecate
    SQLBlock class in favor of a parameterized Callable iface - Java API -
    #retry makes no sense during #rollback (should use the same
    connection) - [postgres] session variables support (from
    configuration) - [mysql] session variables support (from
    configuration) - [mysql] :strict config option, for STRICT_ALL_TABLES
    on AR-4.0 - AR 4.0 (master) compatible #rename_table_indexes and
    #renamed_column_indexes - [postgres] no need to clear_query_cache
    after insert on AR-2.3’s #insert_sql - Java API - connection
    #execute_delete “alias” for #execute_update - [derby] XMLPARSE when
    inserting into an XML column type … but still can not retrieve XML
    values using SELECT * FROM - [sqlite3] IndexDefinition#unique should
    be a true/false - [mssql] execute_procedure support, AR-SQLServer
    style (#266) - [mssql] #charset, #current_database - [mssql]
    config[:database] support + switching using #use_database (#311) -
    [mssql] explain support - [mssql] better query type detection -make
    sure WITHs work as SELECts - [mssql] make sure there’s a column class
    (#269) + better special column magic - [mssql] better - working
    date/time quoting (with some ms precision support) - Java API -
    re-arrange JDBC (to-ruby) type conversion methods - [mssql] fix
    Model.first on SQL Server 2000 when called with only order - [oracle]
    XMLTYPE column support - can’t test due bug in driver - [db2] working
    XML column type support - [oracle] (MATRIALIZED) VIEWS/SYNONYMS should
    be usable on table_exists?- a better (default) table_exists? (aligned
    with columns_internal) for all - Java API - add #mapTables for OOP-ish
    mapping of results from #getTables - [db2] [derby] some (working)
    connection alive sql (db gurus should help) - [oracle] (a working)
    connection alive sql - [db2] seems like DB2 on ZOS used a non-existing
    get_primary_key method - do not call_discovered_column_callbacks for
    extending column impls - [hsqldb] a ‘valid’ connection alive SQL for
    HSQLDB - ActiveRecord::AbstractAdapter#exec_insert has 5 args in AR
    4.0 (master) - no need for a ArJdbc::Version module simply use
    ArJdbc::VERSION - support auto-loading of adapter gems e.g. when
    specified in a Gemfile - load out raltie from arjdbc instead of
    activerecord-jdbc-adapter thus it will work consistently even if only
    a specific adapter gem is specified in Gemfile - make sure we require
    arjdbc instead of just arjdbc/jdbc from adapters

For more details check
https://github.com/jruby/activerecord-jdbc-adapter/compare/v1.2.6...v1.3.0.beta1
(some of these had been backported to later 1.2 releases)

p.s. I’d like to thank all who contributed to the release by
submitting code or issues and especially Joe from
https://www.tanga.com/ for providing some financial support lately (to
get the Postgres adapter up-to-date with 4.0).

AR-JDBC is currently not backed by any company and it still needs some
non-trivial under cover changes thus we’d like to ask all that care
about JRuby on Rails to step up and help us strive forward - feel free
to contact me if you need any assistance.

Have a great weekend,
with <3 The AR-JDBC Team

I’m sorry the changelog got reformated while sending the message from
a phone …
You can find it more readable, esp. since it’s pretty long, on the
usual place:
https://github.com/jruby/activerecord-jdbc-adapter/blob/v1.3.0.beta1/History.txt