Commit Graph

54 Commits

Author SHA1 Message Date
Daniel Rosenwasser
b01928ab46
Merge pull request #23627 from richbai90/KnexAddNullToValue
Knex add null type to Value union type
2018-02-15 11:14:19 -08:00
Daniel Rosenwasser
a5f8d88c33
Merge pull request #23656 from tuitionio/knex-table-builder
knex - Added missing schema builder parameters
2018-02-15 10:57:58 -08:00
Daniel Rosenwasser
0527c64593
Merge pull request #23617 from rgtk/master
knex: Add alias definition to QueryBuilder#select
2018-02-15 10:57:31 -08:00
Ralph Gutkowski
2ea886bcc4 Add tests 2018-02-15 01:33:50 +00:00
Christopher McGinnis
5cea434a40 Added tests, fixed errant import and foreign return type 2018-02-14 15:08:12 -08:00
Andy Hanson
45c9246c09 Remove esModuleInterop from tsconfigs (no longer mandatory) 2018-02-14 14:55:13 -08:00
Rich
38c288531b do not allow null to be passwd to QueryBuilder type 2018-02-14 14:06:28 -07:00
Christopher McGinnis
3709360734 Added missing schema builder parameters 2018-02-14 12:04:36 -08:00
Rich
0e019bd7f9 Add a couple of tests showing how the null value would be used in a where filter 2018-02-14 09:30:42 -07:00
Rich
a2093850ab Add | null to Where interface overloads rather than changing the Value type globally. 2018-02-14 09:24:21 -07:00
Rich
272910b18c Add null type to Value union type. In accordance with the source code : ca702cf4d1/src/query/builder.js (L253)
This will allow us to manually use 'is null' in a Where filter
2018-02-13 15:52:16 -07:00
Ralph Gutkowski
0ae71bb5ae knex: Allow Raw expression for FROM clause 2018-02-13 20:06:27 +00:00
Ralph Gutkowski
49b7e17e6e knex: Add alias definition to QueryBuilder#select
QueryBuilder#select also accepts arguments in form of alias object:

    knex.select({ owner: "user.name" });
2018-02-13 19:20:26 +00:00
Andy
bef4d2b27d
Enable "esModuleInterop" in all tsconfigs (#23354) 2018-02-05 11:01:56 -08:00
Omar Diab
23faf25636 Knex.join: table can be a subquery (#23177)
* Allow tableName in joins to be QueryCallback

* Add tests for join with callback as table
2018-01-29 12:36:21 -08:00
Omar Diab
cf7e1301b3 knex cb selectors: this is a QueryBuilder (#23143)
* knex cb selectors: this is a QueryBuilder

* knex: tests for QueryCallback
2018-01-24 08:59:29 -08:00
Omar Diab
398ebb9d76 knex: default batchInsert chunkSize arg (#23064)
* knex: optional batchInsert chunkSize arg

* knex: add test for optional batchInsert
2018-01-23 10:39:09 -08:00
Pavel Ivanov
5326692703 @types/Knex added unnceccessay length param to table builder binary method according to knex docs. (#22962)
* added unnceccessay length param to table builder binary method

* added example of usage in tests file

* fixed missed semicolons
2018-01-20 06:25:35 -08:00
Sebastian Neira
8d73479bdd Add Knex column by object (#22994) 2018-01-18 12:43:09 -08:00
Satana Charuwichitratana
3f0cbf20fc [@types/knex] Fixed search path incomplete typing (#22698)
* [@types/knex] Added multiple searchPath support for 0.14.1

* [@types/knex] Fixed whitespace lint

* [@types/knex] Fixed typedef-whitespace lint

* [@types/knex] Fixed semicolon lint
2018-01-05 09:35:01 -08:00
Chet Husk
789d28808a allow for right hand side fo a join to be a Raw value, per the docs 2017-12-19 12:17:10 -06:00
Matt R. Wilson
8c230bbd78
Knex - Add connection Client for extension. 2017-12-05 12:29:04 -07:00
Chet Husk
75723b0473 allow for undefined transactions 2017-11-28 15:29:33 -06:00
Nathan Shively-Sanders
fc9b141660
Merge pull request #20955 from MeLlamoPablo/master
Update knex to preserve type information
2017-11-14 10:31:14 -08:00
Andy
19f89399e4 Ensure every package has a tslint.json (#21009)
* Ensure every package has a tslint.json

* Fixes
2017-10-25 11:13:50 -07:00
Pablo Rodríguez
14cb871531 Update knex to preserve type information
Previously knex would lose type information when
callink knex.transaction.
2017-10-24 17:07:23 +02:00
Travis Hill
8899268190 knex: Add JoinClause 'on' variations (#20668)
* knex: Add JoinClause 'on' variations

* knex: onBetween's range parameter accepts an array with exactly two elements

* knex: Adds additional 'and' and 'or' methods for 'on' variations
2017-10-23 13:22:11 -07:00
nihiluis
76c122d1a4 add version property to Config for pg compatibility (#20584) 2017-10-23 12:56:04 -07:00
Neonit
d5844afa20 adjust typeCast type in MySqlConnectionConfig (#20431)
The underlying node-mysql package supports a function as typeCast value (alternative to a boolean), thus its type has been set to any in the respective types package (@types/mysql). https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/mysql/index.d.ts#L217
2017-10-23 12:13:32 -07:00
Martynas Kunigėlis
05ac46f9a9 knex: allow calling .join() with a closure as the second argument (#20434)
* Allow calling .join() with a closure as the second argument that takes
the JoinClause as its first argument, not just a function w/o arguments
with the JoinClause passed as this.

* Call signature corrected per comment from @andy-ms, one of the tests
updated accordingly.

* Got rid of the this-only overload per comment from @andy-ms.
2017-10-17 13:06:34 -07:00
Leon Chen
239c74ded1 support generic-pool v3 pool config options (#20269) 2017-10-09 16:02:02 -07:00
Andy
947a8fb761 Enable strictFunctionTypes (#20373) 2017-10-06 14:03:03 -07:00
Chris Watts
e8076e1dbb Update index.d.ts
Alter should actually be moved to ColumnBuilder interface
http://knexjs.org/#Schema-alter
2017-08-28 17:38:27 -07:00
Chris Watts
b3d6ba948d Update index.d.ts
Add `dropTimestamps` function on `TableBuilder`
Add `alter` on `AlterTableBuilder`
http://knexjs.org/#Schema-alter
http://knexjs.org/#Schema-dropTimestamps
2017-08-25 12:33:28 -07:00
Bowden Kelly
93d659fc39 Merge pull request #19144 from slively/master
add seeds configuration to Knex client
2017-08-24 18:00:25 -07:00
slively
e633975df8 add seeds configuration to Knex client 2017-08-18 17:37:02 -07:00
Aditya
83f35b36e9 Knex: Fix the typings for the streaming methods 2017-08-15 13:34:23 +02:00
Ed Staub
351950a008 Add withSchema() to queryBuilder interface (#18452)
... not to be confused with the schemaBuilder withSchema method
2017-07-27 11:29:42 -07:00
Paul van Brenk
00222e6b0a Merge pull request #17535 from blakeembrey/knex-raw
[knex] Allow `Raw` for index creation
2017-06-29 14:25:49 -07:00
Blake Embrey
c4089d41ba [knex] Allow Raw for index creation 2017-06-27 12:19:30 -04:00
Jeremy Marzka
b955315655 knex: join supports object syntax when using a querybuilder 2017-06-25 09:52:29 -05:00
Andy Hanson
c15e214e5a bluebird: Make Thenable an alias to the builtin PromiseLike. 2017-06-16 09:02:18 -07:00
Martynas Kunigėlis
c35d7a9798 Knex: added declarations and tests for clearSelect() and clearWhere(). (#16746) 2017-05-31 22:39:26 -07:00
Daniel Rosenwasser
21d903fa7e Merge pull request #16606 from edvinv/master
[knex] Add function queryBuilder.
2017-05-22 15:32:13 -07:00
Jeremy Marzka
2f931b8761 knex: first() should accept the same parameters as select() 2017-05-22 11:52:42 -05:00
edvinv
6e46f5cb54 [knex] Add function queryBuilder. 2017-05-18 14:26:53 +02:00
Balazs Erdos
158ea650e5 Add grouped joins (#16294) 2017-05-03 11:53:34 -07:00
Martynas Kunigėlis
de52c9ccca Quote from Knex source code comments: 'The transactor is a full featured knex object, with a "commit", a "rollback" and a "savepoint" function.' (#16092) 2017-04-28 14:21:27 -07:00
Martynas Kunigėlis
86d6ae08ba knex: added declarations for with(), withRaw() and withWrapped() (#15966)
Add an optional extended description…
2017-04-26 14:57:43 -07:00
Sriram Thiagarajan
669b518e91 knex: added *Distinct functions (#16094)
* added knexjs *Distinct functions

These functions seem to have been added in v0.10.0 - 620ade8c6d/CHANGELOG.md (other-changes-2)

* fix typo
2017-04-24 08:18:27 -07:00