001package gudusoft.gsqlparser.ir.semantic.joinanalysis;
002
003/**
004 * How a {@link JoinEntity} was written in the source SQL.
005 *
006 * <ul>
007 *   <li>{@link #EXPLICIT} — a keyword join ({@code JOIN ... ON},
008 *       {@code LEFT JOIN}, {@code CROSS JOIN}, {@code NATURAL JOIN},
009 *       {@code USING (...)}).</li>
010 *   <li>{@link #COMMA} — a comma-FROM cross product
011 *       ({@code FROM a, b}), modelled as
012 *       {@link SemanticJoinType#IMPLICIT_CROSS}.</li>
013 *   <li>{@link #LATERAL} — a lateral join: SQL Server
014 *       {@code CROSS APPLY} / {@code OUTER APPLY} (and reserved for
015 *       ANSI {@code LATERAL} / PostgreSQL lateral). The right operand
016 *       is correlated to the left; the join carries no ON/USING (the
017 *       correlation lives inside the right operand). Pair with
018 *       {@link JoinEntity#isLateral()}.</li>
019 *   <li>{@link #SEMI} — a predicate-derived semi-join: an
020 *       {@code EXISTS} / {@code IN} (or {@code NOT EXISTS} /
021 *       {@code NOT IN}) subquery in a WHERE clause (R8), not a written
022 *       FROM-clause join. Pair with {@link SemanticJoinType#SEMI} /
023 *       {@link SemanticJoinType#ANTI_SEMI}.</li>
024 * </ul>
025 *
026 * <p>Introduced by join-analysis slice 162 (S1).
027 */
028public enum JoinSourceSyntax {
029    EXPLICIT,
030    COMMA,
031    LATERAL,
032    SEMI
033}