Package org.datanucleus.store.rdbms.sql
Class SQLColumn
- java.lang.Object
-
- org.datanucleus.store.rdbms.sql.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
-
-
Constructor Summary
Constructors Constructor Description SQLColumn(SQLTable table, Column col, DatastoreIdentifier alias)
Constructor for a column reference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DatastoreIdentifier
getAlias()
Column
getColumn()
String
getColumnSelectString()
SQLTable
getTable()
String
toString()
Stringifier method to return this "column" in a form for use in SQL statements.
-
-
-
Field Detail
-
table
protected SQLTable table
The SQL Table that we are selecting columns from.
-
column
protected Column column
The column being referenced.
-
alias
protected DatastoreIdentifier alias
Alias for the column, for use in a SELECT clause.
-
-
Constructor Detail
-
SQLColumn
public SQLColumn(SQLTable table, Column col, DatastoreIdentifier alias)
Constructor for a column reference.- Parameters:
table
- The SQLTable being selectedcol
- The columnalias
- An alias
-
-
Method Detail
-
getTable
public SQLTable getTable()
-
getColumn
public Column getColumn()
-
getAlias
public DatastoreIdentifier getAlias()
-
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.
-
-