Skip to content

Commit c0122a8

Browse files
committed
feat: support assigning roles to a user or role
Refs #1155
1 parent bd7e238 commit c0122a8

File tree

4 files changed

+278
-131
lines changed

4 files changed

+278
-131
lines changed

source/dbstructures.mysql.pas

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3393,6 +3393,8 @@ function TMySqlProvider.GetSql(AId: TQueryId): string;
33933393
qCreateRole: Result := 'CREATE ROLE %s';
33943394
qDropRole: Result := 'DROP ROLE %s';
33953395
qReloadPrivileges: Result := 'FLUSH PRIVILEGES';
3396+
qGrantRole: Result := 'GRANT %s TO %s%s';
3397+
qRevokeRole: Result := 'REVOKE %s FROM %s';
33963398
else Result := inherited;
33973399
end;
33983400
end;

source/dbstructures.pas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ interface
5050
qForeignKeyDrop, qGetTableColumns, qGetCollations, qGetCollationsExtended, qGetCharsets,
5151
qGetReverseForeignKeys, qExplain, qSetTimezone,
5252
qShowFunctionStatus, qShowProcedureStatus, qShowTriggers, qShowEvents, qShowCreateTrigger,
53-
qHelpKeyword, qShowWarnings, qGetEnumTypes, qDropUser, qCreateRole, qDropRole, qReloadPrivileges);
53+
qHelpKeyword, qShowWarnings, qGetEnumTypes,
54+
qDropUser, qCreateRole, qDropRole, qReloadPrivileges, qGrantRole, qRevokeRole);
5455
TSqlProvider = class
5556
strict protected
5657
FNetType: TNetType;

0 commit comments

Comments
 (0)