示例#1
0
        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);
        }
示例#2
0
文件: Views.cs 项目: sk8tz/fluid-sql
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }