Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 1x | import {seq, optPrio, altPrio, regex as reg, Expression, ver} from "../combi";
import {IStatementRunnable} from "../statement_runnable";
import {SQLAsName} from "./sql_as_name";
import {SQLCond} from "./sql_cond";
import {SQLPathJoinType} from "./sql_path_join_type";
import {DatabaseTable} from "./database_table";
import {WithName} from "./with_name";
import {Release} from "../../../version";
export class SQLDefiningNewAssociation extends Expression {
public getRunnable(): IStatementRunnable {
const joinTag = optPrio(reg(/^#[A-Z][A-Z0-9_]*$/i));
const target = altPrio(new DatabaseTable(true), WithName);
return ver(Release.v751, seq(
"JOIN",
joinTag,
optPrio(SQLPathJoinType),
target,
"AS",
SQLAsName,
"ON",
SQLCond,
));
}
}
|