public class CreateTable extends AbstractFragment implements SqlStatement, CreateTableFragment
CreateTable statementroot| Constructor and Description |
|---|
CreateTable(String tableName)
Create a new instance of an
CreateTable statement |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(CreateTableVisitor visitor)
Accept a visitor (e.g.
|
CreateTable |
booleanColumn(String columnName)
Add boolean column
|
CreateTable |
charColumn(String columnName,
int length)
Add char column.
|
CreateTable |
dateColumn(String columnName)
Add date column
|
CreateTable |
decimalColumn(String columnName,
int precision,
int scale)
Add decimal column.
|
CreateTable |
doublePrecisionColumn(String columnName)
Add double precision column
|
ColumnsDefinition |
getColumnsDefinition()
Get columns definition of the table.
|
String |
getTableName()
Get the table name
|
CreateTable |
intervalDayToSecondColumn(String columnName,
int yearPrecision,
int millisecondPrecision)
Add interval day to second column.
|
CreateTable |
intervalYearToMonthColumn(String columnName,
int yearPrecision)
Add interval year to month column.
|
CreateTable |
timestampColumn(String columnName)
Add timestamp column
|
CreateTable |
timestampWithLocalTimeZoneColumn(String columnName)
Add timestamp with local time zone column
|
CreateTable |
varcharColumn(String columnName,
int length)
Add varchar column.
|
getRootpublic CreateTable(String tableName)
CreateTable statementtableName - name of the table to createpublic CreateTable booleanColumn(String columnName)
columnName - name of the column to be addedthis for fluent programmingpublic CreateTable charColumn(String columnName, int length)
columnName - name of the column to be addedlength - pre-defined length for stored stringsthis for fluent programmingpublic CreateTable varcharColumn(String columnName, int length)
columnName - name of the column to be addedlength - pre-defined length for stored stringsthis for fluent programmingpublic CreateTable dateColumn(String columnName)
columnName - name of the column to be addedthis for fluent programmingpublic CreateTable decimalColumn(String columnName, int precision, int scale)
columnName - name of the column to be addedprecision - precision for numeric valuescale - scale for numeric valuethis for fluent programmingpublic CreateTable doublePrecisionColumn(String columnName)
columnName - name of the column to be addedthis for fluent programmingpublic CreateTable timestampColumn(String columnName)
columnName - name of the column to be addedthis for fluent programmingpublic CreateTable timestampWithLocalTimeZoneColumn(String columnName)
columnName - name of the column to be addedthis for fluent programmingpublic CreateTable intervalDayToSecondColumn(String columnName, int yearPrecision, int millisecondPrecision)
columnName - name of the column to be addedyearPrecision - year precision valuemillisecondPrecision - millisecond precision valuethis for fluent programmingpublic CreateTable intervalYearToMonthColumn(String columnName, int yearPrecision)
columnName - name of the column to be addedyearPrecision - year precision valuethis for fluent programmingpublic String getTableName()
public ColumnsDefinition getColumnsDefinition()
public void accept(CreateTableVisitor visitor)
CreateTableFragmentaccept in interface CreateTableFragmentvisitor - visitor to acceptCopyright © 2018–2021. All rights reserved.