1117 Commits

Author SHA1 Message Date
Mikael Lepistö
c22a51e5ad Merge pull request #886 from bblack/dialect_escaping
Per-dialect escaping
2015-12-13 20:50:44 +02:00
Sky Morey
4f340d6096 Merge branch 'master' of github.com:tgriesser/knex 2015-12-10 15:16:23 -06:00
Sky Morey
1793f9ad45 first pass of build modifications 2015-12-10 15:14:43 -06:00
Sky Morey
198aa0db4b fixed lint issues, fixed mssql transaction 2015-12-10 13:35:37 -06:00
Rhys van der Waerden
84472e6e7e Merge pull request #1081 from tgriesser/fix/1080
Include `_debug` property in `QueryBuilder#clone`.
2015-12-10 15:31:14 +11:00
Sky Morey
afd6b66624 Final build of mssql provider, all tests pass 2015-12-09 17:53:53 -06:00
Sky Morey
7c1120e0e2 in progress 2015-12-08 11:37:31 -06:00
Brian Black
27b0a57823 do not escape doublequotes in postgres 2015-11-29 18:54:05 -05:00
Brian Black
332ed3b811 tests for escaping single-quotes 2015-11-29 18:44:12 -05:00
Rhys van der Waerden
8ef5d5899d Include _debug property in QueryBuilder#clone.
Adds a test for `QueryBuilder#clone`. Changes `clone()` behaviour to transfer the debug flag (`QueryBuilder#_debug`) to the cloned instance.

Fixes #1080
2015-11-30 00:21:08 +11:00
Rhys van der Waerden
51ef27bd4f Merge pull request #1058 from elhigu/support-question-mark-escaping-for-knex-rendered-queries
Support question mark escaping for knex rendered queries
2015-11-28 13:47:53 +11:00
Mikael Lepistö
68bf4dde08 Merge pull request #1066 from dustinmartin/add-status-method
Add migration status method
2015-11-25 13:52:29 +02:00
Mikael Lepistö
b3452c5158 Merge pull request #1043 from elhigu/allow-using-default-instead-of-null-when-translating-undefined-to-sql
Optionally use DEFAULT instead of NULL when translating undefined to SQL value.
2015-11-23 23:09:36 +02:00
Dustin Martin
d9ac2c1f8f Add status method
Returns 0 if all migrations are run and DB is up to date. Return negative number if DB is missing migrations. Return positive number if DB is ahead (rare case, e.g. if migrations were run then code is reverted)
2015-11-23 10:50:19 -06:00
Rhys van der Waerden
ebd361ffce Merge pull request #994 from wubzz/bugfix/query_event_when_using_transactions
Query event in Transaction should be proxied to the main client
2015-11-17 23:27:15 +11:00
Mikael Lepistö
30d42ebab9 Replace undefined with DEFAULT by default and NULL with separate configuration option. 2015-11-14 19:46:34 +02:00
Mikael Lepistö
0c74f786a5 Optionally use DEFAULT instead of NULL when translating undefined to SQL value. 2015-11-14 19:46:34 +02:00
Mikael Lepistö
db7e7feb2f Documentation and test 2015-11-14 11:07:43 +02:00
Rhys van der Waerden
e1973329c8 Merge pull request #1050 from elhigu/fix-knex-raw-indentifier-escaping-and-named-parameter-regexp-and-add-documentation
Fix knex raw indentifier escaping and named parameter regexp and add documentation
2015-11-14 14:51:52 +11:00
Rhys van der Waerden
3a8a6e8967 Merge pull request #1044 from elhigu/added-jsonbcolumn-type
Jsonb type to schema.
2015-11-12 08:49:33 +11:00
Mikael Lepistö
ca3c1d0a22 Allow named parameter to be at start of knex.raw() sql string 2015-11-10 23:26:19 +02:00
Mikael Lepistö
fdaba4705e Fix for #1003 2015-11-10 23:26:19 +02:00
Rhys van der Waerden
bd97610940 Merge pull request #1046 from ErisDS/issue-1028
Distinct modifier support for aggregate functions
2015-11-10 00:06:02 +11: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
Chuy Del Castillo
6e7049c8bd checking for plain object instead object 2015-11-06 16:17:50 -07:00
Mikael Lepistö
0ac6152c7f Jsonb type to schema. 2015-11-04 13:46:34 +02:00
wubzz
0d628ebf0f Fix typo tr === trx 2015-09-23 19:32:27 +02:00
wubzz
d60dd74f27 Attempt to add test for #855 2015-09-20 15:29:07 +02:00
harriha
3d85822a28 Add integration tests for per-migration transactions
Since per-migration config is defined in the migration files
themselves, new test migration files are needed.
2015-09-08 13:59:27 +10:00
harriha
a095feee21 Add a test for checking migrations with all transactions disabled 2015-09-08 13:59:27 +10:00
harriha
e614e89d22 Add missing return 2015-09-08 13:59:26 +10:00
harriha
5003b41dae Add tests for a join with value 0 2015-08-30 23:21:11 +03:00
Mikael Lepistö
b9d9a99f80 Added \? escape sequence to postgres dialect to allow using ? operator. 2015-08-25 10:19:35 +03:00
Daniel Teixeira
8e780a8115 rename .using to .withSchema 2015-08-14 19:17:06 -03:00
Daniel Teixeira
3f8f50425f add schema support for schema builder 2015-08-09 23:04:53 -03:00
Daniel Teixeira
402dbd9903 add schema support for postgres queries 2015-08-09 20:48:33 -03:00
Daniel Teixeira
17df5c6542 add basic schema support on queries 2015-08-09 20:38:26 -03:00
Jani Evakallio
cb89930155 Add queryBuilder as first parameter to queryBuilder.modify 2015-07-16 15:49:30 +01:00
Jani Evakallio
299bbfa60b Rename compose to modify 2015-07-16 15:15:04 +01:00
Jani Evakallio
4f833dae42 Unit test for queryBuilder.compose 2015-07-09 15:59:29 +01:00
Daniel Qin
c540d46c5d added test for rename columns reference by another table 2015-07-07 13:12:09 +08:00
Vincent Schoettke
285816ccdd default to timestamp with time zone for oracle 2015-06-24 10:15:51 +02:00
Tim Griesser
7b3d4bf96c Add test for postgres stream 2015-06-01 15:45:02 -04:00
Tim Griesser
1eed91ad6d Reference issue id in test 2015-06-01 09:14:45 -04:00
Tim Griesser
edefe53df9 Better fix for #852 2015-06-01 07:55:04 -04:00
Tim Griesser
90105e064f Fix #852, parse qs parameters for connection 2015-06-01 07:39:57 -04:00
Tim Griesser
cf757a5647 Fix #853, raw bindings should be optional 2015-06-01 07:30:38 -04:00
Tim Griesser
470428032d Fix #832, errors thrown in trx container trigger rejection 2015-05-20 11:19:12 -04:00
Tim Griesser
01bae6a598 Add disableTransactions option, #834 2015-05-20 11:08:27 -04:00
Tim Griesser
f54bb0f77e Fixing #823, regression from #822 2015-05-14 00:43:04 -04:00