MCPcopy Create free account
hub / github.com/dolthub/doltgresql / GetRole

Function GetRole

server/auth/database.go:74–80  ·  view source on GitHub ↗

GetRole returns the role with the given name. Use RoleExists to determine if the role exists, as this will return a role with the default values set if it does not exist.

(name string)

Source from the content-addressed store, hash-verified

72// GetRole returns the role with the given name. Use RoleExists to determine if the role exists, as this will return a
73// role with the default values set if it does not exist.
74func GetRole(name string) Role {
75 roleID, ok := globalDatabase.rolesByName[name]
76 if !ok {
77 return createDefaultRoleWithoutID(name)
78 }
79 return globalDatabase.rolesByID[roleID]
80}
81
82// RenameRole renames the role with the old name to the new name. If the role does not exist, then this is a no-op.
83func RenameRole(oldName string, newName string) {

Callers 13

handleAuthenticationMethod · 0.92
checkDoltProcedureAccessFunction · 0.92
commonMethod · 0.92
revokeRoleMethod · 0.92
RowIterMethod · 0.92
commonMethod · 0.92
grantRoleMethod · 0.92
RowIterMethod · 0.92
RowIterMethod · 0.92
RowIterMethod · 0.92
RowIterMethod · 0.92
NewQueryStateMethod · 0.85

Calls 1

Tested by

no test coverage detected