@@ -117,25 +117,30 @@ export type PgSelectJoinFn<
117117 TDynamic extends boolean ,
118118 TJoinType extends JoinType ,
119119 TIsLateral extends boolean ,
120- > = 'cross' extends TJoinType ? <
121- TJoinedTable extends ( TIsLateral extends true ? Subquery | SQL : PgTable | Subquery | PgViewBase | SQL ) ,
122- TJoinedName extends GetSelectTableName < TJoinedTable > = GetSelectTableName < TJoinedTable > ,
123- > (
124- table : TableLikeHasEmptySelection < TJoinedTable > extends true ? DrizzleTypeError <
125- "Cannot reference a data-modifying statement subquery if it doesn't contain a `returning` clause"
126- >
127- : TJoinedTable ,
128- ) => PgSelectJoin < T , TDynamic , TJoinType , TJoinedTable , TJoinedName >
129- : <
130- TJoinedTable extends ( TIsLateral extends true ? Subquery | SQL : PgTable | Subquery | PgViewBase | SQL ) ,
131- TJoinedName extends GetSelectTableName < TJoinedTable > = GetSelectTableName < TJoinedTable > ,
132- > (
133- table : TableLikeHasEmptySelection < TJoinedTable > extends true ? DrizzleTypeError <
134- "Cannot reference a data-modifying statement subquery if it doesn't contain a `returning` clause"
135- >
136- : TJoinedTable ,
137- on : ( ( aliases : T [ '_' ] [ 'selection' ] ) => SQL | undefined ) | SQL | undefined ,
138- ) => PgSelectJoin < T , TDynamic , TJoinType , TJoinedTable , TJoinedName > ;
120+ > = <
121+ TJoinedTable extends ( TIsLateral extends true ? Subquery | SQL : PgTable | Subquery | PgViewBase | SQL ) ,
122+ TJoinedName extends GetSelectTableName < TJoinedTable > = GetSelectTableName < TJoinedTable > ,
123+ > (
124+ table : TableLikeHasEmptySelection < TJoinedTable > extends true ? DrizzleTypeError <
125+ "Cannot reference a data-modifying statement subquery if it doesn't contain a `returning` clause"
126+ >
127+ : TJoinedTable ,
128+ on : ( ( aliases : T [ '_' ] [ 'selection' ] ) => SQL | undefined ) | SQL | undefined ,
129+ ) => PgSelectJoin < T , TDynamic , TJoinType , TJoinedTable , TJoinedName > ;
130+
131+ export type PgSelectCrossJoinFn <
132+ T extends AnyPgSelectQueryBuilder ,
133+ TDynamic extends boolean ,
134+ TIsLateral extends boolean ,
135+ > = <
136+ TJoinedTable extends ( TIsLateral extends true ? Subquery | SQL : PgTable | Subquery | PgViewBase | SQL ) ,
137+ TJoinedName extends GetSelectTableName < TJoinedTable > = GetSelectTableName < TJoinedTable > ,
138+ > (
139+ table : TableLikeHasEmptySelection < TJoinedTable > extends true ? DrizzleTypeError <
140+ "Cannot reference a data-modifying statement subquery if it doesn't contain a `returning` clause"
141+ >
142+ : TJoinedTable ,
143+ ) => PgSelectJoin < T , TDynamic , 'cross' , TJoinedTable , TJoinedName > ;
139144
140145export type SelectedFieldsFlat = SelectedFieldsFlatBase < PgColumn > ;
141146
0 commit comments