32 Commits

Author SHA1 Message Date
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
David Overcash
9fe1a06ae1 Better name. 2016-06-17 09:33:03 -07:00
David Overcash
4ab0a916ba Change field name to something more appropriate. 2016-06-17 09:32:07 -07:00
David Overcash
04ddaeaa4a Add uuid based on already used import. 2016-06-17 09:19:20 -07:00
David Overcash
b3e9f29126 Add UUID to query/compiler.js:toSQL 2016-06-17 08:31:42 -07:00
Rhys van der Waerden
a95e39609f Lint before tests in CI 2016-06-14 19:50:51 +10:00
wubzz
a7ba49ae7c Add hasOwnProperty condition 2016-05-30 21:09:15 +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
Byron Wong
ea5cbec4e7 Kill queries after timeout for MySQL 2016-05-26 12:00:47 -07:00
Rhys van der Waerden
06e3447440 Remove duplicate spaces in assignments.
These were previously horizontally aligned. The esnext conversion disrupted them all.
2016-05-18 19:59:24 +10: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
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
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
Alexandre Tiertant
840a585665 fix using 2016-05-11 16:22:15 +02:00
Alexandre Tiertant
eeace3d557 fix param 2016-05-11 15:51:48 +02:00
Alexandre Tiertant
89d85d28a3 fix #690 2016-05-11 15:26:53 +02:00
Rhys van der Waerden
0ccb4bfa87 Modernize method syntax
`name: function()` -> `name()`
2016-05-08 23:18:28 +10:00
wubzz
b32fadf1e8 Prevent potential regression of argument tz (timezone) 2016-03-15 21:53:23 +01:00
wubzz
f286da2796 Preserve original bindings at all times. Move prepBindings calls to toSQL() instead. Enforce 'bindings' to always be present in .toSQL() resultset. 2016-03-15 21:47:59 +01:00
wubzz
02281ef91b Fix valuesForUndefined actual query being executed. Fixes #1268 2016-03-15 21:47:58 +01:00
wubzz
1d27fb8550 Update lodash from 3.7.0 -> 4.6.0 2016-03-15 18:11:13 +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
wubzz
6dfe653c42 Add .timeout() fn to QueryBuilder. 2016-02-15 17:06:08 +01: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
Hannah Wolfe
f72892b5b9 Distinct modifier support for aggregate functions
closes #1028

- add support for count(distinct *), avg(distinct *) and sum(distinct *)
- min and max don't really make sense with distinct, so didn't add those
2015-11-09 12:48:42 +00:00
harriha
4026da3f9a Check for undefined explicitly. Fixes #953.
Value 0 didn't work as expected with the previous check.
2015-08-30 23:28:14 +03:00
Daniel Teixeira
17df5c6542 add basic schema support on queries 2015-08-09 20:38:26 -03:00
Tim Griesser
521a6f9e97 Remove use strict, assumed in ES6 2015-05-09 14:01:19 -04:00
Tim Griesser
7e884cb325 Babel src -> lib, remove gulp 2015-05-09 13:58:18 -04:00