18 using System.Collections.Generic;
24 namespace Deveel.Data.Sql.Parser {
26 public string TableName {
get;
private set; }
28 public IEnumerable<string> ColumnNames {
get;
private set; }
38 TableName = ((ObjectNameNode) node).Name;
39 }
else if (node.
NodeName.Equals(
"insert_source")) {
40 var colNode = node.FindByName(
"column_list_opt");
42 ColumnNames = colNode.FindNodes<
IdentifierNode>().Select(x => x.Text);
53 if (ValuesInsert != null) {
54 var valueInsert = ValuesInsert;
58 }
else if (SetInsert != null) {
59 var assignments = SetInsert.Assignments;
61 var columnNames =
new List<string>();
62 var values =
new List<SqlExpression>();
63 foreach (var assignment
in assignments) {
64 var columnName = assignment.ColumnName;
67 columnNames.
Add(columnName);
72 }
else if (QueryInsert != null) {
73 var queryInsert = QueryInsert;
75 if (queryExpression == null)
This is a simple identifier within a SQL grammar.
Defines the contract for nodes in an AST model for a SQL grammar analysis and parsing.
Represents a composed name for an object within the system.
string NodeName
Gets the name of the node analyzed from the parser.
static SqlExpression Build(IExpressionNode node)
ICollection< IStatement > Statements
static SqlBinaryExpression Add(SqlExpression left, SqlExpression right)
override void BuildStatement(StatementBuilder builder)
override ISqlNode OnChildNode(ISqlNode node)
During the initialization of the node from the parser, this method is called for every child node add...
override ISqlNode OnChildNode(ISqlNode node)
During the initialization of the node from the parser, this method is called for every child node add...
An error that occurs when compiling a input string into a SQL object.