Rdbi-driver-rubyfb is a project mainly written in Ruby, based on the MIT license.
Firebird driver for RDBI
= rdbi-dbd-rubyfb
An RDBI driver for Firebird databases using the rubyfb bindings by George Georgiev.
== Project home
https://github.com/pilcrow/rdbi-driver-rubyfb
== Related software
== Tested configuration(s)
ruby 1.9.2, Firebird 2.1.3, RDBI 0.9.1 and rubyfb 0.5.5.
Should work under ruby 1.8.7, as well. Firebird >= 1.5 needed (for CASE support under the hood).
== Driver Quirks, Incompleteness and Brokenness
=== Result Sets By default, +rewindable_result+ is false and query result sets are "forward only" iterables, such that any attempt to look behind the current fetch index is an error.
If +rewindable_result+ is true, +rdbi-driver-rubyfb+ provides fully rewindable (and, indeed, random access) cursors which have the side effect of reading the entire result set into memory.
=== Transactions
"Manual commit" only There is no autocommit mode at present. This may change in a future release, but you should use explicit transactions anyway.
Transactional DDL requires commit Firebird supports transactional DDL like other industrial databases. However, DDL statements must be committed before their effects are visible to subsequent DML/query statements.
For example, this won't work:
dbh.transaction do dbh.execute('create table TBL (I integer not null)') dbh.execute('insert into TBL (I) values (?)', 1) # Error: "TBL" not yet
end
Instead do this:
dbh.transaction do dbh.execute('create table ...') ... other DML ... end dbh.transaction do dbh.execute('insert into ...') end
=== Types
Fixed-length CHAR fields are automatically right-trimmed. Firebird and Interbase databases pad CHAR columns with spaces. (In strict SQL trailing spaces are ignored on string comparisons, so 'foo ' = 'foo'.)
TIMESTAMPs are understood in the local time zone There is currently no way to override this.
BOOLEANs perhaps not supported Not all Firebird/Interbase databases offer a native BOOLEAN type, instead using CHAR(1) or SMALLINT flags, or user-defined SQL DOMAINs. Firebird 3.0 offers a BOOLEAN type.
=== RDBI Compliance
== Running tests
Tests make use of the RDBI::DBRC role 'rubyfb_test' to test against a local database. On a *NIX system, your ~/.dbrc might look like this:
rubyfb_test:
driver: Rubyfb
user: SYSDBA # $ISC_USER, if omitted
password: masterkey # $ISC_PASSWORD, if omitted
database: employee
== Copyright
Copyright (c) 2011 Michael Pomraning. See LICENSE for details.