[#6485] [#6931] Just a stylistic change...

This commit is contained in:
lukaseder 2017-12-21 11:02:50 +01:00
parent 53ba0efb38
commit 726d5261f9
2 changed files with 14 additions and 12 deletions

View File

@ -152,13 +152,13 @@ grantStatement = 'GRANT' ( 'SELECT' | 'INSERT' | 'UPDATE' | 'DELETE' ) 'ON' tabl
;
revokeStatement = 'REVOKE'
[ 'GRANT OPTION FOR' ]
(
'SELECT'
| 'INSERT'
| 'UPDATE'
| 'DELETE'
)
[ 'GRANT OPTION FOR' ]
(
'SELECT'
| 'INSERT'
| 'UPDATE'
| 'DELETE'
)
'ON' tableName
'FROM' ( userName | roleName | 'PUBLIC')
;

View File

@ -1340,11 +1340,13 @@ class ParserImpl implements Parser {
parseKeywordIf(ctx, "TABLE");
Table<?> table = parseTableName(ctx);
RevokeOnStep s1 = null;
if (grantOptionFor)
s1 = privileges == null ? ctx.dsl.revokeGrantOptionFor(privilege) : ctx.dsl.revokeGrantOptionFor(privileges);
else
s1 = privileges == null ? ctx.dsl.revoke(privilege) : ctx.dsl.revoke(privileges);
RevokeOnStep s1 = grantOptionFor
? privileges == null
? ctx.dsl.revokeGrantOptionFor(privilege)
: ctx.dsl.revokeGrantOptionFor(privileges)
: privileges == null
? ctx.dsl.revoke(privilege)
: ctx.dsl.revoke(privileges);
parseKeyword(ctx, "FROM");
User user = parseKeywordIf(ctx, "PUBLIC") ? null : parseUser(ctx);