_unloadDatabase unloads and stops the database, but does not remove the in-memory config.
(ctx context.Context, dbName string)
| 1662 | |
| 1663 | // _unloadDatabase unloads and stops the database, but does not remove the in-memory config. |
| 1664 | func (sc *ServerContext) _unloadDatabase(ctx context.Context, dbName string) bool { |
| 1665 | dbCtx := sc._databases[dbName] |
| 1666 | if dbCtx == nil { |
| 1667 | return false |
| 1668 | } |
| 1669 | base.InfofCtx(ctx, base.KeyAll, "Closing db /%s (bucket %q)", base.MD(dbCtx.Name), base.MD(dbCtx.Bucket.GetName())) |
| 1670 | dbCtx.Close(ctx) |
| 1671 | delete(sc._databases, dbName) |
| 1672 | return true |
| 1673 | } |
| 1674 | |
| 1675 | // _removeDatabase unloads and removes all references to the given database. |
| 1676 | func (sc *ServerContext) _removeDatabase(ctx context.Context, dbName string) bool { |
no test coverage detected