Inheritance: SqlStatement
Example #1
0
        public static void DropType()
        {
            var statement = new DropTypeStatement(ObjectName.Parse("SYS.type1"));

            var sql = statement.ToString();
            var expected = "DROP TYPE SYS.type1";

            Assert.AreEqual(expected, sql);
        }
        public static void DropType()
        {
            var statement = new DropTypeStatement(ObjectName.Parse("SYS.type1"));

            var sql      = statement.ToString();
            var expected = "DROP TYPE SYS.type1";

            Assert.AreEqual(expected, sql);
        }
        public static void DropType_IfExists()
        {
            var statement = new DropTypeStatement(ObjectName.Parse("SYS.type1"), true);

            var sql      = statement.ToString();
            var expected = "DROP TYPE IF EXISTS SYS.type1";

            Assert.AreEqual(expected, sql);
        }
Example #4
0
 protected virtual SqlStatement VisitDropType(DropTypeStatement statement)
 {
     return new DropTypeStatement(statement.TypeName);
 }
Example #5
0
        public static void DropType_IfExists()
        {
            var statement = new DropTypeStatement(ObjectName.Parse("SYS.type1"), true);

            var sql = statement.ToString();
            var expected = "DROP TYPE IF EXISTS SYS.type1";

            Assert.AreEqual(expected, sql);
        }
        public void DropType()
        {
            var typeName = ObjectName.Parse("APP.type1");

            var statement = new DropTypeStatement(typeName);

            SerializeAndAssert(statement, (serialized, deserialized) => {
                Assert.IsNotNull(deserialized);
                Assert.IsNotNull(deserialized.TypeName);
                Assert.AreEqual(typeName, deserialized.TypeName);
            });
        }
Example #7
0
 protected virtual SqlStatement VisitDropType(DropTypeStatement statement)
 {
     return(new DropTypeStatement(statement.TypeName));
 }