Inheritance: SqlStatement
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 protected virtual SqlStatement VisitDropType(DropTypeStatement statement)
 {
     return new DropTypeStatement(statement.TypeName);
 }
Exemplo n.º 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);
            });
        }
Exemplo n.º 7
0
 protected virtual SqlStatement VisitDropType(DropTypeStatement statement)
 {
     return(new DropTypeStatement(statement.TypeName));
 }