You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
492 B
18 lines
492 B
import {Join} from './Join.ts'
|
|
import {JoinOperator} from '../../types.ts'
|
|
|
|
/**
|
|
* Query builder class which builds CROSS JOIN statements.
|
|
* @extends Join
|
|
*/
|
|
export class CrossJoin extends Join {
|
|
public readonly operator: JoinOperator = 'CROSS JOIN'
|
|
|
|
sql(level = 0): string {
|
|
const indent = Array(level * 2).fill(' ').join('')
|
|
return [
|
|
`${this.operator} ${this.serialize_table_ref(this.table_ref)}`,
|
|
].filter(Boolean).join(`\n${indent}`)
|
|
}
|
|
}
|