public class TCreateTableSqlStatement extends TCustomSqlStatement
TCustomSqlStatement.getTargetTable()
returns the created table. getColumnList()
returns columns created in the table.
getTableConstraints()
returns table level constraints if any.
getSubQuery()
returns select statement that generate data for this table.
CREATE TABLE dbo.Employee (EmployeeID int PRIMARY KEY CLUSTERED);Table:dbo.Employee can be fetched from
TCustomSqlStatement.getTargetTable()
or the first element of TCustomSqlStatement.tables
getColumnList()
getTableConstraints()
TCustomSqlStatement#targetTable}, {@link TColumnDefinition}
dbvendor, dummytag, isparsed, joins, parser, plsqlparser, rootNode, sourcetokenlist, sqlstatementtype, tables
Constructor and Description |
---|
TCreateTableSqlStatement(EDbVendor dbvendor) |
Modifier and Type | Method and Description |
---|---|
void |
accept(TParseTreeVisitor v)
Accept a visitor
|
void |
acceptChildren(TParseTreeVisitor v)
Accept a visitor to iterate this class and sub-nodes of this class
|
int |
doParseStatement(TCustomSqlStatement psql) |
TTable |
getAsTable()
Netezza, Teradata, as table name.
|
TColumnDefinitionList |
getColumnList()
columns created in create table statement.
|
TExecutePreparedStatement |
getExecutePreparedStatement() |
THiveRowFormat |
getHiveRowFormat()
Hive, impala table row format
|
THiveTableBuckets |
getHiveTableBuckets()
Hive, Impala table buckets
|
THiveTableFileFormat |
getHiveTableFileFormat()
Hive, Impala table file format
|
THiveTablePartition |
getHiveTablePartition()
Hive, Impala table partition
|
THiveTableProperties |
getHiveTableProperties()
Hive, Impala table properties
|
THiveTableSkewed |
getHiveTableSkewed()
Hive, Impala skewed by clause.
|
TPTNodeList<TIndexDefinition> |
getIndexDefinitions()
Teradata index definition
|
TObjectName |
getLikeTableName()
Greenplum, table used in like clause.
|
TPTNodeList<TMySQLCreateTableOption> |
getMySQLTableOptionList()
MySQL, option used in create table such as engine, auto_increment and etc.
|
TPhysicalProperties |
getPhysicalProperties()
Oracle physical properties
|
TObjectName |
getRowTypeName()
Informix, typename used in of type clause.
|
TSelectSqlStatement |
getSubQuery()
Data of the created table is derived from this select statement.
|
TObjectName |
getSuperTableName()
Informix, table name used in the under clause.
|
TObjectName |
getTableComment()
Hive, Impala, comment of the table.
|
TConstraintList |
getTableConstraints()
table level constraints.
|
EnumSet<ETableKind> |
getTableKinds()
Type of this table
|
TObjectName |
getTableLocation()
Hive, Impala, location of the table.
|
TObjectName |
getTableName()
The first table in
TCustomSqlStatement.tables , this is the same table as TCustomSqlStatement.getTargetTable() |
boolean |
isExternal()
Hive, Impala,Netezza, whether it is a external table
|
boolean |
isExternalTable()
Deprecated.
As of v1.9.7.2 , replace by
isExternal()
Netezza, whether it is a external table |
boolean |
isIfNotExists()
Hive, Impala, if not exists clause
|
void |
setAsTable(TTable asTable) |
void |
setColumnList(TColumnDefinitionList columnList) |
void |
setExecutePreparedStatement(TExecutePreparedStatement executePreparedStatement) |
void |
setExternal(boolean external) |
void |
setExternalTable(boolean externalTable) |
void |
setHiveRowFormat(THiveRowFormat hiveRowFormat) |
void |
setHiveTableBuckets(THiveTableBuckets hiveTableBuckets) |
void |
setHiveTableFileFormat(THiveTableFileFormat hiveTableFileFormat) |
void |
setHiveTablePartition(THiveTablePartition hiveTablePartition) |
void |
setHiveTableProperties(THiveTableProperties hiveTableProperties) |
void |
setHiveTableSkewed(THiveTableSkewed hiveTableSkewed) |
void |
setIfNotExists(boolean ifNotExists) |
void |
setIndexDefinitions(TPTNodeList<TIndexDefinition> indexDefinitions) |
void |
setLikeTableName(TObjectName likeTableName) |
void |
setMySQLTableOptionList(TPTNodeList<TMySQLCreateTableOption> mySQLTableOptionList) |
void |
setRowTypeName(TObjectName rowTypeName) |
void |
setSubQuery(TSelectSqlStatement subQuery) |
void |
setSuperTableName(TObjectName superTableName) |
void |
setTableComment(TObjectName tableComment) |
void |
setTableConstraints(TConstraintList tableConstraints) |
void |
setTableKinds(EnumSet<ETableKind> tableKinds) |
void |
setTableLocation(TObjectName tableLocation) |
void |
setTableName(TObjectName tableName) |
addToTables, addWhereClause, analyzeFromTable, analyzeJoin, analyzeTablename, checkNonQualifiedColumnReferenceInSubQueryOfUplevelStmt, clearError, dochecksyntax, findTable, fireOnMetaDatabaseTableColumn, getAncestorStmt, getCteList, getDaxFunctionStack, getEndlabelName, getErrorCount, getFirstPhysicalTable, getIndexColumns, getJoins, getLabelName, getOrphanColumns, getOutputClause, getParentStmt, getResultColumnList, getReturningClause, getStatements, getSymbolTable, getTables, getTargetTable, getTopClause, getTopStatement, getVariableStack, getWhereClause, isnzplsql, isoracleplsql, ispgplsql, isTableACTE, isverticaplsql, linkColumnReferenceToTable, linkColumnToTable, linkToFirstTable, locateVariableOrParameter, OracleStatementCanBeSeparatedByBeginEndPair, parseerrormessagehandle, parsestatement, searchCTEList, searchDaxVariableInStack, setCteList, setEndlabelName, setLabelName, setOutputClause, setParentStmt, setResultColumnList, setReturningClause, setTargetTable, setTopClause, setVariableStack, setWhereClause, VerticaStatementCanBeSeparatedByBeginEndPair
addAllMyTokensToTokenList, appendString, doParse, fastSetString, getColumnNo, getDummyTag, getEndToken, getGsqlparser, getLineNo, getNodeType, getStartToken, init, init, init, init, init, init, removeAllMyTokensFromTokenList, setDummyTag, setEndToken, setEndToken, setEndToken, setEndToken, setGsqlparser, setIncludingComment, setNodeType, setStartToken, setStartToken, setStartToken, setStartToken, setString, toScript, toString
public TCreateTableSqlStatement(EDbVendor dbvendor)
public TPhysicalProperties getPhysicalProperties()
public void setTableKinds(EnumSet<ETableKind> tableKinds)
public EnumSet<ETableKind> getTableKinds()
public TTable getAsTable()
public boolean isExternalTable()
isExternal()
public TPTNodeList<TIndexDefinition> getIndexDefinitions()
UNIQUE PRIMARY INDEX (storeid, productid, salesdate)
public boolean isExternal()
public THiveRowFormat getHiveRowFormat()
public THiveTableBuckets getHiveTableBuckets()
public THiveTableFileFormat getHiveTableFileFormat()
public THiveTablePartition getHiveTablePartition()
public THiveTableProperties getHiveTableProperties()
public THiveTableSkewed getHiveTableSkewed()
public boolean isIfNotExists()
public TObjectName getLikeTableName()
public TObjectName getTableComment()
public TObjectName getTableLocation()
public TObjectName getRowTypeName()
public TObjectName getSuperTableName()
public TSelectSqlStatement getSubQuery()
TSelectSqlStatement
used in create table.public TExecutePreparedStatement getExecutePreparedStatement()
public TPTNodeList<TMySQLCreateTableOption> getMySQLTableOptionList()
public TObjectName getTableName()
TCustomSqlStatement.tables
, this is the same table as TCustomSqlStatement.getTargetTable()
TCustomSqlStatement.tables
public int doParseStatement(TCustomSqlStatement psql)
doParseStatement
in class TCustomSqlStatement
public TConstraintList getTableConstraints()
public TColumnDefinitionList getColumnList()
public void accept(TParseTreeVisitor v)
TParseTreeNode
accept
in interface Visitable
accept
in class TParseTreeNode
v
- visitor is a descendant class of TParseTreeVisitor
public void acceptChildren(TParseTreeVisitor v)
TParseTreeNode
acceptChildren
in interface Visitable
acceptChildren
in class TParseTreeNode
v
- visitor is a descendant class of TParseTreeVisitor
public void setColumnList(TColumnDefinitionList columnList)
public void setAsTable(TTable asTable)
public void setExternalTable(boolean externalTable)
public void setIndexDefinitions(TPTNodeList<TIndexDefinition> indexDefinitions)
public void setExternal(boolean external)
public void setIfNotExists(boolean ifNotExists)
public void setTableLocation(TObjectName tableLocation)
public void setTableComment(TObjectName tableComment)
public void setHiveTableProperties(THiveTableProperties hiveTableProperties)
public void setHiveTablePartition(THiveTablePartition hiveTablePartition)
public void setHiveTableBuckets(THiveTableBuckets hiveTableBuckets)
public void setHiveTableSkewed(THiveTableSkewed hiveTableSkewed)
public void setHiveRowFormat(THiveRowFormat hiveRowFormat)
public void setHiveTableFileFormat(THiveTableFileFormat hiveTableFileFormat)
public void setLikeTableName(TObjectName likeTableName)
public void setRowTypeName(TObjectName rowTypeName)
public void setSuperTableName(TObjectName superTableName)
public void setSubQuery(TSelectSqlStatement subQuery)
public void setExecutePreparedStatement(TExecutePreparedStatement executePreparedStatement)
public void setMySQLTableOptionList(TPTNodeList<TMySQLCreateTableOption> mySQLTableOptionList)
public void setTableName(TObjectName tableName)
public void setTableConstraints(TConstraintList tableConstraints)
Copyright © 2019. All rights reserved.