518 Commits

Author SHA1 Message Date
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
statyan
4f28c992be Fixed knex #1463 issue
Fixed knex #1422 issue
2016-06-01 16:27:29 +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
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
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
wubzz
f097e9147b Make sure 'raw' respects the "not" flag in the query builder. Fixes #1402 2016-05-14 22:36:13 +02:00
Rhys van der Waerden
a06b44a29c Merge pull request #1397 from atiertant/join-nest-statements
Allow joins to nest conditional statements
2016-05-14 11:19:51 +10:00
Rhys van der Waerden
815c6ce8f0 Merge pull request #1401 from nickwhiteley/master
#1348 MSSQL adding and dropping multiple columns fix
2016-05-14 10:06:08 +10:00
Nick Whiteley
4161dab19e #1348 MSSQL adding and dropping multiple columns fix 2016-05-12 10:24:29 +01:00
Mikael Lepistö
9114bdd8b3 Changed implementation of replacing undefined with DEFAULT already in query compiler for every dialect. 2016-05-12 10:24:42 +03:00
Mikael Lepistö
9fab58c2b2 Evaluated multi insert default for undefined already in query compiler 2016-05-12 10:24:42 +03:00
Alexandre Tiertant
f3c78f6c85 add test 2016-05-12 09:09:42 +02:00
wubzz
34d9a7650e Merge pull request #1269 from wubzz/bugfix/fix_valuesForUndefined_actual_query
Fix valuesForUndefined actual query being executed. Fixes #1268
2016-03-27 17:28:41 +02:00
Ryan Fink
dc92ff2b71 Merged upstream 2016-03-24 09:22:07 -04:00
Max Claus Nunes
8d6264e96b wrap index names 2016-03-16 21:52:51 -03:00
Joe Frambach
cf8222d9eb Add inherits to postgres. Updated dialect-specific methods. 2016-03-15 16:40:49 -07:00
Mikael Lepistö
2f531190bb Merge pull request #1109 from kmikael/timestamps-now
Add option to timestamps to be not null and default to the current timestamp
2016-03-15 23:09:16 +02:00
wubzz
02281ef91b Fix valuesForUndefined actual query being executed. Fixes #1268 2016-03-15 21:47:58 +01:00
wubzz
c79453ac3a Change _.pluck -> _.map in all tests 2016-03-15 18:12:40 +01:00
wubzz
f37824a11e Fix indentation? 2016-03-15 18:12:36 +01:00
wubzz
1d27fb8550 Update lodash from 3.7.0 -> 4.6.0 2016-03-15 18:11:13 +01:00
wubzz
b614a2f81c Update regex for named bindings 2016-03-11 20:41:19 +01:00
wubzz
7cc827f6cf Merge pull request #1258 from jurko-gospodnetic/code-cleanup
Code cleanup (trimmed trailing spaces & removed tabs)
2016-03-08 13:13:48 +01: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
Rod Calumpong
ab003ac7c9 Allow returning to be used with oracle update 2016-03-07 16:35:04 -08:00
Rhys van der Waerden
a42766afb1 Merge pull request #1164 from wubzz/bugfix/orWhere_with_object_should_be_and
Bugfix/or where with object should be and
2016-02-18 18:41:26 +11:00
wubzz
942877c0fe OrWhere({..}) Treat as 'AND', not 'OR'. Fixes #1118 2016-02-18 06:28:14 +01:00
Mikael Lepistö
96aa4d8d91 Merge pull request #1147 from alexrsagen/master
Add collate for columns (MySQL)
2016-02-15 20:09:43 +02:00
Rhys van der Waerden
5ebbeb07b4 Merge branch 'bugfix/make_raw_backwards_compatible' of https://github.com/wubzz/knex into wubzz-bugfix/make_raw_backwards_compatible 2016-02-06 14:08:30 +11:00
wubzz
c75f8e25e8 Added test for JS Date 2016-02-04 16:58:35 +01:00
Alejandro Oviedo
a1e6dbb0f7 fixes bug when using dot in as identifier 2016-02-02 14:46:18 -03:00
Mikael Lepistö
79a77ac932 Removes object keys with value undefined from being added to DB in update. Clean version of pq #962 fixes issue #961. 2016-02-01 11:51:02 +02:00
wubzz
0d20e5b534 .raw bindings should allow single Non-Array values. 2016-01-30 14:52:07 +01:00
wubzz
82b38740b7 Forgot to commit the updated Test for dropPrimary 2016-01-29 23:55:51 +01:00
Mikael Konutgan
aa142f20f7 Add option to timestamps to be not null and default to the current
timestamp
2016-01-25 16:35:58 +01:00
gmichael225
b130ad66e2 Merge remote-tracking branch 'root/master' into sqlite3-dialect-escaping
# Conflicts:
#	lib/dialects/sqlite3/index.js
2016-01-25 07:43:03 +11:00
Alexander Sagen
2317279e8c Add collate for columns (MySQL)
This had been requested in #599 a year ago, but a PR was never created.

I have included a test that passed when i ran it.
2016-01-19 23:06:25 +01:00
Ryan Fink
4985a65bfc Add syntactic sugar - andWhereBetween and andWhereNotBetween 2016-01-09 07:35:12 -05:00
gmichael225
4b2c0efff1 SQL compliant escaping, removed dialect-specific escaping for now 2015-12-24 11:33:48 +11:00
Sky Morey
eed0004031 mssql: added top (?) back to fix that error. also removed loading of empty file 2015-12-15 16:48:19 -06:00
Sky Morey
ae256f2943 mssql limit and offset for sql2012 2015-12-15 14:56:56 -06:00
Sky Morey
f99d3952a1 changed mssql to compact create format. changed unique index to unique constraint 2015-12-14 16:20:45 -06:00
Sky Morey
aa8df07711 merge 2015-12-14 11:10:46 -06:00
Sky Morey
371815d7e6 made SCHEMA upper case for mssql 2015-12-14 09:56:53 -06:00
Michael G
91b159db2d Added test for SQLite single-quote escaping as per http://www.sqlite.org/lang_expr.html 2015-12-14 18:38:56 +11:00