Package com.arcadedb.query.sql.parser
Class Identifier
- java.lang.Object
-
- com.arcadedb.query.sql.parser.SimpleNode
-
- com.arcadedb.query.sql.parser.Identifier
-
- All Implemented Interfaces:
Node
public class Identifier extends SimpleNode
This class is used to represent all the indentifies in the SQL grammar, ie. class names, property names, index names, variables and so on so forth.Instances of this class are immutable and can be recycled multiple times in the same or in different queries.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
internalAlias
set to true by the query executor/optimizer for internally generated aliases for query optimizationprotected boolean
quoted
protected String
value
-
Fields inherited from class com.arcadedb.query.sql.parser.SimpleNode
children, firstToken, id, lastToken, parent, parser
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Identifier(int id)
Identifier(Identifier copyFrom, boolean quoted)
Identifier(SqlParser p, int id)
Identifier(String content)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Identifier
copy()
static Identifier
deserialize(Result fromResult)
boolean
equals(Object o)
String
getStringValue()
returns the plain string representation of this identifier, with quoting removed from back-ticksString
getValue()
returns the value as is, with back-ticks quoted with backslashint
hashCode()
Result
serialize()
String
toString()
String
toString(String prefix)
void
toString(Map<String,Object> params, StringBuilder builder)
-
Methods inherited from class com.arcadedb.query.sql.parser.SimpleNode
childrenAccept, dump, jjtAccept, jjtAddChild, jjtClose, jjtGetChild, jjtGetFirstToken, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, jjtSetValue
-
-
-
-
Field Detail
-
value
protected String value
-
quoted
protected boolean quoted
-
internalAlias
protected boolean internalAlias
set to true by the query executor/optimizer for internally generated aliases for query optimization
-
-
Constructor Detail
-
Identifier
public Identifier(Identifier copyFrom, boolean quoted)
-
Identifier
public Identifier(String content)
-
Identifier
protected Identifier(int id)
-
Identifier
public Identifier(SqlParser p, int id)
-
-
Method Detail
-
deserialize
public static Identifier deserialize(Result fromResult)
-
getValue
public String getValue()
returns the value as is, with back-ticks quoted with backslash- Overrides:
getValue
in classSimpleNode
- Returns:
-
getStringValue
public String getStringValue()
returns the plain string representation of this identifier, with quoting removed from back-ticks- Returns:
-
toString
public String toString(String prefix)
- Overrides:
toString
in classSimpleNode
-
toString
public String toString()
- Overrides:
toString
in classSimpleNode
-
toString
public void toString(Map<String,Object> params, StringBuilder builder)
- Overrides:
toString
in classSimpleNode
-
copy
public Identifier copy()
- Overrides:
copy
in classSimpleNode
-
serialize
public Result serialize()
-
-