DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Protected Member Functions | Package Functions | Properties | List of all members
Deveel.Data.Sql.Parser.SqlConstantExpressionNode Class Reference

An node that represents a constant value set within a context of an SQL command. More...

Inheritance diagram for Deveel.Data.Sql.Parser.SqlConstantExpressionNode:
Deveel.Data.Sql.Parser.SqlNode Deveel.Data.Sql.Parser.IExpressionNode Deveel.Data.Sql.Parser.ISqlNode Deveel.Data.Sql.Parser.ISqlNode

Protected Member Functions

override ISqlNode OnChildNode (ISqlNode node)
 During the initialization of the node from the parser, this method is called for every child node added to ChildNodes More...
 
- Protected Member Functions inherited from Deveel.Data.Sql.Parser.SqlNode
virtual void OnNodeInit ()
 After the initialization of the node from the parser, this method is invoked to let the specific initialization to occur. More...
 

Package Functions

 SqlConstantExpressionNode ()
 

Properties

ISqlObject Value [get, private set]
 Gets an immutable instance of ISqlObject that represents the constant value. More...
 
- Properties inherited from Deveel.Data.Sql.Parser.SqlNode
ISqlNode Parent [get, private set]
 Gets the parent of the current node. More...
 
string NodeName [get, private set]
 Gets the name of the node, as expressed in the SQL grammar. More...
 
IEnumerable< ISqlNodeChildNodes [get, private set]
 Gets an immutable list of nodes, children of the current node. More...
 
IEnumerable< TokenTokens [get, private set]
 Gets an immutable list of Token that represent the source of this node. More...
 
string ISqlNode. NodeName [get]
 
ISqlNode ISqlNode. Parent [get]
 
IEnumerable< ISqlNode > ISqlNode. ChildNodes [get]
 
IEnumerable< Token > ISqlNode. Tokens [get]
 
- Properties inherited from Deveel.Data.Sql.Parser.ISqlNode
string NodeName [get]
 Gets the name of the node analyzed from the parser. More...
 
ISqlNode Parent [get]
 Gets a reference to the parent ISqlNode, if any. More...
 
IEnumerable< ISqlNodeChildNodes [get]
 Gets a read-only enumeration of the children nodes, if any. More...
 
IEnumerable< TokenTokens [get]
 Gets an enumeration of the tokens composing the this node. More...
 

Additional Inherited Members

- Public Member Functions inherited from Deveel.Data.Sql.Parser.SqlNode
 SqlNode ()
 

Detailed Description

An node that represents a constant value set within a context of an SQL command.

Definition at line 26 of file SqlConstantExpressionNode.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Parser.SqlConstantExpressionNode.SqlConstantExpressionNode ( )
inlinepackage

Definition at line 27 of file SqlConstantExpressionNode.cs.

27  {
28  }

Member Function Documentation

override ISqlNode Deveel.Data.Sql.Parser.SqlConstantExpressionNode.OnChildNode ( ISqlNode  node)
inlineprotectedvirtual

During the initialization of the node from the parser, this method is called for every child node added to ChildNodes

Reimplemented from Deveel.Data.Sql.Parser.SqlNode.

Definition at line 37 of file SqlConstantExpressionNode.cs.

37  {
38  if (node is SqlKeyNode) {
39  var keyNode = (SqlKeyNode) node;
40  if (String.Equals(keyNode.Text, "true", StringComparison.OrdinalIgnoreCase)) {
41  Value = SqlBoolean.True;
42  } else if (String.Equals(keyNode.Text, "false", StringComparison.OrdinalIgnoreCase)) {
43  Value = SqlBoolean.False;
44  } else if (String.Equals(keyNode.Text, "null", StringComparison.OrdinalIgnoreCase)) {
46  } else {
47  Value = new SqlString(((SqlKeyNode) node).Text.ToCharArray());
48  }
49  } else if (node is IntegerLiteralNode) {
50  Value = new SqlNumber(((IntegerLiteralNode) node).BigValue);
51  } else if (node is NumberLiteralNode) {
52  Value = new SqlNumber(((NumberLiteralNode) node).BigValue);
53  } else if (node is StringLiteralNode) {
54  Value = new SqlString(((StringLiteralNode) node).Value.ToCharArray());
55  }
56 
57  return base.OnChildNode(node);
58  }
A long string in the system.
ISqlObject Value
Gets an immutable instance of ISqlObject that represents the constant value.
static readonly SqlNull Value
Definition: SqlNull.cs:24
Deveel.Data.Sql.Objects.SqlString SqlString
Definition: DataObject.cs:27

Property Documentation

ISqlObject Deveel.Data.Sql.Parser.SqlConstantExpressionNode.Value
getprivate set

Gets an immutable instance of ISqlObject that represents the constant value.

Definition at line 34 of file SqlConstantExpressionNode.cs.


The documentation for this class was generated from the following file: