1117 Commits

Author SHA1 Message Date
Alexandre Tiertant
67b62d3213 Add having() and on() missing methods and corresponding tests/doc (#1674) 2016-09-19 19:20:12 +03:00
Tim Griesser
7069ce509e Revert to generic pool (#1665) 2016-09-13 18:12:23 -04:00
Tim Griesser
3a5250d87d Fix #1619 2016-09-13 09:56:53 -04:00
Tim Griesser
143e09ad35 Fix use of const in test suite for node 0.12 2016-09-13 09:50:28 -04:00
Tim Griesser
48a2ee1648 Deprecate Knex.Promise 2016-09-13 08:19:47 -04:00
Tim Griesser
6266037a38 Merge branch 'master' into 0.12-prep
* master:
  add With Clause (#1599)
2016-09-13 08:16:30 -04:00
Tim Griesser
f5bad1ae54 Simplifying internal client structure 2016-09-13 08:15:58 -04:00
Alexandre Tiertant
69235aed73 add With Clause (#1599)
* Add "with" clause

* Add arguments check to with() and modify some tests

* fix test
2016-09-13 13:14:04 +03: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
Alexandre Tiertant
57a67cdadc Fix #906 Oracle auto increment manual insert id (#1526)
* Oracle sequence trigger handle manual id inserts

* Update schema tests
2016-09-12 10:52:14 +03: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
Tim Griesser
4d056845b9 Remove outdated bench scripts 2016-08-09 17:11:08 -04:00
Nick Whiteley
f969d5236a MSSQL columnInfo() had hard coded schema name (#1585)
* MSSQL columnInfo() had hard coded schema name

* Change let to const for columnInfo bindings array
2016-07-26 10:00:57 +02:00
statyan
6ecd8f3793 Fixed knex #1577 (#1578)
* Fixed knex #1577
Aslo corrected tests for primarykey

* Fix for installing from github

* Fix for installing from github

* Fix for installing from github
2016-07-20 11:22:17 +10:00
Trevor Smith
b1a95b181e Allow named bindings to be escaped. (#1576)
* Allow named bindings to be escaped.

* Use a literal for the named parameter binding regex.
2016-07-19 20:42:49 +03:00
Dmitry Vdovin
289f17e21b Fix incorrect escaping of backslashes in SqlString.escape (#1545) 2016-07-02 00:45:50 +03: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
David Overcash
6193701c8d Typo. 2016-06-17 11:04:35 -07:00
David Overcash
9ec6984cc3 Fix a test that wasn't able to compare with new __knexQueryUid field. 2016-06-17 10:57:03 -07:00
David Overcash
f5137f2d67 Remove failing test to verify theory. 2016-06-17 10:42:40 -07:00
David Overcash
a8cbbfc193 Add tests for __knexQueryUid and an additional test for the query event. 2016-06-17 09:53:54 -07: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
d3557a0e36 Merge pull request #1473 from robscott/fix/passwordless_database_url
Adding support for specifying a DATABASE_URL without a password
2016-06-13 22:28:08 +10:00
Rob Scott
6c7809caae Adding support for specifying a DATABASE_URL without a password 2016-06-06 22:19:24 -04:00
statyan
4f28c992be Fixed knex #1463 issue
Fixed knex #1422 issue
2016-06-01 16:27:29 +03:00
Mikael Lepistö
dfca38da33 Merge pull request #1459 from wubzz/improvement/undefined_bindings_error_handling
Check for undefined bindings in WHERE clauses and RAW queries during…
2016-05-30 23:25:08 +03:00
wubzz
1fe657ab72 Fix test for undefined bindings and add documentation 2016-05-30 21:17:45 +02:00
wubzz
636a446b6d Made the compiler's where function be the source of the validation, but the toSQL function is still the 'thrower'. 2016-05-30 20:09:16 +02:00
Mikael Lepistö
05a95c2b8b Merge pull request #1445 from sandorfr/bugfix/mssql-bigint
add bigint detection and sets mssql req.input when appropriate
2016-05-30 00:17:38 +03:00
Cyprien Autexier
0e693dfdca replace bigint unit test by integration tests 2016-05-29 18:16:32 +02:00
Cyprien Autexier
b7231ebb2a Add unit tests for mssql bigints (to be fixed) 2016-05-29 15:52:28 +02:00
wubzz
6d820b9ff7 Remove test "undefined named bindings are ignored" as they are no longer ignored. 2016-05-28 19:51:47 +02:00
wubzz
cba2cdc364 Check for undefined bindings in SELECT queries and RAW queries during compile and throw an error. 2016-05-28 19:45:00 +02:00
Byron Wong
2eecd7cf16 no native startsWith 2016-05-26 17:10:27 -07:00
Byron Wong
89302b2e92 "maria" instead of "mariasql" 2016-05-26 17:04:30 -07:00
Byron Wong
c0a45b58a2 address wubzz's comments, improvements
* add timeout to acquiring connection inside `cancelQuery` + test
* use `KILL QUERY :id` instead of `KILL :id` so the connection is preserved
2016-05-26 16:56:15 -07:00
Byron Wong
ea5cbec4e7 Kill queries after timeout for MySQL 2016-05-26 12:00:47 -07:00
Rhys van der Waerden
327671f678 Merge pull request #1427 from vellotis/fix-version-on-constructor
Expose Knex version also on the constructor
2016-05-22 18:59:44 +10:00
wubzz
9118e05f23 Merge pull request #1431 from wubzz/bugfix/inconsistency_of_primary_and_dropPrimary
Ensure .primary() and .dropPrimary() are the same across all dialects.
2016-05-20 15:34:46 +02:00
Rhys van der Waerden
25ca625aa5 Merge pull request #1428 from vellotis/ft-1424
Allow using custom Client/Dialect
2016-05-20 17:19:21 +10:00
Kaarel Raspel
6cbceefdb8 Inherit knex instance VERSION property from constructor 2016-05-19 23:48:24 +03:00
wubzz
4e5d152847 Fix indentation of oracle schema unit file 2016-05-19 22:35:33 +02:00
wubzz
c2c31ce859 Change default constraintName in .primary() to match docs and .dropPrimary() 2016-05-19 22:13:09 +02:00
wubzz
4ba581b362 Fix some unit tests 2016-05-19 21:36:30 +02:00
wubzz
5a6ab64d06 Ensure .primary() and .dropPrimary() are the same across all dialects. 2016-05-19 21:30:17 +02:00
Mikael Lepistö
69e33c7f64 Pass valueForUndefined also to transacting client. Fixes #1423 2016-05-19 18:53:29 +03:00
Kaarel Raspel
41344a9399 Fix configs in tests 2016-05-19 13:33:13 +03:00
Alex Whitman
202ddddddb Use calling transaction with batchInsert 2016-05-19 11:07:29 +01:00
Kaarel Raspel
eed3d91c7f Refactor and tests
- Test for implemented case
- Test for currently untested case
2016-05-19 12:48:59 +03:00
Rhys van der Waerden
2e7650a8e4 Remove JSHint comments 2016-05-18 20:07:33 +10:00