Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add Oracle support #419
Added Oracle support. Tested with Oracle 11g. It requires the oracle npm module, but I refrained to add it to the package.json to avoid problems for other developers.
There is also a new enviroment variable "KNEX_TEST_INTEGRATION_DIALECTS" to limit the integration tests to specified dialects. e.g.:
I had to work around the limitation of missing auto_increment by automatically generating a per table sequence and trigger to add the auto incremented value for insert statements if somebody used
A word of caution. Node-oracle module together with the Oracle 11g I tested does not seem to like how the cleanup of the default pool is done. It may lead to false test errors sometimes (e.g.ORA-01007: variable not in select list). Implementing my own pool and waiting for some time after the db connection is closed fixed the problem for me, but it is not part of this pull request.
I had no problems with normal usage and the default pool, so maybe this problem is only test related. Do you make sure that all connections are always closed/pool is drained when testing? On the node-oracle page it's especially mentioned that not closing all connections may lead to false errors.
added a commit
this pull request
Aug 14, 2014
Oracle support for Travis was discussed and rejected (travis-ci/travis-ci#689) because of:
Would anyone using Oracle be willing to set up a Digital Ocean box (or any other server for that matter)? Would require some extra test code vs a fresh local DB in CI and run slower, but it'd be nice to have parity.