001package gudusoft.gsqlparser.resolver2.binding;
002
003/**
004 * Clause-attribution enum exposed on {@link BindingReferenceSite}.
005 *
006 * <p>Distinct from {@code gudusoft.gsqlparser.ESqlClause} on purpose — the
007 * public binding API must not couple to AST internals (plan §15 R7). The
008 * package-private {@code BindingClauseMapper} (S6) translates between the two.</p>
009 */
010public enum BindingClause {
011    SELECT,
012    FUNCTION_ARG,
013    JOIN_ON,
014    WHERE,
015    GROUP_BY,
016    HAVING,
017    ORDER_BY,
018    QUALIFY,
019    WINDOW,
020    UPDATE_SET_LHS,
021    UPDATE_SET_RHS,
022    UPDATE_WHERE,
023    DELETE_WHERE,
024    /**
025     * MERGE main {@code ON} predicate. Reserved value — not yet produced by
026     * the S13 mapper. Emitting it requires AST-position discrimination to
027     * avoid misattributing source-side joins inside
028     * {@code MERGE … USING (a JOIN b ON …) s ON …}; deferred to a follow-up
029     * slice. Until then, MERGE main-ON references attribute to
030     * {@link #JOIN_ON}.
031     */
032    MERGE_ON,
033    MERGE_WHEN_MATCHED,
034    MERGE_WHEN_NOT_MATCHED,
035    INSERT_VALUES,
036    /**
037     * INSERT … SELECT body. Reserved value — not yet produced by the S13
038     * mapper. Emitting it requires distinguishing the immediate SELECT
039     * subquery of an INSERT from a CTE body or scalar subquery nested
040     * inside it; deferred to a follow-up slice. Until then, INSERT … SELECT
041     * source references attribute to {@link #SELECT}.
042     */
043    INSERT_SELECT,
044    CTE_BODY,
045    SUBQUERY,
046    OTHER
047}