Definition at line 24 of file GrantTests.cs.
override IQuery Deveel.Data.Sql.Statements.GrantTests.CreateQuery |
( |
ISession |
session | ) |
|
|
inlineprotectedvirtual |
void Deveel.Data.Sql.Statements.GrantTests.ParseGrantRolesToOneUser |
( |
| ) |
|
|
inline |
Definition at line 50 of file GrantTests.cs.
51 const string sql =
"GRANT admin, data_reader TO test_user";
53 var statements = SqlStatement.Parse(sql);
54 Assert.IsNotNull(statements);
55 Assert.IsNotEmpty(statements);
56 Assert.AreEqual(2, statements.Count());
57 Assert.IsInstanceOf<GrantRoleStatement>(statements.ElementAt(0));
58 Assert.IsInstanceOf<GrantRoleStatement>(statements.ElementAt(1));
60 var first = (GrantRoleStatement) statements.ElementAt(0);
61 Assert.AreEqual(
"admin", first.Role);
62 Assert.AreEqual(
"test_user", first.UserName);
void Deveel.Data.Sql.Statements.GrantTests.ParseGrantToOneUserToOneTable |
( |
| ) |
|
|
inline |
Definition at line 32 of file GrantTests.cs.
33 const string sql =
"GRANT SELECT, DELETE, UPDATE PRIVILEGE ON test_table TO test_user";
35 var statements = SqlStatement.Parse(sql);
36 Assert.IsNotNull(statements);
37 Assert.IsNotEmpty(statements);
38 Assert.AreEqual(3, statements.Count());
39 Assert.IsInstanceOf<GrantPrivilegesStatement>(statements.ElementAt(0));
40 Assert.IsInstanceOf<GrantPrivilegesStatement>(statements.ElementAt(1));
41 Assert.IsInstanceOf<GrantPrivilegesStatement>(statements.ElementAt(2));
43 var first = (GrantPrivilegesStatement) statements.ElementAt(0);
44 Assert.AreEqual(
Privileges.Select, first.Privilege);
45 Assert.AreEqual(
"test_user", first.Grantee);
46 Assert.AreEqual(
"test_table", first.ObjectName.ToString());
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb-nunit/Deveel.Data.Sql.Statements/GrantTests.cs