Open
Description
I've been monkey-patching knex to include some lateral join methods but it'd be nice if the library actually supported them. Adding some kind of extra parameter to the existing join methods would be a potentially breaking change, not to mention the existing method signatures aren't all compatible (lateral joins have to use a subquery). So I propose adding 8 additional methods:
- innerJoinLateral
- leftJoinLateral
- leftOuterJoinLateral
- rightJoinLateral
- rightOuterJoinLateral
- outerJoinLateral
- fullOuterJoinLateral
- crossJoinLateral
Signatures would look something like:
(raw: Raw): QueryBuilder;
(subquery: QueryCallback, on: JoinCallback): QueryBuilder;
(subquery: QueryCallback, on: Raw): QueryBuilder;
(subquery: QueryCallback, columns: { [key: string]: string | number | boolean | Raw }): QueryBuilder;
(subquery: QueryCallback, column1: string, column2: string): QueryBuilder;
(subquery: QueryCallback, column1: string, column2: Raw): QueryBuilder;
(subquery: QueryCallback, column1: string, operator: string, column2: string): QueryBuilder;
I can try to put together a PR, but I wanted to confirm this sort of change would be acceptable first.
Metadata
Metadata
Assignees
Labels
No labels