monotykamary
767f32e6c9
fix: mistyping of stream ( #4400 )
2021-03-26 19:54:24 +02:00
Minh Son Nguyen
8858a630b6
nguymin4/update typings ( #4377 )
2021-03-25 11:21:46 +02:00
Igor Savin
887a4f606a
Improve join and conflict types v2 ( #4318 )
...
Co-authored-by: Jeroen Hermans <jeroen@datacamp.com>
2021-03-02 19:34:04 +02:00
Igor Savin
000fde3f78
Move transaction type tests to TSD ( #4208 )
2021-01-06 02:31:49 +02:00
Jingsi Zhu
72193891a5
Fix type definition of Transaction ( #4172 )
...
Co-authored-by: Igor Savin <iselwin@gmail.com>
2021-01-05 21:38:58 +02:00
Igor Savin
177938afeb
Introduce the "infamous triplet" export ( #4181 )
2020-12-30 22:26:08 +02:00
Igor Savin
293163b480
Move TS tests to tsd, part 2 ( #4110 )
2020-11-20 12:46:08 +02:00
Igor Savin
4a5172bd72
Move TS tests to tsd, part 1 ( #4109 )
2020-11-16 23:55:58 +02:00
Arturs Vonda
f953ff4f8f
Fix types for insert to allow array ( #4105 )
2020-11-02 17:42:51 +02:00
Nico Burns
881c5ee136
Types: Make .ignore() and .merge() return QueryBuilder rather than QueryInterface ( #4102 )
2020-11-02 12:51:38 +02:00
Arturs Vonda
ce0002d106
Global table definitions v2 ( #4100 )
2020-11-01 13:15:58 +02:00
Igor Savin
a849553f87
Revert "Allow to globally define table/record mapping ( #4071 )" ( #4099 )
...
This reverts commit c347408a
2020-11-01 04:00:20 +02:00
Arturs Vonda
c347408a75
Allow to globally define table/record mapping ( #4071 )
2020-10-31 23:48:10 +02:00
Arturs Vonda
041265e0e2
Remove redundant async in tests ( #4091 )
2020-10-31 23:07:26 +02:00
Nico Burns
8d43019873
Implement "UPSERT" (Postgres/MySQL/Sqlite) ( #3763 )
2020-10-31 17:22:52 +02:00
Lorefnon
447e592438
Resolve #3932 : Add a phantom tag to Ref type to mark received type parameters as used ( #3934 )
2020-08-07 18:52:49 +03:00
Richard Eames
f6e403489f
Add null
as valid binding type ( #3946 )
2020-08-07 18:49:24 +03:00
Lorefnon
c35a66d31b
Update signature of orderBy to support QueryBuilder inside array ( #3757 )
...
Fixes #3738
2020-03-25 22:12:38 +01:00
maximelkin
74501e612a
typings: support Raw types for insert, where, update ( #3730 )
2020-03-23 21:26:14 +01:00
Lorefnon
acf56b5922
Fix incorrect type signature of Having ( #3719 )
2020-03-11 12:08:58 +01:00
Lorefnon
8c07192ade
#3653 Mark knex arguments of composite/collection types to be readonly ( #3680 )
...
* Mark knex arguments of composite/collection types to be readonly to make it explicit that knex does not mutate them
This allows users to pass readonly collections as parameters, and helps towards type safety.
Resolves #3653
2020-02-25 01:30:31 +01:00
Lorefnon
75b1db5b4c
Fix incorrect type of QueryBuilder.first('*') result ( #3621 )
2020-01-10 11:23:55 +01:00
Andrew Burgess
2289c08380
Fix queryContext function defintion ( #3562 )
2019-12-04 22:25:57 +01:00
Florent Cailhol
f4099af3fb
Support 'only' option ( #3551 )
2019-11-26 08:35:39 +01:00
Mazharul Onim
115ff3c136
Fix typing file ( #3505 )
2019-11-12 22:09:59 +01:00
Lorefnon
63986fade3
Make the default type parameters of QueryBuilder less strict ( #3520 )
...
Resolves #3519
2019-11-11 00:51:13 +01:00
EthanHur
2d0459111d
orderBy accepts QueryBuilder ( #3491 )
2019-10-24 16:08:12 +02:00
Keith Smith
767904c3a2
Fixes types for Seeder#run ( #3438 )
2019-10-14 16:56:19 +02:00
Lorefnon
b74456492c
Fix Typescript type inference for to better support wildcard (*) calls #3444 ( #3446 )
2019-09-22 23:05:31 +02:00
Lorefnon
6c73b22fd9
Fix some issues with QueryBuilder types ( #3427 )
...
- Add missing typedefs for or and timeout (Closes #3422 )
- Move clone from QueryInterface to QueryBuilder
2019-09-05 23:18:00 +02:00
Felix Mosheev
8111bb3ee8
Feat: Allow to extend knex query builder ( #3334 )
2019-07-23 20:45:03 +02:00
Lorefnon
30c04c166d
Update Knex.raw type to be any by default because the actual type is dialect specific ( #3349 )
2019-07-13 14:50:34 +02:00
Ricardo Graça
9aa7085b05
Rename src directory to lib ( #3338 )
2019-07-10 23:48:43 +02:00
Igor Savin
2ccaf3d724
Remove bluebird promises from typings. Do not pass promise to migrations and seeds. Remove knex.Promise ( #3266 )
2019-06-08 01:16:34 +02:00
Lorefnon
35efad1fa7
Fix some cases of left-to-right inference causing type mismatch ( #3265 )
...
Closes #3260
2019-06-08 00:40:06 +02:00
Lorefnon
0d1fb16240
Improve typings for aggregations ( #3245 )
2019-06-02 22:52:16 +02:00
Lorefnon
9f0da44ef2
Improve count typings ( #3239 )
...
- Make count generic, especially useful when being used with an alias object argument
- In case of alias object, partially infer the return type from the input.
2019-06-01 11:37:02 +02:00
Lorefnon
1b2b6bbf8c
Update type of aggregation results to not be arrays when first had been invoked before ( #3237 )
...
Addresses: https://github.com/tgriesser/knex/issues/3229#issuecomment-497560577
2019-05-31 08:20:48 +02:00
Lorefnon
bd63288d41
Include undefined in Single row results ( #3231 )
2019-05-31 00:03:08 +02:00
Lorefnon
d62d280b4f
Fix incorrect type definitions for single row queries ( #3230 )
...
Closes #3229
2019-05-29 22:48:10 +02:00
Lorefnon
fb91f654b8
Update Knex.Config types to include log ( #3221 )
...
Fixes #3148
2019-05-26 12:53:26 -07:00
Lorefnon
9c6ab963f6
Fix some more cases of missing typings ( #3223 )
...
* Fix some more cases of missing typings
- Add types for Seed API
- Add Knex#initialize (Closes #3192 )
* Relax constraints on raw queries and add tests
2019-05-26 12:52:55 -07:00
Lorefnon
92cb805669
Support type safe refs ( #3215 )
2019-05-21 22:52:13 -07:00
Lorefnon
3b3fdf4c91
Fix issues with typings of joins and some conflicts with Bluebird typings ( #3209 )
2019-05-19 03:53:48 -07:00
Lorefnon
edd807f96c
Resolve more issues around generic typings ( #3208 )
...
- Fix: update, insert, delete didn't support deferring of result resolution unlike select.
So knex.insert(...).into<User>('users') would fall back to any
- Correctly handling cases when deferred selection keys get cleared later eg. multiple returning invocations, clearSelect.
- Fix: first resolves to array member rather than array.
- Add explanations for some of the complex type applications.
2019-05-18 00:47:06 +02:00
Lorefnon
91192fe4c4
Make typings more compatible with previous version ( #3195 )
2019-05-16 22:25:37 +02:00
Igor Savin
cf435d9175
Prepare for 0.16.7 release ( #3190 )
2019-05-12 17:21:40 +02:00
Lorefnon
1f4c8839a6
Add default values for generic types ( #3189 )
2019-05-12 16:32:13 +02:00
Lorefnon
6a4fecfe78
Make function types generic in type definitions ( #3168 )
...
* Make function types generic in type definitions
* Add dtslint and tests for type definitions
2019-05-04 10:34:07 +02:00