nuodb/nuodb-drivers — pull request #16 by rbuck (2012-09-12 13:52:44+00:00)
Title: Bulk Change to Resolve Many Ruby Driver Issues

============
Availability

The source code is available on GitHub, along with instructions for how to build and install the Gems.
Gems are also provided by Support on a request basis.

============
Improvements

Resolved 20+ defects; of those some highlights include:

Native Driver Issues Resolved:

Added native driver .prepare alias for Connection.createPreparedStatement (compliance).
Added .close methods to native driver for statements and prepared statements (leaks).
Changed native driver Connection.close to Connection.disconnect to be DBI compliant (compliance).
Fixed Rakefile tasks that install or uninstall gem (productivity).

ActiveRecord Adapter Issues Resolved:

Added savepoint support to active record adapter (compliance).
Added quoting support for booleans to active record adapter (compliance).
Added support for statement caches to active record adapter (performance, leaks).
Prepared statements are cached per process per SQL; ordinary statements are cached per process.
Fixed ActiveRecord adapter to close statements when released (leaks).
Added support to active record adapter for explicitly controlling transaction commit and rollback (compliance).
Fixed connection management with respect to connect, disconnect, reconnect (compliance).
Fixed ActiveRecord adapter capabilities methods which incorrectly stated database features (compliance).
Fixed ActiveRecord adapter to reverse merge local host name if none is provided (compliance, parity).
Fixed Rakefile tasks that install or uninstall gem (productivity).
Clean code so that it uses Ruby language features rather than mimicking curly-brace language constructs.
Fixed README.rdoc to detail how to build and install the adapter.

Known Issues:

The ActiveRecord adapter hook identifying the primary key of a table is broken and refers to a method that does not exist; applications will crash if/when this gets called (ActiveRecord compliance).
The ActiveRecord adapter loads the entire result set into memory rather than on demand; Ruby processes may crash if result set exceeds permitted memory allocation.

============
Future Plans

- Expose result sets as an Enumerable to support key language features such as map-reduce (language parity with Ruby, feature parity with Postgres and MySQL).
- Expose result sets natively as Enumerable so that the entire result set is not loaded single shot but rather on demand (feature parity with Postgres and MySQL).
- Expose creation of Connection using basic Ruby pattern involving .new and .initialize, taking a Hash instead of an ordered set of parameters (language parity with Ruby).
- ActiveRecord compliance, finish implementing missing AR hooks (quality parity with Postgres and MySQL).
- ActiveRecord compliance, test AR adapter using AR test suites (quality parity with Postgres and MySQL).
- ActiveRecord compliance, fix broken implementation for method retrieving primary key of table (quality parity with Postgres and MySQL).
- Rename native methods so that they are Ruby and Ruby DBI compliant; use snake-case, and introduce ? and ! per language norms (language parity with Ruby, compliance parity with Postgres and MySQL).
- ActiveRecord compliance, run AR compliance test suite and resolve remaining issues.

Signed-off-by: Robert Buck