Class FromTableDef

java.lang.Object
com.mckoi.database.interpret.FromTableDef
All Implemented Interfaces:
Serializable, Cloneable

public final class FromTableDef extends Object implements Serializable, Cloneable
Describes a single table declaration in the from clause of a table expression (SELECT).
Author:
Tobias Downer
See Also:
  • Constructor Details

    • FromTableDef

      public FromTableDef(String table_name, String table_alias)
      Constructs the table def. The constructs a table that is aliased under a different name.
    • FromTableDef

      public FromTableDef(String table_name)
      A simple table definition (not aliased).
    • FromTableDef

      public FromTableDef(TableSelectExpression select, String table_alias)
      A table that is a sub-query and given an aliased name.
    • FromTableDef

      public FromTableDef(TableSelectExpression select)
      A simple sub-query table definition (not aliased).
  • Method Details

    • setUniqueKey

      public void setUniqueKey(String unique_key)
      Sets the unique key.
    • getName

      public String getName()
      Returns the name of the table.
    • getAlias

      public String getAlias()
      Returns the alias for this table (or null if no alias given).
    • getUniqueKey

      public String getUniqueKey()
      Returns the unique key.
    • isSubQueryTable

      public boolean isSubQueryTable()
      Returns true if this item in the FROM clause is a subquery table.
    • getTableSelectExpression

      public TableSelectExpression getTableSelectExpression()
      Returns the TableSelectExpression if this is a subquery table.
    • prepareExpressions

      public void prepareExpressions(ExpressionPreparer preparer) throws DatabaseException
      Prepares the expressions in this table def.
      Throws:
      DatabaseException
    • clone

      public Object clone() throws CloneNotSupportedException
      Clones the object (deep clone of immutable members).
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException