return true;
}
}
private GrantRevoke parseGrantRevoke(int operationType) {
GrantRevoke command = new GrantRevoke(session);
command.setOperationType(operationType);
boolean isRoleBased = addRoleOrRight(command);
while (readIf(",")) {
boolean next = addRoleOrRight(command);
if (next != isRoleBased) {
throw DbException.get(ErrorCode.ROLES_AND_RIGHT_CANNOT_BE_MIXED);
}
}
if (!isRoleBased) {
if (readIf("ON")) {
do {
Table table = readTableOrView();
command.addTable(table);
} while (readIf(","));
}
}
if (operationType == CommandInterface.GRANT) {
read("TO");
} else {
read("FROM");
}
command.setGranteeName(readUniqueIdentifier());
return command;
}