Class SQLColumn


  • public class SQLColumn
    extends Object
    Representation of a column reference in an SQL statement. Has a column, and an optional alias. TODO Merge this with ColumnExpression
    • Field Detail

      • table

        protected SQLTable table
        The SQL Table that we are selecting columns from.
      • column

        protected Column column
        The column being referenced.
    • Constructor Detail

      • SQLColumn

        public SQLColumn​(SQLTable table,
                         Column col,
                         DatastoreIdentifier alias)
        Constructor for a column reference.
        Parameters:
        table - The SQLTable being selected
        col - The column
        alias - An alias
    • Method Detail

      • getColumn

        public Column getColumn()
      • getColumnSelectString

        public String getColumnSelectString()
      • toString

        public String toString()
        Stringifier method to return this "column" in a form for use in SQL statements. This can be of the following form(s)
         TABLEALIAS.MYCOLUMN AS COLUMNALIAS
         MYTABLE.MYCOLUMN AS COLUMNALIAS
         TABLEALIAS.MYCOLUMN
         MYTABLE.MYCOLUMN
         
        Also applies any "select-function" defined on the Column.
        Overrides:
        toString in class Object
        Returns:
        The String form for use