CrossJoin
A Join subclass that hard-codes JoinType.CROSS, rendering cross join. See the
Joins guide for a full walkthrough.
Constructor
CrossJoin(table: string | TableName | Select | Raw): CrossJoin
new CrossJoin(table: string | TableName | Select | Raw): CrossJoin
Dual-callable. Equivalent to Join(JoinType.CROSS, table).
import { CrossJoin, Select } from '@sqb/builder';
Select().from('t1').join(CrossJoin('t2'));
// ... cross join t2
Properties
Inherits every property from Join (_type, _joinType, _table,
_conditions); _joinType is always JoinType.CROSS. A cross join carries conditions set via
.on() like any other join, though a CROSS JOIN has no ON clause in standard SQL — omit
.on() for a plain cross join.
Methods
Inherits .on() from Join; CrossJoin adds no methods of its own.