Skip to content

Releases: jruby/activerecord-jdbc-adapter

1.3.2 (10/11/13)

11 Oct 21:11
Compare
Choose a tag to compare
  • when "pop-ing" current savepoint name - consider open transaction count (#477)
  • [postgres] we should return "raw" hstore values on AR < 4.0 by default
    (regression caused by fixing #454 for AR >= 4.0)
  • [postgres] needs ColumnDefinition.array? method used by SchemaCreation (#474)
  • [mysql] backported bulk change table support from Rails (fixes #469)
  • support MySQL's failover host configurations (multiple hosts specified)
  • set JDBC specific config values as properties instead of URL options
  • SQLite3's version object should return a string on to_s
  • [sqlite3] support :timeout option as busy_timeout (similar to Rails)
  • [sqlite3] mkdir for sqlite database (path) - just like AR 4.0 now does
  • [postgres] handle :connect_timeout, :sslmode, :keepalives & :krbsrvname
  • [postgres] support :hostaddr, :user and :dbname options just like Rails does
  • fix rake task name db:structure:load - missing db: prefix (#465)
  • Prevent rake from throwing an exception when task w/o comment is redefined

Code Contributors (in no particular order): @prathamesh-sonpatki, @swrobel,
@zeade, @ragaskar

1.3.1 (09/17/13)

17 Sep 10:31
Compare
Choose a tag to compare
  • helper gems should contain all files from lib/* (#463)
  • [postgres] hstore values should be returned as Hash instances (#454)
  • we should first allow super AbstractAdapter to initialize then extend spec
    otherwise using adapter: jdbc configuration might no work (#457)
  • return early (from table_exists?) if table name is nil (#460)
  • [MS-SQL] handle change_column error when column has default binding or indexes
  • AR's distinct compatible with 4.x (and 3.x) for Oracle, Derby and Postgres
  • re-invent add_column_options! (due next AR 4.1) to provide compatibility
  • backport SchemaCreation (from AR 4.0/master) + support for all adapters

Code Contributors (in no particular order): @nertzy, @avinmathew, @emassip

1.3.0 (08/29/13)

29 Aug 14:04
Compare
Choose a tag to compare
  • [oracle] fix structure_dump: column['data_default'] might come back as ''
  • [oracle] avoid the JDBC call connection.getMetaData with exec_query (#453)
  • review MSSQL/HSQLDB/H2 explain - make sure prepared statements are used
  • [oracle] make sure explain works with prepared statements
  • warn users about using our now deprecated suble_binds "extension"
  • [mysql] username defaults to 'root' on MRI
  • [mysql] match columns returned with latest AR 4.0 (collation, strict, extra)
  • only suble_binds if not an arel passed + allow to turn bind subling off
  • [postgres] fix extension_enabled? to work with raw boolean values
  • [derby] setting true/false into text/string columns values should use to_s
    also non-serializable attrs should use to_s (instead of to_yaml) on 3.x
  • [derby] needs quote_table_name_for_assignment (on AR 4.0)
  • [postgres] driver "hooks" to make PG types work with prepared statements, now
    working: ranges, arrays, interval, (ip) addr types, tsvector, json and uuid
  • missing last_insert_id_result method on PostgreSQL (#450)
  • emulate pre AR 4.0 behavior with date-times/booleans (in custom SELECTs) they
    will be returned as (raw) strings on AR 3.x
  • warn when driver is not JDBC 4.0 compilant when checking if valid (#445)
  • fix inline rescue syntax - invalid syntax at MSSQL's string_to_time (#444)
  • no need to (double) update LOB values when using prepared statements
  • replaced emulate_booleans with emulate_booleans? on adapter specs
  • [firebird] emulate booleans with char(1) + fix time and review native types
  • [db2] using new update_lob_values - now handles null inserts safely (#430)
  • [mssql] configurable update_lob_values? - string_to_binary no longer abused
  • refactored SerializedAttributesHelper and moved to Util::SerializedAttributes
    there's now a new update_lob_columns helper hooked onto AR::Base for adapters
    that send clob/blob values in a separate statement DB2, Oracle, MSSQL, Firebird

Code Contributors (in no particular order): @agios

1.3.0.rc1 (08/03/13)

05 Aug 06:44
Compare
Choose a tag to compare
1.3.0.rc1 (08/03/13) Pre-release
Pre-release
  • add activerecord gem as a dependency of the main AR-JDBC gem
  • override to_sql due AR 4.0 - we want to consume the passed binds array
  • [sqlite3] introduce Version constant (returned from sqlite_version)
  • execute expects skip_logging param on AR <= 3.0 (+ does not accept binds)
  • we shall not do any to_sql in any of the exec_xxx methods
  • [postgres] array column defaults more reliable (ported from Rails)
  • [mssql] review MSSQL date-time handling - no need for that customized quoting
  • [mssql] MSSQL - rake db:migrate:reset can drop database
  • [oracle] handle null strings (e.g. returned on XML columns) instead of NPE
  • [oracle] get rid of oracle's execute_id_insert not sure how it ever worked
  • [oracle] sequence quoting + insert refactoring + support for RETURNING
    revisit insert / insert_sql / exec_insert to work for all ARs we support
  • [db2] refactor DB2's last_insert_id using IDENTITY_VAL_LOCAL()
  • [db2] DB2 supports standalone VALUES statements (just like Derby does)
  • [derby] last_insert_id for Derby using IDENTITY_VAL_LOCAL()
  • [derby] only hookup SQL checks on #execute when no #exec_query etc. available
  • [sqlite] query-ing last_insert_id after each INSERT seems redundant
  • [sqlite] a saner way of getting last_insert_row_id() via the JDBC API
  • better last_inserted_id unwrapping on the base (jdbc) adapter level
  • [postgres] support exec_insert with PS + make sure RETURNING works
  • (thread_safe based) quoted column/table name cache implementation
    currently used with PostgreSQL, Oracle and MS-SQL adapter (#432)
  • [mssql] prevent special column corruption of ORDER BY (#431)
  • [db2] fix error with timezone + use default date and time parsing
  • [db2] fix error on named index removing
  • [postgres] fix array values escaping: backslashes should be escaped too
  • [postgres] fix add_column / change_column with arrays
  • [mssql] support for running with official MSSQL driver adapter: sqlserver
  • [mssql] visitor update (based on built-in) to better resolve ORDER BY
  • [mssql] handle SELECT DISTINCT correctly with LIMIT (#154)
  • add_limit_offset! / add_lock! only to be available before AREL (2.3)
  • remove Arel::SqlCompiler extensions - was only available with AR 3.0.0 pre
  • refactored AREL support - esp. visitor resolution - simpler & more reliable
  • [postgres] handle DISTINCT correctly with backwards-compat (#418)
  • [firebird] full featured support - first class firebird_connection method
  • [jdbc-] jdbc-firebird - packaged JayBird JDBC driver (gem) for FireBird 2.2.3
  • [postgres] fix array quoting
  • implemented support for returning Ruby Date/Time objects from JDBC
    allows such Ruby objects to be returned in custom SELECTs as well (#349)
  • introduce a (better) update_lob_value as a write_large_object replacement
  • beyond second precision with timestamp values for adapters that support 'em
  • rename MissingFunctionalityHelper -> TableCopier
  • finishing prepared statement support for all (Java API now stable), handles
    exec_query, exec_update, exec_delete and exec_insert
  • use init connection to check if connection_alive_sql needed (old driver)
  • JDBC API based savepoint support (that should work for all adapters)
  • remove connection.config= and make sure it does not change config
  • avoid executing mysql/sqlite3 JDBC type resolving code (for some speed up)
  • simplify native_database_types - now on adapter + overriden avoids jdbc
  • [mysql] support canceling a timer for wrapped (JNDI) connections as well
  • [mysql] refactor cancel timer (field access) to work correctly (#413)
  • Java API: introduce newConnection + refactor @connection_factory to Java
  • [postgres] missing point casting code + string to bit casts (#60)
  • [derby] tables should only return those from current schema
  • [derby] set current schema thus identifiers get resolved (closes #408)
  • [derby] no connection_alive_sql needed since Derby 10.8
  • [postgres] make sure uuid is correctly used/resolved as PK (AR 4.0)
  • [postgres] match pk_and_sequence_for with AR 4.0

Code Contributors (in no particular order): @alno, @pierrickrouxel,
@matiasbattocchia, @gapthemind, @soemo

1.3.0.beta2 (05/30/13)

02 Aug 10:47
Compare
Choose a tag to compare
Pre-release
  • 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

Code Contributors (in no particular order): Jason Franklin, @alno, @bkulyk, @pierrickrouxel, @Holek and @slorek

1.3.0.beta1 (04/11/13)

02 Aug 10:40
Compare
Choose a tag to compare
Pre-release
  • [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