Package io.trino.sql.tree
Class IntervalLiteral
- java.lang.Object
-
- io.trino.sql.tree.Node
-
- io.trino.sql.tree.Expression
-
- io.trino.sql.tree.Literal
-
- io.trino.sql.tree.IntervalLiteral
-
public class IntervalLiteral extends Literal
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIntervalLiteral.IntervalFieldstatic classIntervalLiteral.Sign
-
Constructor Summary
Constructors Constructor Description IntervalLiteral(NodeLocation location, String value, IntervalLiteral.Sign sign, IntervalLiteral.IntervalField startField, Optional<IntervalLiteral.IntervalField> endField)IntervalLiteral(String value, IntervalLiteral.Sign sign, IntervalLiteral.IntervalField startField)IntervalLiteral(String value, IntervalLiteral.Sign sign, IntervalLiteral.IntervalField startField, Optional<IntervalLiteral.IntervalField> endField)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,C>
Raccept(AstVisitor<R,C> visitor, C context)Accessible forAstVisitor, useAstVisitor.process(Node, Object)instead.booleanequals(Object obj)Optional<IntervalLiteral.IntervalField>getEndField()IntervalLiteral.SigngetSign()IntervalLiteral.IntervalFieldgetStartField()StringgetValue()inthashCode()booleanisYearToMonth()booleanshallowEquals(Node other)Compare with another node by considering internal state excluding any Node returned by getChildren()-
Methods inherited from class io.trino.sql.tree.Literal
getChildren
-
Methods inherited from class io.trino.sql.tree.Expression
toString
-
Methods inherited from class io.trino.sql.tree.Node
getLocation
-
-
-
-
Constructor Detail
-
IntervalLiteral
public IntervalLiteral(String value, IntervalLiteral.Sign sign, IntervalLiteral.IntervalField startField)
-
IntervalLiteral
public IntervalLiteral(String value, IntervalLiteral.Sign sign, IntervalLiteral.IntervalField startField, Optional<IntervalLiteral.IntervalField> endField)
-
IntervalLiteral
public IntervalLiteral(NodeLocation location, String value, IntervalLiteral.Sign sign, IntervalLiteral.IntervalField startField, Optional<IntervalLiteral.IntervalField> endField)
-
-
Method Detail
-
getValue
public String getValue()
-
getSign
public IntervalLiteral.Sign getSign()
-
getStartField
public IntervalLiteral.IntervalField getStartField()
-
getEndField
public Optional<IntervalLiteral.IntervalField> getEndField()
-
isYearToMonth
public boolean isYearToMonth()
-
accept
public <R,C> R accept(AstVisitor<R,C> visitor, C context)
Description copied from class:ExpressionAccessible forAstVisitor, useAstVisitor.process(Node, Object)instead.
-
shallowEquals
public boolean shallowEquals(Node other)
Description copied from class:NodeCompare with another node by considering internal state excluding any Node returned by getChildren()- Overrides:
shallowEqualsin classNode
-
-