Class Field<T>
java.lang.Object
org.tentackle.dbms.dsl.Field<T>
- Type Parameters:
T- the java type of the column
- All Implemented Interfaces:
Expression<T>, SqlElement
A column of a table.
The name of a field is the column name as defined in the model, i.e. without the
suffix of the second and following columns of a multi-column datatype
(see DataType.getColumnSuffix(Backend, int)). The suffixes are added while rendering.
- Author:
- harald
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetColumnName(Backend backend, int columnIndex) Gets the name of one of the columns of this field.Gets the datatype of this expression.getName()Gets the column name.getTable()Gets the table this field belongs to.voidrender(RenderContext context, int columnIndex) Renders a single column of this expression.
-
Constructor Details
-
Field
-
-
Method Details
-
getTable
Gets the table this field belongs to.- Returns:
- the table, null if unqualified
-
getName
Gets the column name.- Returns:
- the name, without the suffix of multi-column datatypes
-
getColumnName
-
getDataType
Description copied from interface:ExpressionGets the datatype of this expression.- Specified by:
getDataTypein interfaceExpression<T>- Returns:
- the datatype, null if untyped
-
render
Description copied from interface:ExpressionRenders a single column of this expression.- Specified by:
renderin interfaceExpression<T>- Parameters:
context- the render contextcolumnIndex- the column index, 0 for the first column
-