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

Function ClearDatabase

server/auth/database.go:51–61  ·  view source on GitHub ↗

ClearDatabase clears the internal database, leaving only the default users. This is primarily for use by tests.

()

Source from the content-addressed store, hash-verified

49
50// ClearDatabase clears the internal database, leaving only the default users. This is primarily for use by tests.
51func ClearDatabase() {
52 clear(globalDatabase.rolesByName)
53 clear(globalDatabase.rolesByID)
54 clear(globalDatabase.databasePrivileges.Data)
55 clear(globalDatabase.schemaPrivileges.Data)
56 clear(globalDatabase.tablePrivileges.Data)
57 clear(globalDatabase.sequencePrivileges.Data)
58 clear(globalDatabase.routinePrivileges.Data)
59 clear(globalDatabase.roleMembership.Data)
60 dbInitDefault()
61}
62
63// DropRole removes the given role from the database. If the role does not exist, then this is a no-op.
64func DropRole(name string) {

Callers 2

CreateServerWithPortFunction · 0.92

Calls 1

dbInitDefaultFunction · 0.85

Tested by

no test coverage detected