mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
allow numbers as the right hand side of a join equality (#14823)
This commit is contained in:
committed by
Mohamed Hegazy
parent
75ffb8e47d
commit
a43da75444
Vendored
+1
-1
@@ -165,7 +165,7 @@ declare namespace Knex {
|
||||
|
||||
interface Join {
|
||||
(raw: Raw): QueryBuilder;
|
||||
(tableName: string, columns: { [key: string]: string | Raw }): QueryBuilder;
|
||||
(tableName: string, columns: { [key: string]: string | number | Raw }): QueryBuilder;
|
||||
(tableName: string, callback: Function): QueryBuilder;
|
||||
(tableName: TableName, raw: Raw): QueryBuilder;
|
||||
(tableName: TableName, column1: string, column2: string): QueryBuilder;
|
||||
|
||||
@@ -188,6 +188,10 @@ knex('users')
|
||||
.join('contacts', 'users.id', '=', 'contacts.user_id')
|
||||
.select('users.id', 'contacts.phone');
|
||||
|
||||
knex('users')
|
||||
.join('contacts', { 'users.id': 12355 })
|
||||
.select('users.id', 'contacts.phone');
|
||||
|
||||
knex('users')
|
||||
.join('contacts', 'users.id', 'contacts.user_id')
|
||||
.select('users.id', 'contacts.phone');
|
||||
|
||||
Reference in New Issue
Block a user