Skip to content

Commit

Permalink
refactor: set result same as record initially
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Sep 23, 2019
1 parent 41c4d13 commit cd4206f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions adonis-typings/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,17 @@ declare module '@ioc:Adonis/Lucid/Database' {
*/
query<
Record extends any = any,
Result extends any = any,
Result extends any = Record,
> (): DatabaseQueryBuilderContract<Record, Result> & ExcutableQueryBuilderContract<Result>,

/**
* Get new query builder instance inserts
*/
insertQuery<
Record extends any = any,
ReturnColumns extends any = any[]
> (): InsertQueryBuilderContract<Record, ReturnColumns> & ExcutableQueryBuilderContract<ReturnColumns>,
ReturnColumns extends any = Record
> (
): InsertQueryBuilderContract<Record, ReturnColumns[]> & ExcutableQueryBuilderContract<ReturnColumns[]>,

/**
* Get raw query builder instance
Expand Down Expand Up @@ -553,7 +554,7 @@ declare module '@ioc:Adonis/Lucid/Database' {
*/
query<
Record extends any = any,
Result extends any = any,
Result extends any = Record,
> (
options?: DatabaseClientOptions,
): DatabaseQueryBuilderContract<Record, Result> & ExcutableQueryBuilderContract<Result>,
Expand All @@ -563,7 +564,7 @@ declare module '@ioc:Adonis/Lucid/Database' {
*/
insertQuery<
Record extends any = any,
ReturnColumns extends any = any
ReturnColumns extends any = Record
> (
options?: DatabaseClientOptions,
): InsertQueryBuilderContract<Record, ReturnColumns[]> & ExcutableQueryBuilderContract<ReturnColumns[]>,
Expand Down

0 comments on commit cd4206f

Please sign in to comment.