Interface TableReference

All Superinterfaces:
ColumnReferenceQualifier, SqlAstNode
All Known Implementing Classes:
AbstractTableReference, DerivedTableReference, EmbeddableFunctionTableReference, FunctionTableReference, MutatingTableReference, NamedTableReference, QueryPartTableReference, UnionTableReference, ValuesTableReference

public interface TableReference extends SqlAstNode, ColumnReferenceQualifier
Represents a reference to a table (derived or physical) in a query's from clause.
  • Method Details

    • getIdentificationVariable

      String getIdentificationVariable()
    • getTableId

      String getTableId()
      An identifier for the table reference. May be null if this is not a named table reference.
    • isOptional

      boolean isOptional()
    • accept

      void accept(SqlAstWalker sqlTreeWalker)
      Specified by:
      accept in interface SqlAstNode
    • applyAffectedTableNames

      default void applyAffectedTableNames(Consumer<String> nameCollector)
    • getAffectedTableNames

      default List<String> getAffectedTableNames()
    • containsAffectedTableName

      default boolean containsAffectedTableName(String requestedName)
    • visitAffectedTableNames

      Boolean visitAffectedTableNames(Function<String,Boolean> nameCollector)
    • resolveTableReference

      TableReference resolveTableReference(NavigablePath navigablePath, String tableExpression)
      Description copied from interface: ColumnReferenceQualifier
      Like ColumnReferenceQualifier.getTableReference(NavigablePath, String, boolean), but will throw an exception if no table reference can be found, even after resolving possible table reference joins.
      Specified by:
      resolveTableReference in interface ColumnReferenceQualifier
      Parameters:
      navigablePath - The path for which to look up the table reference, may be null
      tableExpression - The table expression for which to look up the table reference
    • getTableReference

      TableReference getTableReference(NavigablePath navigablePath, String tableExpression, boolean resolve)
      Description copied from interface: ColumnReferenceQualifier
      Returns the table reference for the table expression, or null if not found.
      Specified by:
      getTableReference in interface ColumnReferenceQualifier
      Parameters:
      navigablePath - The path for which to look up the table reference, may be null
      tableExpression - The table expression for which to look up the table reference
      resolve - Whether to potentially create table reference joins for this table group
    • isEmbeddableFunctionTableReference

      default boolean isEmbeddableFunctionTableReference()
    • asEmbeddableFunctionTableReference

      default @Nullable EmbeddableFunctionTableReference asEmbeddableFunctionTableReference()