Database opens and returns current instance of database
()
| 298 | |
| 299 | // Database opens and returns current instance of database |
| 300 | func (context *AptlyContext) Database() (database.Storage, error) { |
| 301 | context.Lock() |
| 302 | defer context.Unlock() |
| 303 | |
| 304 | return context._database() |
| 305 | } |
| 306 | |
| 307 | func (context *AptlyContext) _database() (database.Storage, error) { |
| 308 | if context.database == nil { |