public void RevokePrivileges()
        {
            var privs = Privileges.Insert | Privileges.Update;
            var objName = ObjectName.Parse("APP.test_table1");

            var statement = new RevokePrivilegesStatement("user1", privs, objName);
            SerializeAndAssert(statement, (serialized, deserialized) => {
                Assert.IsNotNull(deserialized);
                Assert.IsNotNull(deserialized.ObjectName);
                Assert.IsNotNull(deserialized.Grantee);
                Assert.AreEqual(objName, deserialized.ObjectName);
                Assert.AreEqual(privs, deserialized.Privileges);
                Assert.AreEqual("user1", deserialized.Grantee);
                Assert.IsFalse(deserialized.GrantOption);
            });
        }
Пример #2
0
 protected virtual SqlStatement VisitRevokePrivilege(RevokePrivilegesStatement statement)
 {
     return new RevokePrivilegesStatement(statement.Grantee, statement.Privileges, statement.GrantOption,
         statement.ObjectName, statement.Columns);
 }
Пример #3
0
 protected virtual SqlStatement VisitRevokePrivilege(RevokePrivilegesStatement statement)
 {
     return(new RevokePrivilegesStatement(statement.Grantee, statement.Privileges, statement.GrantOption,
                                          statement.ObjectName, statement.Columns));
 }