Package com.alibaba.druid.sql.ast.expr
Class SQLTimestampExpr
java.lang.Object
com.alibaba.druid.sql.ast.SQLObjectImpl
com.alibaba.druid.sql.ast.SQLExprImpl
com.alibaba.druid.sql.ast.expr.SQLTypeExpr
com.alibaba.druid.sql.ast.expr.SQLDateTypeExpr
com.alibaba.druid.sql.ast.expr.SQLTimestampExpr
- All Implemented Interfaces:
SQLLiteralExpr,SQLValuableExpr,SQLExpr,SQLObject,SQLReplaceable,Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SQLDataTypeprotected Stringprotected Stringprotected booleanFields inherited from class com.alibaba.druid.sql.ast.expr.SQLTypeExpr
dataType, valueFields inherited from class com.alibaba.druid.sql.ast.SQLExprImpl
parenthesized, parenthesizedCountFields inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
attributes, hint, parent, sourceColumn, sourceLine -
Constructor Summary
ConstructorsConstructorDescriptionSQLTimestampExpr(String value) SQLTimestampExpr(Date date) SQLTimestampExpr(Date date, TimeZone timeZone) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaccept0(SQLASTVisitor visitor) booleanaddDay(int delta) booleanaddHour(int delta) booleanaddMiniute(int delta) booleanaddMonth(int delta) static booleanclone()booleangetValue()inthashCode()booleanstatic SQLTimestampExprvoidsetTimeZone(String timeZone) voidvoidvoidvoidsetWithTimeZone(boolean withTimeZone) toString()Methods inherited from class com.alibaba.druid.sql.ast.expr.SQLTypeExpr
computeDataType, getDataType, replace, setDataType, setValueMethods inherited from class com.alibaba.druid.sql.ast.SQLExprImpl
cloneTo, getParenthesizedCount, increaseParenthesizedCount, isParenthesized, setParenthesized, setParenthesizedCountMethods 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, output, putAttribute, setHint, setParent, setSource, setSourceLineMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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, output, putAttribute, setParent, setSource
-
Field Details
-
DATA_TYPE
-
literal
-
timeZone
-
withTimeZone
protected boolean withTimeZone
-
-
Constructor Details
-
SQLTimestampExpr
public SQLTimestampExpr() -
SQLTimestampExpr
-
SQLTimestampExpr
-
SQLTimestampExpr
-
-
Method Details
-
getValue
- Specified by:
getValuein interfaceSQLValuableExpr- Specified by:
getValuein classSQLDateTypeExpr
-
clone
- Specified by:
clonein interfaceSQLExpr- Specified by:
clonein interfaceSQLLiteralExpr- Specified by:
clonein interfaceSQLObject- Specified by:
clonein classSQLDateTypeExpr
-
getDate
-
addDay
public boolean addDay(int delta) -
addMonth
public boolean addMonth(int delta) -
addHour
public boolean addHour(int delta) -
addMiniute
public boolean addMiniute(int delta) -
setValue
-
setValue
-
setValue
-
getTimeZone
-
setTimeZone
-
isWithTimeZone
public boolean isWithTimeZone() -
setWithTimeZone
public void setWithTimeZone(boolean withTimeZone) -
hashCode
public int hashCode()- Overrides:
hashCodein classSQLTypeExpr
-
equals
- Overrides:
equalsin classSQLTypeExpr
-
accept0
- Overrides:
accept0in classSQLTypeExpr
-
toString
- Overrides:
toStringin classSQLObjectImpl
-
getChildren
- Specified by:
getChildrenin interfaceSQLExpr- Overrides:
getChildrenin classSQLTypeExpr
-
check
-
of
-