Package com.alibaba.druid.sql.ast
Class SQLObjectImpl
java.lang.Object
com.alibaba.druid.sql.ast.SQLObjectImpl
- All Implemented Interfaces:
SQLObject
- Direct Known Subclasses:
MySqlObjectImpl
,OdpsObjectImpl
,OracleAnalyticWindowing
,OracleSegmentAttributesImpl
,OracleSQLObjectImpl
,OscarObjectImpl
,PGSQLObjectImpl
,SQLAlterCharacter
,SQLAlterIndexStatement.Rebuild
,SQLAlterTableAddClusteringKey
,SQLAlterTableAddColumn
,SQLAlterTableAddConstraint
,SQLAlterTableAddExtPartition
,SQLAlterTableAddIndex
,SQLAlterTableAddPartition
,SQLAlterTableAddSupplemental
,SQLAlterTableAlterColumn
,SQLAlterTableAlterIndex
,SQLAlterTableAnalyzePartition
,SQLAlterTableArchivePartition
,SQLAlterTableBlockSize
,SQLAlterTableChangeOwner
,SQLAlterTableCheckPartition
,SQLAlterTableCoalescePartition
,SQLAlterTableCompression
,SQLAlterTableConvertCharSet
,SQLAlterTableDeleteByCondition
,SQLAlterTableDisableConstraint
,SQLAlterTableDisableKeys
,SQLAlterTableDisableLifecycle
,SQLAlterTableDiscardPartition
,SQLAlterTableDropClusteringKey
,SQLAlterTableDropColumnItem
,SQLAlterTableDropConstraint
,SQLAlterTableDropExtPartition
,SQLAlterTableDropForeignKey
,SQLAlterTableDropIndex
,SQLAlterTableDropKey
,SQLAlterTableDropPartition
,SQLAlterTableDropPrimaryKey
,SQLAlterTableDropSubpartition
,SQLAlterTableEnableConstraint
,SQLAlterTableEnableKeys
,SQLAlterTableEnableLifecycle
,SQLAlterTableExchangePartition
,SQLAlterTableImportPartition
,SQLAlterTableMergePartition
,SQLAlterTableModifyClusteredBy
,SQLAlterTableOptimizePartition
,SQLAlterTablePartition
,SQLAlterTablePartitionCount
,SQLAlterTablePartitionLifecycle
,SQLAlterTablePartitionSetProperties
,SQLAlterTableRebuildPartition
,SQLAlterTableRecoverPartitions
,SQLAlterTableRename
,SQLAlterTableRenameColumn
,SQLAlterTableRenameIndex
,SQLAlterTableRenamePartition
,SQLAlterTableReOrganizePartition
,SQLAlterTableRepairPartition
,SQLAlterTableReplaceColumn
,SQLAlterTableSetComment
,SQLAlterTableSetLifecycle
,SQLAlterTableSetLocation
,SQLAlterTableSetOption
,SQLAlterTableSubpartitionAvailablePartitionNum
,SQLAlterTableSubpartitionLifecycle
,SQLAlterTableTouch
,SQLAlterTableTruncatePartition
,SQLAlterTableUnarchivePartition
,SQLAnnIndex
,SQLArgument
,SQLArrayDataType
,SQLCaseExpr.Item
,SQLCaseStatement.Item
,SQLColumnDefinition
,SQLColumnDefinition.Identity
,SQLCommentHint
,SQLConstraintImpl
,SQLCreateViewStatement.Column
,SQLDataTypeImpl
,SQLDeclareItem
,SQLErrorLoggingClause
,SQLExprHint
,SQLExprImpl
,SQLExternalRecordFormat
,SQLIfStatement.Else
,SQLIfStatement.ElseIf
,SQLIndexDefinition
,SQLIndexOptions
,SQLInsertStatement.ValuesClause
,SQLJoinTableSource.UDJ
,SQLKeep
,SQLLimit
,SQLMapDataType
,SQLMergeStatement.MergeInsertClause
,SQLMergeStatement.MergeUpdateClause
,SQLOrderBy
,SQLOver
,SQLParameter
,SQLPartitionBy
,SQLPartitionRef
,SQLPartitionRef.Item
,SQLPartitionSpec
,SQLPartitionSpec.Item
,SQLPrivilegeItem
,SQLRowDataType
,SQLSelect
,SQLSelectGroupByClause
,SQLSelectItem
,SQLSelectOrderByItem
,SQLSelectQueryBase
,SQLServerObjectImpl
,SQLStatementImpl
,SQLStructDataType
,SQLStructDataType.Field
,SQLSubPartitionBy
,SQLTableDataType
,SQLTableLike
,SQLTableSampling
,SQLTableSourceImpl
,SQLUpdateSetItem
,SQLWindow
,SQLWithSubqueryClause
,SQLZOrderBy
-
Field Summary
Modifier and TypeFieldDescriptionprotected SQLCommentHint
protected SQLObject
protected int
protected int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
accept
(SQLASTVisitor visitor) protected abstract void
protected final void
acceptChild
(SQLASTVisitor visitor, SQLObject child) protected final void
acceptChild
(SQLASTVisitor visitor, List<? extends SQLObject> children) void
addAfterComment
(String comment) void
addAfterComment
(List<String> comments) void
addBeforeComment
(String comment) void
addBeforeComment
(List<String> comments) clone()
boolean
containsAttribute
(String name) getAttribute
(String name) getHint()
int
int
boolean
boolean
void
output
(Appendable buf) void
output
(StringBuffer buf) void
putAttribute
(String name, Object value) void
setHint
(SQLCommentHint hint) void
void
setSourceColumn
(int sourceColumn) void
setSourceLine
(int sourceLine) toString()
-
Field Details
-
parent
-
attributes
-
hint
-
sourceLine
protected int sourceLine -
sourceColumn
protected int sourceColumn
-
-
Constructor Details
-
SQLObjectImpl
public SQLObjectImpl()
-
-
Method Details
-
accept
-
accept0
-
acceptChild
-
acceptChild
-
output
-
output
-
toString
-
getParent
-
setParent
-
getAttributes
- Specified by:
getAttributes
in interfaceSQLObject
-
getAttribute
- Specified by:
getAttribute
in interfaceSQLObject
-
containsAttribute
- Specified by:
containsAttribute
in interfaceSQLObject
-
putAttribute
- Specified by:
putAttribute
in interfaceSQLObject
-
getAttributesDirect
- Specified by:
getAttributesDirect
in interfaceSQLObject
-
addBeforeComment
- Specified by:
addBeforeComment
in interfaceSQLObject
-
addBeforeComment
- Specified by:
addBeforeComment
in interfaceSQLObject
-
getBeforeCommentsDirect
- Specified by:
getBeforeCommentsDirect
in interfaceSQLObject
-
addAfterComment
- Specified by:
addAfterComment
in interfaceSQLObject
-
addAfterComment
- Specified by:
addAfterComment
in interfaceSQLObject
-
getAfterCommentsDirect
- Specified by:
getAfterCommentsDirect
in interfaceSQLObject
-
hasBeforeComment
public boolean hasBeforeComment()- Specified by:
hasBeforeComment
in interfaceSQLObject
-
hasAfterComment
public boolean hasAfterComment()- Specified by:
hasAfterComment
in interfaceSQLObject
-
clone
-
computeDataType
-
getSourceLine
public int getSourceLine() -
setSourceLine
public void setSourceLine(int sourceLine) -
getSourceColumn
public int getSourceColumn() -
setSourceColumn
public void setSourceColumn(int sourceColumn) -
getHint
-
setHint
-