public class TCreateTenantSqlStatement extends TCustomSqlStatement
CREATE TENANT statement (Phase 4 Batch 1).
Exposes the parsed tenant name, IF NOT EXISTS flag, and the
full tenant option list. Typed convenience accessors
(getPrimaryZone(), getLocality(),
getCharset(), getCompatibilityMode(),
getResourcePoolList()) scan the option list on demand so the
core is not coupled to the exhaustive OceanBase option vocabulary and
future option additions need no code change here.
Statements of this shape are tagged
ESqlStatementType.sstoceanbase_create_tenant per ADR-8.
TAlterTenantSqlStatement,
TDropTenantSqlStatementTCustomSqlStatement.SqlNormalizationProfiledummytag, fromClause, fromSourceJoin, fromSourceTable, isctequery, isparsed, joins, parser, plsqlparser, relationAttributes, rootNode, semicolonended, sourcetokenlist, sqlstatementtype, stmtScope, tablesdbvendor, doubleLinkedTokenListToString, nodeActionAppend, nodeActionInsert, nodeActionRemove, nodeActionUnknown, nodeActionUpdate, nodeActionUpdateText, nodeChangeEndToken, nodeChangeStartToken| Constructor and Description |
|---|
TCreateTenantSqlStatement(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) |
TObjectName |
getCharset() |
TObjectName |
getCompatibilityMode() |
TObjectName |
getLocality() |
TObjectName |
getPrimaryZone() |
ArrayList<TObjectName> |
getResourcePoolList() |
TObjectName |
getTenantName() |
ArrayList<TOceanbaseTenantOption> |
getTenantOptions() |
boolean |
isIfNotExists() |
addToTables, addWhereClause, analyzeFromTable, analyzeFromTable, analyzeJoin, analyzeTablename, analyzeTableOrJoin, asCanonical, checkNonQualifiedColumnReferenceInSubQueryOfUplevelStmt, clearError, computeSqlHash, dochecksyntax, findTable, fireOnMetaDatabaseTableColumn, getAncestorStmt, getAttributes, getColumnsInTable, getColumnsInTable, getCteIncludeThisStmt, getCteList, getDaxFunctionStack, getEndlabelName, getErrorCount, getErrormessage, getExpandedResultColumns, getFirstPhysicalTable, getFrameStack, getFromClause, getFromSourceJoin, getFromSourceTable, getGlobalScope, getIndexColumns, getJoins, getLabelName, getOrphanColumns, getOutputClause, getParentObjectName, getParentStmt, getQueryId, getRelationName, getRelations, getResultColumnList, getReturningClause, getSqlEnv, getSqlHash, getSqlHash, getStatements, getStmtScope, getSymbolTable, getSyntaxErrors, getSyntaxHints, getTables, getTargetTable, getTokenList, getTopClause, getTopStatement, getUsingVariableList, getVariableStack, getWhereClause, isathenaplsql, isBigQueryplsql, isdatabricksplsql, isGaussDBStoredProcedure, isgreeplumplsql, isnzplsql, isoracleplsql, ispgplsql, isprestoplsql, issnowflakeplsql, isTableACTE, isverticaplsql, linkColumnReferenceToTable, linkColumnToTable, linkToFirstTable, locateVariableOrParameter, locateVariableOrParameter, OracleStatementCanBeSeparatedByBeginEndPair, parseerrormessagehandle, parsestatement, parsestatement, searchCTEList, searchDaxVariableInStack, searchFunctionInSQLEnv, setAlreadyAddToParent, setCteIncludeThisStmt, setCteList, setEndlabelName, setFrameStack, setFromClause, setLabelName, setOutputClause, setParentStmt, setParentStmtToNull, setQueryId, setResultColumnList, setReturningClause, setSqlHash, setStmtScope, setTargetTable, setTopClause, setUsingVariableList, setVariableStack, setWhereClause, size, toNormalizedSql, toScript, VerticaStatementCanBeSeparatedByBeginEndPairaddAllMyTokensToTokenList, addToTokenChain, appendNewNode, calculateTokenCount, doAppendNewNode, doParse, fastSetString, getAnchorNode, getColumnNo, getCommentAfterNode, getCommentBeforeNode, getCompactString, getDummyTag, getEndToken, getEvaluateDatatype, getEvalValue, getGsqlparser, getLineNo, getLocation, getMd5, getNodeStatus, getNodeType, getPlainText, getStartToken, getTokenCount, hasNext, init, init, init, init, init, init, init, init, init, init, insertAfterAToken, insertNewNodeBeforeMe, isChanged, isTokensInChain, next, refreshAllNodesTokenCount, remove, removeAllMyTokensFromTokenList, removeTokens, removeTokensBetweenNodes, removeTokensBetweenToken, replaceWithNewNode, resetIterator, setAnchorNode, setChanged, setDummyTag, setEndToken, setEndToken, setEndToken, setEndToken, setEndToken, setEndTokenDirectly, setEvaluateDatatype, setEvalValue, setGsqlparser, setIncludingComment, setLocation, setNewSubNode, setNodeStatus, setNodeType, setParent, setPlainText, setStartToken, setStartToken, setStartToken, setStartToken, setStartTokenDirectly, setString, setString2, subNodeInNode, toString, toString2clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEachRemainingpublic TCreateTenantSqlStatement(EDbVendor dbvendor)
public TObjectName getTenantName()
public boolean isIfNotExists()
public ArrayList<TOceanbaseTenantOption> getTenantOptions()
public TObjectName getPrimaryZone()
PRIMARY_ZONE option, or
null when not specified.public TObjectName getLocality()
LOCALITY option, or
null when not specified.public TObjectName getCharset()
CHARSET option, or
null when not specified.public TObjectName getCompatibilityMode()
SET ob_compatibility_mode = '...' when
present among the tenant options, or null when not
specified. This is how callers distinguish a MySQL-mode
tenant from an Oracle-mode tenant at the DDL level.public ArrayList<TObjectName> getResourcePoolList()
RESOURCE_POOL_LIST = ('p1', 'p2', ...) option, or an
empty list when not specified.public int doParseStatement(TCustomSqlStatement psql)
doParseStatement in class TCustomSqlStatementpublic void accept(TParseTreeVisitor v)
TParseTreeNodeaccept in interface Visitableaccept in class TParseTreeNodev - visitor is a descendant class of TParseTreeVisitorpublic void acceptChildren(TParseTreeVisitor v)
TParseTreeNodeacceptChildren in interface VisitableacceptChildren in class TParseTreeNodev - visitor is a descendant class of TParseTreeVisitor