Package com.alibaba.druid.sql.ast
Class SQLObjectImpl
- java.lang.Object
-
- com.alibaba.druid.sql.ast.SQLObjectImpl
-
- All Implemented Interfaces:
SQLObject
- Direct Known Subclasses:
BigQuerySelectQueryBlock.DifferentialPrivacy,DorisObjectImpl,GaussDbObjectImpl,MySqlObjectImpl,OdpsObjectImpl,OracleAnalyticWindowing,OracleSegmentAttributesImpl,OracleSQLObjectImpl,OscarObjectImpl,PGSQLObjectImpl,RedshiftObjectImpl,SQLAlterCharacter,SQLAlterIndexStatement.Rebuild,SQLAlterTableAddClusteringKey,SQLAlterTableAddColumn,SQLAlterTableAddConstraint,SQLAlterTableAddExtPartition,SQLAlterTableAddIndex,SQLAlterTableAddPartition,SQLAlterTableAddSupplemental,SQLAlterTableAlterColumn,SQLAlterTableAlterIndex,SQLAlterTableAnalyzePartition,SQLAlterTableArchive,SQLAlterTableArchivePartition,SQLAlterTableAttachPartition,SQLAlterTableBlockSize,SQLAlterTableChangeOwner,SQLAlterTableCheckPartition,SQLAlterTableCoalescePartition,SQLAlterTableCompression,SQLAlterTableConvertCharSet,SQLAlterTableDeleteByCondition,SQLAlterTableDetachPartition,SQLAlterTableDisableConstraint,SQLAlterTableDisableKeys,SQLAlterTableDisableLifecycle,SQLAlterTableDiscardPartition,SQLAlterTableDropCheck,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,SQLAlterTableRenameConstraint,SQLAlterTableRenameIndex,SQLAlterTableRenamePartition,SQLAlterTableReOrganizePartition,SQLAlterTableRepairPartition,SQLAlterTableReplaceColumn,SQLAlterTableSetComment,SQLAlterTableSetFileFormat,SQLAlterTableSetLifecycle,SQLAlterTableSetLocation,SQLAlterTableSetOption,SQLAlterTableSetSchema,SQLAlterTableSetSerde,SQLAlterTableSetSerdeProperties,SQLAlterTableSetTableSpace,SQLAlterTableSubpartitionAvailablePartitionNum,SQLAlterTableSubpartitionLifecycle,SQLAlterTableTouch,SQLAlterTableTruncatePartition,SQLAlterTableUnarchivePartition,SQLAlterTableValidateConstraint,SQLAnnIndex,SQLArgument,SQLArrayDataType,SQLCaseExpr.Item,SQLCaseStatement.Item,SQLColumnDefinition,SQLColumnDefinition.Identity,SQLCommentHint,SQLConstraintImpl,SQLCreateViewStatement.Column,SQLDataTypeImpl,SQLDeclareItem,SQLErrorLoggingClause,SQLExceptionStatement.Item,SQLExprHint,SQLExprImpl,SQLExternalRecordFormat,SQLIfStatement.Else,SQLIfStatement.ElseIf,SQLIndexDefinition,SQLIndexOptions,SQLInsertStatement.ValuesClause,SQLJoinTableSource.UDJ,SQLKeep,SQLLimit,SQLMapDataType,SQLMergeStatement.When,SQLOrderBy,SQLOver,SQLParameter,SQLPartition,SQLPartitionBy,SQLPartitionOf,SQLPartitionRef,SQLPartitionRef.Item,SQLPartitionSpec,SQLPartitionSpec.Item,SQLPivot,SQLPrivilegeItem,SQLRowDataType,SQLSelect,SQLSelectGroupByClause,SQLSelectQueryBase,SQLSelectQueryTemplate,SQLServerObjectImpl,SQLStatementImpl,SQLStructDataType,SQLStructDataType.Field,SQLSubPartitionBy,SQLTableDataType,SQLTableLike,SQLTableSampling,SQLTableSourceImpl,SQLTop,SQLUnpivot,SQLUpdateSetItem,SQLWindow,SQLWithSubqueryClause,SQLZOrderBy,StarRocksIndexDefinition,TDNormalize
public abstract class SQLObjectImpl extends Object implements SQLObject
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Object>attributesprotected SQLCommentHinthintprotected SQLObjectparentprotected intsourceColumnprotected intsourceLine
-
Constructor Summary
Constructors Constructor Description SQLObjectImpl()
-
Method Summary
-
-
-
Field Detail
-
parent
protected SQLObject parent
-
hint
protected SQLCommentHint hint
-
sourceLine
protected int sourceLine
-
sourceColumn
protected int sourceColumn
-
-
Method Detail
-
cloneTo
protected void cloneTo(SQLObjectImpl x)
-
accept
public final void accept(SQLASTVisitor visitor)
-
accept0
protected abstract void accept0(SQLASTVisitor v)
-
acceptChild
protected final void acceptChild(SQLASTVisitor visitor, List<? extends SQLObject> children)
-
acceptChild
protected final void acceptChild(SQLASTVisitor visitor, SQLObject child)
-
output
public void output(StringBuilder buf)
-
getAttributes
public Map<String,Object> getAttributes()
- Specified by:
getAttributesin interfaceSQLObject
-
getAttribute
public Object getAttribute(String name)
- Specified by:
getAttributein interfaceSQLObject
-
containsAttribute
public boolean containsAttribute(String name)
- Specified by:
containsAttributein interfaceSQLObject
-
putAttribute
public void putAttribute(String name, Object value)
- Specified by:
putAttributein interfaceSQLObject
-
getAttributesDirect
public Map<String,Object> getAttributesDirect()
- Specified by:
getAttributesDirectin interfaceSQLObject
-
addBeforeComment
public void addBeforeComment(String comment)
- Specified by:
addBeforeCommentin interfaceSQLObject
-
addBeforeComment
public void addBeforeComment(List<String> comments)
- Specified by:
addBeforeCommentin interfaceSQLObject
-
getBeforeCommentsDirect
public List<String> getBeforeCommentsDirect()
- Specified by:
getBeforeCommentsDirectin interfaceSQLObject
-
addAfterComment
public void addAfterComment(String comment)
- Specified by:
addAfterCommentin interfaceSQLObject
-
addAfterComment
public void addAfterComment(List<String> comments)
- Specified by:
addAfterCommentin interfaceSQLObject
-
getAfterCommentsDirect
public List<String> getAfterCommentsDirect()
- Specified by:
getAfterCommentsDirectin interfaceSQLObject
-
hasBeforeComment
public boolean hasBeforeComment()
- Specified by:
hasBeforeCommentin interfaceSQLObject
-
hasAfterComment
public boolean hasAfterComment()
- Specified by:
hasAfterCommentin interfaceSQLObject
-
clone
public SQLObject clone()
-
computeDataType
public SQLDataType computeDataType()
-
getSourceLine
public int getSourceLine()
- Specified by:
getSourceLinein interfaceSQLObject
-
setSourceLine
public void setSourceLine(int sourceLine)
-
getSourceColumn
public int getSourceColumn()
- Specified by:
getSourceColumnin interfaceSQLObject
-
setSource
public void setSource(int line, int column)
-
getHint
public SQLCommentHint getHint()
-
setHint
public void setHint(SQLCommentHint hint)
-
-