public void WithNoColumns() { var tableName = ObjectName.Parse("APP.test_table"); var query = (SqlQueryExpression)SqlExpression.Parse("SELECT 3, 'Antonello', 'Provenzano', NULL, NULL"); var count = AdminQuery.InsertSelect(tableName, query); Assert.AreEqual(1, count); var table = AdminQuery.Access().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 count = AdminQuery.InsertSelect(tableName, columns, query); Assert.AreEqual(1, count); var table = AdminQuery.Access().GetTable(tableName); Assert.AreEqual(1, table.RowCount); }