public void WithNoColumns()
        {
            var tableName = ObjectName.Parse("APP.test_table");
            var query = (SqlQueryExpression)SqlExpression.Parse("SELECT 3, 'Antonello', 'Provenzano', NULL, NULL");

            var statement = new InsertSelectStatement(tableName, query);

            Query.ExecuteStatement(statement);

            var table = Query.GetTable(tableName);

            Assert.AreEqual(1, table.RowCount);
        }
Ejemplo n.º 2
0
        public void WithNoColumns()
        {
            var tableName = ObjectName.Parse("APP.test_table");
            var query     = (SqlQueryExpression)SqlExpression.Parse("SELECT 3, 'Antonello', 'Provenzano', NULL, NULL");

            var statement = new InsertSelectStatement(tableName, query);

            Query.ExecuteStatement(statement);

            var table = Query.GetTable(tableName);

            Assert.AreEqual(1, table.RowCount);
        }
        public void WithColumns()
        {
            var tableName = ObjectName.Parse("APP.test_table");
            var query = (SqlQueryExpression) SqlExpression.Parse("SELECT 'Antonello', 'Provenzano', NULL, NULL");
            var columns = new[] {"first_name", "last_name", "birth_date", "active"};

            var statement = new InsertSelectStatement(tableName, columns, query);

            Query.ExecuteStatement(statement);

            var table = Query.GetTable(tableName);

            Assert.AreEqual(1, table.RowCount);
        }
Ejemplo n.º 4
0
        public void WithColumns()
        {
            var tableName = ObjectName.Parse("APP.test_table");
            var query     = (SqlQueryExpression)SqlExpression.Parse("SELECT 'Antonello', 'Provenzano', NULL, NULL");
            var columns   = new[] { "first_name", "last_name", "birth_date", "active" };

            var statement = new InsertSelectStatement(tableName, columns, query);

            Query.ExecuteStatement(statement);

            var table = Query.GetTable(tableName);

            Assert.AreEqual(1, table.RowCount);
        }
Ejemplo n.º 5
0
 protected override SqlStatement VisitInsertSelect(InsertSelectStatement statement)
 {
     return(base.VisitInsertSelect(statement));
 }
Ejemplo n.º 6
0
 protected virtual SqlStatement VisitInsertSelect(InsertSelectStatement statement)
 {
     return new InsertSelectStatement(statement.TableName, statement.ColumnNames, statement.QueryExpression);
 }
Ejemplo n.º 7
0
 protected override SqlStatement VisitInsertSelect(InsertSelectStatement statement)
 {
     return base.VisitInsertSelect(statement);
 }
Ejemplo n.º 8
0
 protected virtual SqlStatement VisitInsertSelect(InsertSelectStatement statement)
 {
     return(new InsertSelectStatement(statement.TableName, statement.ColumnNames, statement.QueryExpression));
 }