48 Commits

Author SHA1 Message Date
Jake Coffman
d50d00644c
oracledb: commit was a no-op causing race conditions (#3668)
The underlying issue was that query *always* committed, even during a transaction. The previous fix was to just disable commitAsync in a transaction but then that also disabled explicit commit calls. Instead, this fix disables query's commits during transactions so that explicit commits still work.
2020-02-16 20:26:13 +01:00
Ahmed Ashour
a613fe23df Fix some spelling mistakes (#3572) 2019-12-10 22:53:05 +01:00
maximelkin
f56eaf5cfc Bluebird remove map mapSeries (#3474) 2019-10-11 10:12:56 +02:00
Igor Savin
e971c5198b
Update dependencies, fix new eslint errors (#3339) 2019-07-10 20:47:56 +02:00
Igor Savin
4b6429ebf9
Reduce bluebird usage (#3267) 2019-06-08 02:34:41 +02:00
Mikael Lepistö
8a9a648ae2
Docker based test dbs (#3157)
* Fixed some of the tests failing with various dialect combinations

* Setup all test databases to run in docker

* Fixed test suite and updated travis to use docker

* Fixed some tests in master and disabled oracle tests while setting everything else to work again

* Changed docker to use latest postgresql alpine image

* Re-enabled all oracledb tests

* Install oracle client libs to oracle server and copy them to travis to make node oracledb package to work

* Disabled random failing oracle tests and added test to show that oracle update in transaction does not seem to work ACID

* Update package.json

* Update package.json

* Fixed linting issues

* Fixed waiting for postgres to use the same DB image that database is using.

* Removed installing oracledb driver in travis if not needed .travis.yml

* Cleaned up package.json more

* Created static name for oracledb container to allow copying files out of it on different docker versions

* Removed webpack from deps
2019-05-13 12:21:36 +03:00
Igor Savin
b269e45842
Update dependencies (#3085)
* Update dependencies

* Fix linting errors
2019-03-04 01:40:35 +01:00
Henry Williams
2611e5a300 Fix linter errors in tests (#2859)
* fix lint errors for tests
2018-10-15 22:29:53 -04:00
Tim Griesser
232fe9f151
Add Prettier (#2697)
* Add prettier
* Run files through prettier
2018-07-09 08:10:34 -04:00
Mikael Lepistö
cb3a85e738
Normalized and validated driverNames of test db clients and fixed oracle test setup (#2692)
* Normalized and validated driverNames of test db clients and fixed oracle test setup

* Fixed failed queries from old query building tests which hadn't been ran in ages

* Allow selecting node version which is used to run oracledb docker tests

* Improved sql tester error messages

* Fixed rest of the oracledb tests

* Removed invalid flag from docker-compose

* Print mssql logs if initialization fails

* Fixed syntax error + final tests

* Added restart of failure for mssql DB initialization to try again if server was not ready

* Printout always mssql logs after container is started

* Fixed wait time printing after trying to connect

* Use npm run oracledb:test for testing oracle in travis
2018-07-08 14:10:51 +03:00
Mikael Lepistö
b349ac4a8c
Various fixes to mssql dialect (#2653)
* Fixed float type of mssql to be float

* Many tests where postgres test was not actually ran at all

* Migrations to be mssql compatible

Mssql driver doesn't handle if multiple queries are sent to same transaction concurrently.

* Prevented mssql failing when invalid schema builder was executed by accident

Instead of trying to generate sql from broken schema calls, just make exception to leak before query compiling is started

* Fixed mssql trx rollback to always throw an error

Also modified some connection test query to be mssql compatible

* Fixed various bugs from MSSQL driver to make tests run

* Fixed mssql unique index to be compatible with other dialect implementations

* Enable running mssql tests on CI

* Test for #2588

* Updated tests to not be dependend on tables left from previous test rans

* Trying to make mssql server work on travis
2018-06-29 10:47:06 +03:00
Adam Cofer
5f81e8aeb9 Add redshift support without changing cli or package.json (#2233)
* Add a Redshift dialect that inherits from Postgres.

* Turn .index() and .dropIndex() into no-ops with warnings in the Redshift dialect.

* Update the Redshift dialect to be compatible with master.

* Update package.json

* Disable liftoff cli

* Remove the CLI

* Add lib to the repo

* Allow the escaping of named bindings.

* Update dist

* Update the Redshift dialect’s instantiation of the query and column compilers.

* Update the distribution

* Fix a merge conflict

* Take lib back out

* Trying to bring back in line with tgreisser/knex

* Add npm 5 package-lock

* Bring cli.js back in line

* Bring cli.js back in line

* Progress commit on redshift integration tests

* Revert "Progress commit on redshift integration tests"

This reverts commit 207e31635c638853dec54ce0580d34559ba5a54c.

* Progress commit

* Working not null on primary columns in createTable

* Working redshift unit tests

* Working unit and integration tests, still need to fix migration tests

* Brought datatypes more in line with what redshift actually supports

* Added query compiler unit tests

* Add a hacky returning clause for redshift ugh

* Working migration integration tests

* Working insert integration tests

* Allow multiple insert returning values

* Working select integration tests

* Working join integration tests

* Working aggregate integration tests

* All integration suite tests working

* Put docker index for reconnect tests back

* Redshift does not support insert...returning, there does not seem to be a way around that, therefore accept it and test accordingly

* Leave redshift integration tests in place, but do not run them by default

* Fix mysql order by test

* Fix more tests

* Change test db name to knex_test for consistency

* Address PR comments
2018-02-03 15:33:02 +02:00
irsl
a47a077330 Field identifiers were not quoted properly in Sqlite3 dialect (#2087)
* field wrapping changed from quotes to backticks in sqlite3 dialect; unit tests adjusted accordingly

* addColumn was accidently removed
2017-05-28 23:48:18 +03:00
wubzz
138e13b8b1 Bugfixes on batchInsert and transactions for mysql/maria (#1992) 2017-03-26 18:43:17 +03:00
wubzz
876f615f61 Increase test timeout 2017-03-24 16:14:25 +01:00
wubzz
50557f7571 Ensure errors in batchInsert do not end up 'unhandled'. Fixes #1880 (#1984) 2017-03-22 21:44:36 +01:00
Owen Evans
825396ada7 use uuid not node-uuid (#1792) 2016-11-22 10:58:21 +02:00
Mikael Lepistö
69e33c7f64 Pass valueForUndefined also to transacting client. Fixes #1423 2016-05-19 18:53:29 +03:00
Alex Whitman
202ddddddb Use calling transaction with batchInsert 2016-05-19 11:07:29 +01:00
Mikael Lepistö
c935b583cb Insert tests were ran before DB was initialized (schema / migrate / seed). 2016-05-12 10:43:33 +03:00
Mikael Lepistö
9fab58c2b2 Evaluated multi insert default for undefined already in query compiler 2016-05-12 10:24:42 +03:00
wubzz
59d9ff89cd Remove mysql from assertions 2016-05-11 17:49:18 +02:00
wubzz
6bd4b8ac32 Only assert returning values on supported dialects. 2016-05-11 17:31:33 +02:00
wubzz
2f44a48fa8 BatchInsert remake proposal. Fixes #1391 2016-05-09 19:01:00 +02:00
Mikael Lepistö
ce6ada96e3 batchInsert batchSize parameter validation 2016-02-11 11:49:55 +02:00
wubzz
7484892e6c Slight change to test (trigger build) 2016-02-04 18:17:32 +01:00
wubzz
deb8266393 Update test and add Docs 2016-02-04 17:26:16 +01:00
wubzz
efe022bfe1 Lower values in Test, prevent hanging for too long 2016-02-02 21:33:11 +01:00
wubzz
8fc6962ab1 Add a knex.batchInsert as discussed in #757 2016-02-02 21:19:36 +01:00
Sky Morey
afd6b66624 Final build of mssql provider, all tests pass 2015-12-09 17:53:53 -06:00
Tim Griesser
f9aab9dc76 Major internal refactor
Beefed up transaction implementation, still needs tests
and cleanup of nested transaction queues.

Left todo:
- Fix commented out tests
- Fix oracle driver's transactions
2015-04-22 10:34:14 -04:00
Ben Drucker
7cdda834ef Remove FoundationDB
Reverts c199761c597c93136a6d38bc4ecf26a693560322 and #641

Foundation was acquired and shut down immediately
2015-03-24 17:48:14 -07:00
Nathan Williams
2d6d2f28f7 Adapter for FoundationDB SQL Layer 2015-02-04 14:56:41 -05:00
Vincent Schoettke
72cf342273 Fixes #319. Inserting multiple rows with default values 2014-09-08 16:10:43 +02:00
Vincent Schoettke
ef173db790 Changed jshint option unused to true and fixed warnings 2014-09-02 22:56:51 +02:00
Vincent Schoettke
f3874ac651 Fixed several jshint warnings. Added strict mode 2014-09-01 17:19:34 +02:00
Vincent Schoettke
f545c86081 oracle - fixed first and added more tests 2014-08-22 01:13:15 +02:00
Vincent Schoettke
2eaedd0afa oracle - fix returning for non-integer types 2014-08-20 09:34:32 +02:00
Vincent Schoettke
0ba6b49495 oracle - added support for multiple returning values 2014-08-13 21:53:42 +02:00
Vincent Schoettke
9ef99b5f92 Added oracle support 2014-08-13 21:53:42 +02:00
Tim Griesser
db2f9e7f08 merge with master 2014-04-16 02:50:19 -04:00
Tim Griesser
aa47c24568 additional tests & data for #219 2014-03-26 19:15:46 -04:00
Tim Griesser
4c589cc960 working on refactoring the internals 2014-02-14 12:46:13 -05:00
Tim Griesser
10e3d398f4 Fix #132, allow multiple returning formats in postgres 2013-12-10 13:33:49 -05:00
Tim Griesser
44854ec984 updating test output for bigint & bigserial changes 2013-11-25 12:26:28 -05:00
Tim Griesser
1a47485d33 integration tests are workinggit st 2013-09-12 13:30:47 -04:00
Tim Griesser
634f4751a1 mysql and pg are mostly working, now onto sqlite3 2013-09-11 23:36:55 -04:00
Tim Griesser
01c4a83d35 lots of library restructure / unit test work 2013-09-08 15:57:32 -04:00