18 using System.Collections.Generic;
20 using System.Linq.Expressions;
25 namespace Deveel.Data.Sql.Parser {
34 public IEnumerable<OrderByNode> OrderBy {
get;
private set; }
39 if (node.
NodeName ==
"sql_query_expression") {
41 }
else if (node.
NodeName ==
"order_opt") {
43 }
else if (node.
NodeName ==
"limit_opt") {
47 return base.OnChildNode(node);
51 var listNode = node.FindByName(
"sorted_def_list");
52 if (listNode != null) {
65 if (QueryExpression.IntoClause != null) {
69 var orderBy = BuildOrderBy(OrderBy);
71 statement.Limit = BuildLimit(Limit);
76 private IEnumerable<SortColumn>
BuildOrderBy(IEnumerable<OrderByNode> nodes) {
void GetLimit(ISqlNode node)
Within an SQL query node, this describes the ordering criteria that will be applied when returning th...
QueryLimit BuildLimit(LimitNode node)
Defines the contract for nodes in an AST model for a SQL grammar analysis and parsing.
string NodeName
Gets the name of the node analyzed from the parser.
static SqlExpression Build(IExpressionNode node)
ICollection< IStatement > Statements
The root node of an expression used to select a set of items from a set of sources defined...
IEnumerable< ISqlNode > ChildNodes
Gets a read-only enumeration of the children nodes, if any.
override ISqlNode OnChildNode(ISqlNode node)
During the initialization of the node from the parser, this method is called for every child node add...
void GetOrderBy(ISqlNode node)
Object used to represent a column in the ORDER BY clauses of a select statement.
IEnumerable< SortColumn > BuildOrderBy(IEnumerable< OrderByNode > nodes)
override void BuildStatement(StatementBuilder builder)