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.SQLTimestampExpr
- All Implemented Interfaces:
SQLLiteralExpr,SQLValuableExpr,SQLExpr,SQLObject,Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SQLDataTypeprotected Stringprotected Stringprotected booleanFields inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
attributes, hint, parent, sourceColumn, sourceLine -
Constructor Summary
ConstructorsConstructorDescriptionSQLTimestampExpr(String literal) 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 SQLTimestampExprvoidsetLiteral(String literal) voidsetLiteral(Date x) voidsetLiteral(Date x, TimeZone timeZone) voidsetTimeZone(String timeZone) voidsetWithTimeZone(boolean withTimeZone) toString()Methods inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
accept, acceptChild, acceptChild, addAfterComment, addAfterComment, addBeforeComment, addBeforeComment, containsAttribute, getAfterCommentsDirect, getAttribute, getAttributes, getAttributesDirect, getBeforeCommentsDirect, getHint, getParent, getSourceColumn, getSourceLine, hasAfterComment, hasBeforeComment, output, output, putAttribute, setHint, setParent, setSourceColumn, 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, hasAfterComment, hasBeforeComment, output, output, putAttribute, setParent
-
Field Details
-
DATA_TYPE
-
literal
-
timeZone
-
withTimeZone
protected boolean withTimeZone
-
-
Constructor Details
-
SQLTimestampExpr
public SQLTimestampExpr() -
SQLTimestampExpr
-
SQLTimestampExpr
-
SQLTimestampExpr
-
-
Method Details
-
clone
- Specified by:
clonein interfaceSQLExpr- Specified by:
clonein interfaceSQLLiteralExpr- Specified by:
clonein interfaceSQLObject- Specified by:
clonein classSQLExprImpl
-
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) -
getValue
- Specified by:
getValuein interfaceSQLValuableExpr
-
getLiteral
-
setLiteral
-
setLiteral
-
setLiteral
-
getTimeZone
-
setTimeZone
-
isWithTimeZone
public boolean isWithTimeZone() -
setWithTimeZone
public void setWithTimeZone(boolean withTimeZone) -
hashCode
public int hashCode()- Specified by:
hashCodein classSQLExprImpl
-
equals
- Specified by:
equalsin classSQLExprImpl
-
accept0
- Specified by:
accept0in classSQLObjectImpl
-
toString
- Overrides:
toStringin classSQLObjectImpl
-
computeDataType
- Specified by:
computeDataTypein interfaceSQLExpr- Overrides:
computeDataTypein classSQLExprImpl
-
getChildren
- Specified by:
getChildrenin interfaceSQLExpr- Overrides:
getChildrenin classSQLExprImpl
-
check
-
of
-