Example #1
0
        protected override ISqlNode OnChildNode(ISqlNode node)
        {
            if (node is ObjectNameNode) {
                TableName = ((ObjectNameNode) node).Name;
            } else if (node.NodeName.Equals("insert_source")) {
                var colNode = node.FindByName("column_list_opt");
                if (colNode != null)
                    ColumnNames = colNode.FindNodes<IdentifierNode>().Select(x => x.Text);

                ValuesInsert = node.FindNode<ValuesInsertNode>();
                SetInsert = node.FindNode<SetInsertNode>();
                QueryInsert = node.FindNode<QueryInsertNode>();
            }

            return base.OnChildNode(node);
        }
Example #2
0
 protected override void VisitValuesInsert(ValuesInsertNode valuesInsert)
 {
     var values = valuesInsert.Values.Select(x => x.Values.Select(Expression).ToArray());
     statements.Add(new InsertValuesStatement(valuesInsert.TableName, valuesInsert.ColumnNames, values));
 }
Example #3
0
 protected virtual void VisitValuesInsert(ValuesInsertNode valuesInsert)
 {
 }