2646 Commits

Author SHA1 Message Date
Mikael Lepistö
77e67334a3 Alter column syntax for table, implements changing type, nullability and default (#1914)
* Added support for altering columns

* Add mysql dialect key for alter (modify)

* Added tests for .alter()

* Updated dialects for .alter() on column

* .alter() for mssql and tests

* Added an error for sqlite3 alter column

Sqlite does not support alter column at all

* Implemented schema alter column support for postgresql

* Added unit test for alter column and fixed postgres implementation

* Add test case for adding multiple columns at once (oracle check)

* Try upgrading CI mysql / postgres and distro

* Disabled adding multiple columns test from oracle

* Fixed node 0.12 test compatibility

* Fixed review comments
2017-02-16 20:34:59 +02:00
Mathew Gardner
f198c7d574 Allow casting when using named bindings. (#1890)
* Allow casting when using named bindings.

* Remove template string in test.

* Only replace matches that are member to the bindings object.

* Slight refactor for tests.

* Simplify regex.

* Allow casting on named identifiers.
2017-02-05 20:22:26 +02:00
Tim Huff
0d55cfd286 More promise functions (#1896)
* Added failing tests

added more promise tests

* Added ability to use promise functions

* removed identity from promise handler
2017-02-04 02:54:15 +02:00
Justin Huntington
2fa375f813 Pass rollback errors through to transaction promise in mssql dialect (#1884) (#1885)
Check for rollback failures on mssql and pass them through to the transaction promise-- attaching the underlying cause as an 'originalError' property.  This fixes a hang when mssql server aborts a transaction and the client issues a rollback.
2017-01-30 15:00:03 -06:00
Tomás Pinho
7de07c966a ONLY keyword support for PostgreSQL (#1874)
* adding support for ONLY keyword for PostgreSQL as an optional flag of from() and into() through table(tableName, only)

* passing only parameter from default function was missing

* changing only option to options object with only key

* better style per @wubzz suggestion
2017-01-26 18:22:09 +02: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
Saugat Acharya
ff4f9e213b align commands description (#1857) 2017-01-11 15:02:24 +02:00
wubzz
a4bfee7751 Ensure that 'client' is provided in knex config object (#1822)
* Ensure that 'client' is provided in knex config object

* sqlite3 columncompiler: Assign 'modifiers' --after-- super() call.

* oracle columncompiler: Assign 'modifiers' --after-- super() call.
2016-12-11 18:23:44 +02:00
Ruben Slabbert
0ae4f3ef95 Mssql update query generates invalid syntax (#1777)
* Updated mssql update compiler with correct syntax

* Updated failing mssql test

* Updated failing tests to add from

* Third times the charm tests
2016-12-06 20:04:30 +11:00
Daniel Friesen
9e7b57e038 react-native doesn't handle the /index.js in browser fields (#1813) 2016-12-05 15:54:24 +02:00
Prashant Tiwari
85dcd75938 Update stub examples to not use Promise.all (#1814) 2016-12-01 17:13:02 +02:00
Prashant Tiwari
ba5ae37097 Support knexfile, migration and seeds in TypeScript (#1769)
* Support knexfile, migration and seeds in TypeScript

* Look for .ts seed files

* Fix linter warning for max-len

* Enforce migration scripts to return a promise

* Remove Promise.all example from stub
2016-12-01 10:32:21 +02:00
Nikita Khomyakov
6789ffe7a3 Fix erroneous float to integer conversion of decimal fields in MSSQL (#1781)
* Fix erroneous float to integer conversion of decimal fields in MSSQL

* Add test case for decimal number handling in MSSQL
2016-11-30 07:55:58 -06: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
Mark Herhold
2ddcf64ef1 Test against Node.js v7 (#1794) 2016-11-29 19:11:37 +02:00
Mikael Lepistö
f2ae416e3b Hardcoded node 0.12 compatible babel-lodash-plugin to package.json 2016-11-29 13:01:39 +02:00
Mikael Lepistö
4068a8757c Fixed random timeout test failure to wait before testing if connection really has been canceled 2016-11-29 13:01:39 +02:00
Mikael Lepistö
5210b671ab Updated info about the docuementation repository 2016-11-27 19:49:23 +02:00
statyan
99ac60af37 Fix incorrect MSSQL query building with lock used, with clause and Number with decimal part conversion (#1707)
* Fixed knex #1577
Aslo corrected tests for primarykey

* Fix for installing from github

* Fix for installing from github

* Fix for installing from github

* Move LOCK hint for MSSQL after join component of select

* Add missing import statement

* Added "WITH" clause to select, update, insert and delete queries.
Fixed forUpdate lock query building
Add detection of decimal value of Numeric parameter and set proper sql.Type for it. (Fix for #1604)

* Change let to const for variable declaration

* Fix MSSQL non-numeric parameters binding
2016-11-25 18:54:48 -06:00
Owen Evans
825396ada7 use uuid not node-uuid (#1792) 2016-11-22 10:58:21 +02:00
skarbovskiy
9848145f46 allow to use first method as aliased select (#1784)
* allow to use first method as aliased select

* added test case for allow `first as` syntax
2016-11-18 13:43:39 +02:00
Alexander Tesfamichael
fa48427c2b Use safe buffer allocation (#1788)
Use of 'new Buffer' has been deprecated in node v6. This swaps the only
unsafe buffer allocation in knex with safe allocation. It uses the
safe-buffer module to stay backwards compatible with node < v6.
2016-11-18 11:56:41 +02:00
Tim Griesser
e3ccfa2bf8 Merge branch '0.12.x'
* 0.12.x:
  release 0.12.6
  Update changelog
  Remove postinstall script for now
  Gitignore yarn.lock
  Adding return's to address warnings mentioned in #1388 (#1740)
2016-10-19 15:15:43 -04:00
Tim Griesser
db9b54946b release 0.12.6 0.12.6 2016-10-19 15:12:54 -04:00
Tim Griesser
fde6b83b6a Update changelog 2016-10-19 15:11:08 -04:00
Tim Griesser
a16639b156 Remove postinstall script for now 2016-10-19 15:10:23 -04:00
Tim Griesser
762aa015f4 Gitignore yarn.lock 2016-10-19 15:08:14 -04:00
Luke Gordon
d394d4ffb5 Adding return's to address warnings mentioned in #1388 (#1740)
* Adding return's to address warnings mentioned in #1388

* Adding comments for returns
2016-10-19 15:08:06 -04:00
Luke Gordon
718b746dee Adding return's to address warnings mentioned in #1388 (#1740)
* Adding return's to address warnings mentioned in #1388

* Adding comments for returns
2016-10-19 18:30:08 +03:00
Alexandre Tiertant
3609de76b3 fix oracle tests (#1741)
* Fix Oracle dialect to pass integration tests$

* Update transaction.js

* fix oracle timeout request

* Enabled travis-oracledb-xe installer

Signed-off-by: Alexandre Tiertant <a.tiertant@atlantis-software.net>

* fix timeout tests

* fix timeout tests messages
2016-10-14 18:00:39 +03:00
Tim Griesser
0949ed3ff1 Merge branch '0.12.x'
* 0.12.x:
  release 0.12.5
  Update changelog
  include scripts in npm package (#1737)
2016-10-12 10:31:25 -04:00
Tim Griesser
fe0b71f467 release 0.12.5 0.12.5 2016-10-12 10:24:46 -04:00
Tim Griesser
834bc6eeaf Update changelog 2016-10-12 10:22:49 -04:00
Calvin Metcalf
3871aa41f7 include scripts in npm package (#1737) 2016-10-12 10:21:35 -04:00
Calvin Metcalf
6500b2f5ea include scripts in npm package (#1737) 2016-10-12 10:20:34 -04:00
Tim Griesser
c1eff68a11 Merge branch '0.12.x'
* 0.12.x:
  release 0.12.4
  Updating/pruning some deps
  Fix #1733, #920, incorrect postgres array bindings
2016-10-12 01:10:52 -04:00
Tim Griesser
9e352b32a9 release 0.12.4 0.12.4 2016-10-12 01:07:52 -04:00
Tim Griesser
f2215c40d8 Updating/pruning some deps 2016-10-12 01:05:08 -04:00
Tim Griesser
5890e4d4ea Fix #1733, #920, incorrect postgres array bindings 2016-10-12 00:43:30 -04:00
Wesley Overdijk
b61d6aba85 Return reject (#1734) 2016-10-11 12:00:46 +03:00
Tim Griesser
454b769a10 Fix test suite for node 0.12 2016-10-09 18:26:04 -04:00
Tim Griesser
188796554e Fix test suite for node 0.12 2016-10-09 17:51:13 -04:00
Tim Griesser
0e4619acde More cleanup for #1725 2016-10-09 17:42:47 -04:00
vellotis
7a04de4b87 Support using dependency straight from git repository (#1708)
Using build.js from Bookshelf 8ae37faeec/scripts/build.js
2016-10-09 17:38:13 -04:00
Tim Griesser
b0d723bb00 Maybe fix #1725? 2016-10-09 17:36:41 -04:00
Tim Griesser
dc431f8afc Fix test for acquireConnectionTimeout 2016-10-09 17:33:52 -04:00
Tim Griesser
a24e4df638 More test suite fixes 2016-10-09 15:21:04 -04:00
Tim Griesser
82685b57f0 Fix test in 0.12 2016-10-09 15:09:54 -04:00
Tim Griesser
f33d6a3148 release 0.12.3 2016-10-09 14:33:51 -04:00
Tim Griesser
1d1128af4a Update changelog 2016-10-09 14:33:51 -04:00