Package com.alibaba.druid.sql.ast.expr
Class SQLCharExpr
- java.lang.Object
-
- com.alibaba.druid.sql.ast.SQLObjectImpl
-
- com.alibaba.druid.sql.ast.SQLExprImpl
-
- com.alibaba.druid.sql.ast.expr.SQLTextLiteralExpr
-
- com.alibaba.druid.sql.ast.expr.SQLCharExpr
-
- All Implemented Interfaces:
SQLLiteralExpr,SQLValuableExpr,SQLExpr,SQLObject,Cloneable,Comparable<SQLCharExpr>
- Direct Known Subclasses:
BigQueryCharExpr,MySqlCharExpr,PGCharExpr
public class SQLCharExpr extends SQLTextLiteralExpr implements SQLValuableExpr, Comparable<SQLCharExpr>
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringcollatestatic SQLDataTypeDATA_TYPE-
Fields inherited from class com.alibaba.druid.sql.ast.expr.SQLTextLiteralExpr
text
-
Fields inherited from class com.alibaba.druid.sql.ast.SQLExprImpl
parenthesized, parenthesizedCount
-
Fields inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
attributes, hint, parent, sourceColumn, sourceLine
-
-
Constructor Summary
Constructors Constructor Description SQLCharExpr()SQLCharExpr(String text)SQLCharExpr(String text, SQLObject parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaccept0(SQLASTVisitor visitor)SQLCharExprclone()intcompareTo(SQLCharExpr o)SQLDataTypecomputeDataType()List<SQLObject>getChildren()StringgetCollate()ObjectgetValue()voidoutput(StringBuilder buf)voidsetCollate(String collate)SQLDateExprtoDate()SQLDateTimeExprtoDateTime()StringtoString()SQLTimestampExprtoTimestamp()-
Methods inherited from class com.alibaba.druid.sql.ast.expr.SQLTextLiteralExpr
equals, getText, hashCode, setText
-
Methods inherited from class com.alibaba.druid.sql.ast.SQLExprImpl
cloneTo, getParenthesizedCount, increaseParenthesizedCount, isParenthesized, setParenthesized, setParenthesizedCount
-
Methods inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
accept, acceptChild, acceptChild, addAfterComment, addAfterComment, addBeforeComment, addBeforeComment, cloneTo, containsAttribute, getAfterCommentsDirect, getAttribute, getAttributes, getAttributesDirect, getBeforeCommentsDirect, getHint, getParent, getParent, getSourceColumn, getSourceLine, hasAfterComment, hasBeforeComment, putAttribute, setHint, setParent, setSource, setSourceLine
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.alibaba.druid.sql.ast.SQLObject
accept, addAfterComment, addAfterComment, addBeforeComment, addBeforeComment, containsAttribute, getAfterCommentsDirect, getAttribute, getAttributes, getAttributesDirect, getBeforeCommentsDirect, getParent, getParent, getSourceColumn, getSourceLine, hasAfterComment, hasBeforeComment, putAttribute, setParent, setSource
-
-
-
-
Field Detail
-
DATA_TYPE
public static final SQLDataType DATA_TYPE
-
collate
protected String collate
-
-
Method Detail
-
getCollate
public String getCollate()
-
setCollate
public void setCollate(String collate)
-
output
public void output(StringBuilder buf)
- Specified by:
outputin interfaceSQLObject- Overrides:
outputin classSQLObjectImpl
-
accept0
protected void accept0(SQLASTVisitor visitor)
- Specified by:
accept0in classSQLObjectImpl
-
getValue
public Object getValue()
- Specified by:
getValuein interfaceSQLValuableExpr
-
toString
public String toString()
- Overrides:
toStringin classSQLObjectImpl
-
clone
public SQLCharExpr clone()
- Specified by:
clonein interfaceSQLExpr- Specified by:
clonein interfaceSQLLiteralExpr- Specified by:
clonein interfaceSQLObject- Specified by:
clonein classSQLTextLiteralExpr
-
computeDataType
public SQLDataType computeDataType()
- Specified by:
computeDataTypein interfaceSQLExpr- Overrides:
computeDataTypein classSQLExprImpl
-
getChildren
public List<SQLObject> getChildren()
- Specified by:
getChildrenin interfaceSQLExpr- Overrides:
getChildrenin classSQLTextLiteralExpr
-
toDate
public SQLDateExpr toDate()
-
toDateTime
public SQLDateTimeExpr toDateTime()
-
toTimestamp
public SQLTimestampExpr toTimestamp()
-
compareTo
public int compareTo(SQLCharExpr o)
- Specified by:
compareToin interfaceComparable<SQLCharExpr>
-
-