91 Commits

Author SHA1 Message Date
Igor Savin
c14252d907
Refactor more tests to use cli-testlab (#3640) 2020-01-28 02:28:40 +01:00
yeonhoyoon
4a2fa3b6c9 Print help only when there are no arguments (#3617) 2020-01-14 20:58:28 +01:00
Kabir Baidhya
2800e72d2f Add tests for some of the string utility functions (#3568) 2020-01-04 22:59:41 +01:00
Lorefnon
b0c0db601a Fix some issues around seed and migration generation (#3479) 2019-10-13 13:19:53 +02:00
Igor Savin
516b074790
Enable linting in CI (#3450) 2019-10-06 20:20:46 +02:00
Igor Savin
871dadb348
More consistent handling of nested transactions (#3393) 2019-08-16 16:28:25 +02:00
Igor Savin
e971c5198b
Update dependencies, fix new eslint errors (#3339) 2019-07-10 20:47:56 +02:00
Ihor Sakaylyuk
0a85331525 CLI: Fix empty --version output (#3312) 2019-06-30 18:23:50 +02:00
Igor Savin
5eaac66ea5
Merge 0.17 into master (#3277) 2019-06-11 02:05:31 +02:00
Igor Savin
4b6429ebf9
Reduce bluebird usage (#3267) 2019-06-08 02:34:41 +02:00
Igor Savin
f34013be5f
Use cli-testlab for testing CLI (#3191)
* Bump version to 0.16.4

* Use cli-testlab for testing CLI
2019-05-13 13:39:02 +02:00
Igor Savin
26868f864c Fix event listener duplication (#2982)
* Fix event listener duplication. Start executing more tests in CI; fix broken test.

* Fix listener

* Fix listener

* Fix Node 6 support

* There doesn't seem to be a clear way to fix listener behaviour in Node 6, so let's just ignore it for the time being, especially considering that we are dropping support for Node 6 in April anyway.

* Update migration guide
2019-01-31 07:23:05 +02:00
Katharina Irrgang
c746deaf12 Added support for renameColumn and double slashes (#2833)
refs #2763
2018-10-02 23:02:37 -04:00
Igor Savin
a01c35941a Refactor migrator (#2695)
* Refactor migrator

* Fix exports

* Fix ESLint

* Fix migrator

* Fix reference to config

* Split some more

* Fix table builder

* Fix argument order

* Merge branch 'master' of https://github.com/tgriesser/knex into feature/2690-support-multiple-migration-dirs

# Conflicts:
#	src/migrate/index.js
#	test/index.js
#	test/unit/migrate/migrator.js
2018-07-17 10:41:44 +03:00
Tim Griesser
232fe9f151
Add Prettier (#2697)
* Add prettier
* Run files through prettier
2018-07-09 08:10:34 -04:00
Mikael Lepistö
e2f617b968
Drop mariadb support (#2681)
* Dropped support for mariasql

* ESLint
2018-07-01 23:06:26 +03:00
Mikael Lepistö
d4a85db410
Removed old docker tests, new stress test setup tests are testing the same stuff (#2474)
Currently stress tests are run locally manually, but CI could be set up to run them for a few minutes and record request counts and memory usage during tests.
2018-02-16 13:13:04 +02: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
wubzz
95e5cf8e1c
Support multiple searchPaths while preserving case-sensitive feature … (#2340)
* Support multiple searchPaths while preserving case-sensitive feature (by using Array syntax). Fixes #2335

* ESLint

* Added changelog text
2017-11-18 17:09:05 +01:00
doomsower
1c61ad898f Allows to filter seeds and migrations by extensions (#2168)
* Added `loadExtensions` parameter to filter which migrations and seeds will be executed

* `loadExtensions` now includes all supported extensions by default
Also added unit tests for modified code
2017-07-24 14:19:17 +03:00
smulesoft
31ba04a788 fixes #1833 on postgres (#2017)
* fixes #1833 on postgres

* adds @elhigu requested changes

* adds test when database is down

* adds script for docker support

* removes old comment

* fixes syntax

* fixes more syntax errors

* fixes final syntax errors

* Docker testing enabled only on linux for now
2017-06-01 22:41:35 +03:00
Alexandre Tiertant
dd3289be94 Add fetchAsString optional parameter to oracledb dialect (#1998)
* Add optional parameter fetchAsString to oracledb

* Add some checks to oracle fetchAsString

* use const instead of let

* add fetchAsString test

* change const to var in tests

* move oracle driver specific test to bottom

* fix fetchAsSting multiple instance

* Fix tests

* replace const to var in test

* Rework Oracle fetchAsString tests

* remove const

* remove done and timeout
2017-04-28 13:47:24 +03:00
Mikael Lepistö
49aa6f7314 Check that oracle DB testing is enabled before running ext auth tests. Fixes #1865 (#1867) 2017-01-16 11:05:35 +02:00
Kasun Talwatta
da5ed96825 Adding external authentication capability when using oracledb driver (#1716)
* Adding external authentication capability as mentioned in https://github.com/oracle/node-oracledb/blob/master/doc/api.md#extauth

* Add unit test for externalAuth

* Cover the connection string part

* Update documentation

* fix spaces

* Hide the fake Oracle server error

* minor grammar changes and spaces changes
2016-11-30 09:44:43 +02:00
Tim Griesser
ee217ce2a1 Fix PG string escaping behavior (#1661)
* Modify test suite to test #1602
We shouldn’t be testing the “default” client class. Replace any
usages with postgresql

* Simplify knex.raw, deprecate global Knex.raw usage

* Remove unused bluebird shim

* Remove old / unused test comments

* Don't capture Pool2 error event

* Fix pg string escaping & parameterization #1602, #1548
2016-09-12 18:01:47 -04:00
Tim Griesser
6fa485302b Bluebird cleanup (#1618)
* Reference Bluebird directly, Remove deprecated .exec method
* Remove outdated bench scripts
* Remove old .jshintrc file
2016-08-09 17:23:07 -04:00
Alexandre Tiertant
53d089bffb add node-oracledb support (#990)
* add node-oracledb support

* move file in src directory

* remove unused var

* correct pool release
correct date error

* correct bugs

* add some test

* correct a test error

* correct time zone error in schema tests

* correct time zone error in schema tests

* use inheritance to remove duplicated code

* use inherit in formatter to remove dupplicated code

* remove unused code

* remove unused require

* add blob insert support

* add queryCompiler to dialect prototype

* export queryCompiler

* fix bugs

* Correct tests

* handle returning

* clean code

* clean code

* Fix returning

* Multiple insert with blob

* Add SELECT BLOB support

* Finalise update

* Fix test error

* Fix insert error without returning

* Add transaction and code cleaning

* build

* Fix pool ping error

* Add missing rejecter

* build

* Fix error in delete

* Fix transaction rollback error throwing

* Fix typo in commit

* Fix rollback rejecter

* Remove BLOB tests

* remove lib file

* fixed oracledb linter errors

* Add .completed to transaction acquireConnection()
2016-06-20 18:03:52 +03:00
Mikael Lepistö
cd28114067 Made test timeout to be configurable by setting KNEX_TEST_TIMEOUT environment variable. 2016-06-14 19:02:43 +03:00
Rhys van der Waerden
3846b7182c Make codebase conform to ESLint rules
Just a couple of changes.
2016-05-17 01:01:34 +10:00
Jurko Gospodnetić
16a076c1a0 trim trailing spaces
Only left alone ones in `test/tape/transactions.js` which would just
cause unnecessary conflicts and get cleaned up by separate pull
request #1257 anyway.
2016-03-08 08:44:01 +01:00
Sky Morey
afd6b66624 Final build of mssql provider, all tests pass 2015-12-09 17:53:53 -06:00
Sky Morey
7c1120e0e2 in progress 2015-12-08 11:37:31 -06:00
Tim Griesser
29cc223bb9 Test whether mocha 2.x is causing Travis to fail 2015-04-30 20:41:16 -04:00
Tim Griesser
3dfe1e6c94 Final cleanup for 0.8 2015-04-30 18:11:41 -04:00
Tim Griesser
7b17cc404a Oracle test suite up to date 2015-04-27 20:22:05 -04:00
Tim Griesser
f735dcb9c8 Raw identifiers and named parameters
Adds ?? for interpolating identifiers in raw
statements. Also adds raw(sql, obj) for
named :key syntax. Alternatively, 🔑
(trailing colon) may be used to specify an
identifier as a parameter.
2015-04-27 15:58:48 -04:00
Tim Griesser
3e47fafbe8 Cleaning up build process, WebSQL dialect 2015-04-24 12:19:33 -04:00
Tim Griesser
0c0864761c Test and fix for #749 2015-04-24 10:31:23 -04:00
Tim Griesser
36ced91ed5 Testing transactions, beginning to use tape, adding query to error message 2015-04-24 10:10:34 -04:00
Tim Griesser
c8232d11d3 Merge with master, cleanup on mysql2/maria 2015-04-22 16:19:59 -04:00
Tim Griesser
26726c728b Fixing test config 2015-04-22 12:11:23 -04: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
Tim Griesser
eee4e9c005 Fixing the overall class dependency approach, lots of internal cleanup, WIP 2015-04-19 16:31:52 -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
Elliot Foster
e749fef801 Excercise mysql2 via the test suite 2014-12-02 16:24:34 -08:00
Vincent Schoettke
f3874ac651 Fixed several jshint warnings. Added strict mode 2014-09-01 17:19:34 +02:00
Vincent Schoettke
02eb8cbe5e More thorough test of query builder 2014-08-26 23:05:39 +02:00
Vincent Schoettke
9ef99b5f92 Added oracle support 2014-08-13 21:53:42 +02:00
Tim Griesser
e550b2d394 Adding node-mariasql as a target option 2014-06-03 23:27:37 -04:00