CloseDatabase closes the db temporarily
()
| 356 | |
| 357 | // CloseDatabase closes the db temporarily |
| 358 | func (context *AptlyContext) CloseDatabase() error { |
| 359 | context.Lock() |
| 360 | defer context.Unlock() |
| 361 | |
| 362 | if context.database == nil { |
| 363 | return nil |
| 364 | } |
| 365 | |
| 366 | return context.database.Close() |
| 367 | } |
| 368 | |
| 369 | // ReOpenDatabase reopens the db after close |
| 370 | func (context *AptlyContext) ReOpenDatabase() error { |
no test coverage detected