- java.lang.Object
-
- net.sf.jsqlparser.statement.create.table.CreateTable
-
public class CreateTable extends java.lang.Object implements Statement
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<ColumnDefinition>
columnDefinitions
private java.util.List<java.lang.String>
columns
private java.util.List<java.lang.String>
createOptionsStrings
private boolean
ifNotExists
private java.util.List<Index>
indexes
private SpannerInterleaveIn
interleaveIn
private Table
likeTable
private boolean
orReplace
private RowMovement
rowMovement
private Select
select
private boolean
selectParenthesis
private Table
table
private java.util.List<java.lang.String>
tableOptionsStrings
private boolean
unlogged
-
Constructor Summary
Constructors Constructor Description CreateTable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T,S>
Taccept(StatementVisitor<T> statementVisitor, S context)
CreateTable
addColumnDefinitions(java.util.Collection<? extends ColumnDefinition> columnDefinitions)
CreateTable
addColumnDefinitions(ColumnDefinition... columnDefinitions)
CreateTable
addColumns(java.lang.String... columns)
CreateTable
addColumns(java.util.Collection<java.lang.String> columns)
CreateTable
addCreateOptionsStrings(java.lang.String... createOptionsStrings)
CreateTable
addCreateOptionsStrings(java.util.Collection<java.lang.String> createOptionsStrings)
CreateTable
addIndexes(java.util.Collection<? extends Index> indexes)
CreateTable
addIndexes(Index... indexes)
java.util.List<ColumnDefinition>
getColumnDefinitions()
java.util.List<java.lang.String>
getColumns()
java.util.List<java.lang.String>
getCreateOptionsStrings()
java.util.List<Index>
getIndexes()
Table
getLikeTable()
RowMovement
getRowMovement()
Select
getSelect()
SpannerInterleaveIn
getSpannerInterleaveIn()
Table
getTable()
java.util.List<java.lang.String>
getTableOptionsStrings()
boolean
isIfNotExists()
boolean
isOrReplace()
boolean
isSelectParenthesis()
boolean
isUnlogged()
void
setColumnDefinitions(java.util.List<ColumnDefinition> list)
void
setColumns(java.util.List<java.lang.String> columns)
void
setCreateOptionsStrings(java.util.List<java.lang.String> createOptionsStrings)
void
setIfNotExists(boolean ifNotExists)
void
setIndexes(java.util.List<Index> list)
void
setLikeTable(Table likeTable, boolean parenthesis)
void
setOrReplace(boolean orReplace)
void
setRowMovement(RowMovement rowMovement)
void
setSelect(Select select, boolean parenthesis)
void
setSelectParenthesis(boolean selectParenthesis)
void
setSpannerInterleaveIn(SpannerInterleaveIn spannerInterleaveIn)
void
setTable(Table table)
void
setTableOptionsStrings(java.util.List<java.lang.String> tableOptionsStrings)
void
setUnlogged(boolean unlogged)
java.lang.String
toString()
CreateTable
withColumnDefinitions(java.util.List<ColumnDefinition> columnDefinitions)
CreateTable
withColumns(java.util.List<java.lang.String> columns)
CreateTable
withCreateOptionsStrings(java.util.List<java.lang.String> createOptionsStrings)
CreateTable
withIfNotExists(boolean ifNotExists)
CreateTable
withIndexes(java.util.List<Index> indexes)
CreateTable
withRowMovement(RowMovement rowMovement)
CreateTable
withSelectParenthesis(boolean selectParenthesis)
CreateTable
withSpannerInterleaveIn(SpannerInterleaveIn spannerInterleaveIn)
CreateTable
withTable(Table table)
CreateTable
withTableOptionsStrings(java.util.List<java.lang.String> tableOptionsStrings)
CreateTable
withUnlogged(boolean unlogged)
-
-
-
Field Detail
-
table
private Table table
-
unlogged
private boolean unlogged
-
createOptionsStrings
private java.util.List<java.lang.String> createOptionsStrings
-
tableOptionsStrings
private java.util.List<java.lang.String> tableOptionsStrings
-
columnDefinitions
private java.util.List<ColumnDefinition> columnDefinitions
-
columns
private java.util.List<java.lang.String> columns
-
indexes
private java.util.List<Index> indexes
-
select
private Select select
-
likeTable
private Table likeTable
-
selectParenthesis
private boolean selectParenthesis
-
ifNotExists
private boolean ifNotExists
-
orReplace
private boolean orReplace
-
rowMovement
private RowMovement rowMovement
-
interleaveIn
private SpannerInterleaveIn interleaveIn
-
-
Method Detail
-
accept
public <T,S> T accept(StatementVisitor<T> statementVisitor, S context)
-
getTable
public Table getTable()
-
setTable
public void setTable(Table table)
-
isUnlogged
public boolean isUnlogged()
-
setUnlogged
public void setUnlogged(boolean unlogged)
-
getColumnDefinitions
public java.util.List<ColumnDefinition> getColumnDefinitions()
- Returns:
- a list of
ColumnDefinition
s of this table.
-
setColumnDefinitions
public void setColumnDefinitions(java.util.List<ColumnDefinition> list)
-
getColumns
public java.util.List<java.lang.String> getColumns()
-
setColumns
public void setColumns(java.util.List<java.lang.String> columns)
-
getTableOptionsStrings
public java.util.List<java.lang.String> getTableOptionsStrings()
- Returns:
- a list of options (as simple strings) of this table definition, as ("TYPE", "=", "MYISAM")
-
setTableOptionsStrings
public void setTableOptionsStrings(java.util.List<java.lang.String> tableOptionsStrings)
-
getCreateOptionsStrings
public java.util.List<java.lang.String> getCreateOptionsStrings()
-
setCreateOptionsStrings
public void setCreateOptionsStrings(java.util.List<java.lang.String> createOptionsStrings)
-
getIndexes
public java.util.List<Index> getIndexes()
- Returns:
- a list of
Index
es (for example "PRIMARY KEY") of this table.
Indexes created with column definitions (as in mycol INT PRIMARY KEY) are not inserted into this list.
-
setIndexes
public void setIndexes(java.util.List<Index> list)
-
getSelect
public Select getSelect()
-
setSelect
public void setSelect(Select select, boolean parenthesis)
-
getLikeTable
public Table getLikeTable()
-
setLikeTable
public void setLikeTable(Table likeTable, boolean parenthesis)
-
isIfNotExists
public boolean isIfNotExists()
-
setIfNotExists
public void setIfNotExists(boolean ifNotExists)
-
isOrReplace
public boolean isOrReplace()
-
setOrReplace
public void setOrReplace(boolean orReplace)
-
isSelectParenthesis
public boolean isSelectParenthesis()
-
setSelectParenthesis
public void setSelectParenthesis(boolean selectParenthesis)
-
getRowMovement
public RowMovement getRowMovement()
-
setRowMovement
public void setRowMovement(RowMovement rowMovement)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
withTable
public CreateTable withTable(Table table)
-
withUnlogged
public CreateTable withUnlogged(boolean unlogged)
-
withCreateOptionsStrings
public CreateTable withCreateOptionsStrings(java.util.List<java.lang.String> createOptionsStrings)
-
withSelectParenthesis
public CreateTable withSelectParenthesis(boolean selectParenthesis)
-
withIfNotExists
public CreateTable withIfNotExists(boolean ifNotExists)
-
withRowMovement
public CreateTable withRowMovement(RowMovement rowMovement)
-
withTableOptionsStrings
public CreateTable withTableOptionsStrings(java.util.List<java.lang.String> tableOptionsStrings)
-
withColumnDefinitions
public CreateTable withColumnDefinitions(java.util.List<ColumnDefinition> columnDefinitions)
-
withColumns
public CreateTable withColumns(java.util.List<java.lang.String> columns)
-
withIndexes
public CreateTable withIndexes(java.util.List<Index> indexes)
-
addCreateOptionsStrings
public CreateTable addCreateOptionsStrings(java.lang.String... createOptionsStrings)
-
addCreateOptionsStrings
public CreateTable addCreateOptionsStrings(java.util.Collection<java.lang.String> createOptionsStrings)
-
addColumnDefinitions
public CreateTable addColumnDefinitions(ColumnDefinition... columnDefinitions)
-
addColumnDefinitions
public CreateTable addColumnDefinitions(java.util.Collection<? extends ColumnDefinition> columnDefinitions)
-
addColumns
public CreateTable addColumns(java.lang.String... columns)
-
addColumns
public CreateTable addColumns(java.util.Collection<java.lang.String> columns)
-
addIndexes
public CreateTable addIndexes(Index... indexes)
-
addIndexes
public CreateTable addIndexes(java.util.Collection<? extends Index> indexes)
-
getSpannerInterleaveIn
public SpannerInterleaveIn getSpannerInterleaveIn()
-
setSpannerInterleaveIn
public void setSpannerInterleaveIn(SpannerInterleaveIn spannerInterleaveIn)
-
withSpannerInterleaveIn
public CreateTable withSpannerInterleaveIn(SpannerInterleaveIn spannerInterleaveIn)
-
-