public void AlertView() { var statement = Sql.AlterView(Sql.Name("foo"), Sql.Select.From("target_tbl")); var command = Provider.GetCommand(statement); Assert.NotNull(command); Assert.Equal("DO\r\n$do$\r\nBEGIN DROP VIEW IF EXISTS \"foo\";\r\nCREATE VIEW \"foo\" AS SELECT * FROM \"target_tbl\";\r\nEND\r\n$do$;", command.CommandText); }
public void AlertView() { var statement = Sql.AlterView(Sql.Name("view1"), Sql.Select.From("test_select2_tbl")); var command = Provider.GetCommand(statement); Assert.IsNotNull(command); Assert.AreEqual("ALTER VIEW `view1` AS SELECT * FROM `test_select2_tbl`;", command.CommandText); }
public void AlertView() { var statement = Sql.AlterView(Sql.Name("foo"), Sql.Select.From("bar")); var text = Provider.GenerateStatement(statement); Assert.IsNotNull(text); Assert.AreEqual("DROP VIEW IF EXISTS \"foo\";\r\nCREATE VIEW \"foo\" AS SELECT * FROM \"bar\";", text); }
public void AlertView() { var statement = Sql.AlterView(Sql.Name("foo"), Sql.Select.From("bar")); var command = Utilities.GetCommand(statement); Assert.NotNull(command); Assert.Equal("ALTER VIEW [foo] AS SELECT * FROM [bar];", command.CommandText); }