325 Commits

Author SHA1 Message Date
Tim Griesser
6c76cc5cf0 adding jshint, cleaning unused variables 2014-04-16 03:22:47 -04:00
Tim Griesser
1e3fd57e16 updating tests for a few recent pr's 2014-04-16 02:59:27 -04:00
Tim Griesser
db2f9e7f08 merge with master 2014-04-16 02:50:19 -04:00
Tim Griesser
0de9513a78 all tests green 2014-04-16 01:23:50 -04:00
Tim Griesser
4dee91551a all unit tests passing 2014-04-15 13:10:32 -04:00
Tim Griesser
a62ca4f7ee schema tests passing, some of the builder tests passing 2014-04-15 11:43:47 -04:00
Blake Embrey
53594b9674 Add support for returning in delete query
* Adds compilation of returning in delete
* Simplify response handling
* Adds support for passing in returning columns to delete method (keeps behaviour inline with select and update)
* Adds test output checking for delete queries
2014-04-13 17:51:57 +10:00
Tim Griesser
9be8b41efa streams and things 2014-04-09 10:11:41 -04:00
Tim Griesser
dfdc426751 Majorly refactoring every piece of the library, WIP 2014-04-08 16:25:57 -04:00
Eric Eslinger
861c0f561d adding more array operators to builder for postgres array functionality 2014-04-03 16:26:51 -07:00
Tim Griesser
cb9f849393 fixes #228, regression for array bindings 2014-04-02 21:28:56 -04:00
Tim Griesser
d71c9bf76e Add more things that could be considered operators, fix #226 2014-03-31 13:18:44 -04:00
Tim Griesser
ef4e5d52e8 Further changes & test for #222 2014-03-25 11:13:43 -04:00
danschumann
c0cb2e7997 added 'is' to operators 2014-03-25 09:17:19 -05:00
Daryl Lau
bf4e39718e allow case insensitive WHERE operators 2014-03-22 12:39:48 -07:00
Tim Griesser
90282058d8 Merge pull request #207 from kobalicekp/master
[Improvement] Replaced push.apply() calls with custom concat() function.
2014-03-20 09:06:23 -04:00
kobalicekp
f3439f7ab7 Handle undefined correctly in Builder._counter(). 2014-03-20 12:50:48 +01:00
kobalicekp
194d60b48f Fixed Builder._counter() to allow fractions and to negate the operator if the incoming number is negative. 2014-03-20 12:32:37 +01:00
Tim Griesser
716e3c3019 add .exec to the knex promise shim 2014-03-19 11:54:18 -04:00
kobalicekp
e95026a4c3 Replaced push.apply() calls with custom concat() function so the V8 stack will not exhaust when a complex query is being processed 2014-03-19 13:23:35 +01:00
Tim Griesser
c06d787fd7 a bit of work on the query compiler pieces 2014-03-18 15:38:35 -04:00
Tim Griesser
eeeab07c42 reworking where values are parametereized/escaped 2014-03-14 16:56:55 -04:00
Mayhem
9a052f421f Throw an error when an invalid operator is passed in the where clause generation. 2014-03-05 20:11:38 +01:00
Mayhem
cbed64e974 Remove dead Builder.prototype.option() function.
It was replaced with options().
2014-03-05 20:05:44 +01:00
Tim Griesser
c5f42e3099 re-fixing #84, forUpdate / forShare 2014-02-27 11:54:45 -05:00
Tim Griesser
76dfc1348b fix issue with null bindings, change around the query compiler 2014-02-23 15:38:53 -05:00
Tim Griesser
55f7f28761 making stateless querying opt-in, not default 2014-02-22 17:06:33 -05:00
Tim Griesser
765978b474 underscore compatible 2014-02-22 13:33:46 -05:00
Tim Griesser
0fa7bd9523 fixing some global leaks 2014-02-22 12:16:01 -05:00
Tim Griesser
8bddaea5e2 adding several tests from recent modifications 2014-02-21 20:38:14 -05:00
Tim Griesser
d5da83dbfc instanceof check in defaultTo 2014-02-21 19:26:56 -05:00
Tim Griesser
28d5e48a15 accounting for the union only queries 2014-02-21 18:20:00 -05:00
Tim Griesser
549036d151 working on handling the statements 2014-02-21 17:16:11 -05:00
Tim Griesser
897b0ea3b5 adding map & reduce from bluebirds' implementations 2014-02-19 22:43:06 -05:00
Tim Griesser
e6b2267bfe _runChain on the builder 2014-02-19 18:25:21 -05:00
Tim Griesser
6470af8456 fix #182, null limit/offset does not break chain 2014-02-18 09:58:21 -05:00
Tim Griesser
5393cad7a0 only one tableName per query call 2014-02-18 09:49:18 -05:00
Tim Griesser
89a3dec0c9 0.6.0-wip 2014-02-14 12:46:13 -05:00
Tim Griesser
4c589cc960 working on refactoring the internals 2014-02-14 12:46:13 -05:00
John BEPPU
0619663d1a added knex migration template for LiveScript 2014-02-13 09:54:37 -08:00
Tim Griesser
4aa5bd5b0c Merge pull request #171 from tkellen/pluck
add pluck to builder interface
2014-01-28 15:28:31 -08:00
Tyler Kellen
0e83902c8c add pluck to builder interface
enables grabbing a single element from each row in results,
returning a promise which yields an array of those values.
2014-01-28 16:01:30 -05:00
Nikhil Benesch
0bf4044b74 Add 'avg' aggregate function
The 'AVG' aggregate function is specified in the SQL standard and
supported by MySQL, PostgreSQL, and SQLite. Include tests, too.
2014-01-19 15:38:59 -05:00
Stepan Mazurov
78d05f2fa0 changed init to use this.config in case one isn't passed in 2014-01-16 11:59:03 -07:00
vvo
05efb708d1 process.exit() with proper statusCode
One thing to take into account when making command lines
is to exit with the proper code so that grunt-tasks works as expected
when failing.
2014-01-14 15:47:42 +01:00
vvo
17fcaf4019 errors are logged with console.error so that stderr propagates 2014-01-14 15:46:48 +01:00
Tim Griesser
b42d42e2bc fix for #146, allowing knex.raw in defaultTo 2014-01-07 22:12:33 -05:00
Tim Griesser
5cc47ed1ee don't assume undefined is 'where null' 2013-12-25 13:31:51 -05:00
Tim Griesser
3785575de2 shuffling around the client paths/config 2013-12-25 13:21:31 -05:00
Tim Griesser
125cfb7cf5 better websql build 2013-12-24 08:06:14 -05:00