MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / Destroy

Method Destroy

worker/db.go:386–395  ·  view source on GitHub ↗

Destroy stop database instance and destroy all data/meta.

()

Source from the content-addressed store, hash-verified

384
385// Destroy stop database instance and destroy all data/meta.
386func (db *Database) Destroy() (err error) {
387 if err = db.Shutdown(); err != nil {
388 return
389 }
390
391 // TODO(xq262144): remove database files, now simply remove whole root dir
392 os.RemoveAll(db.cfg.DataDir)
393
394 return
395}
396
397func (db *Database) writeQuery(request *types.Request) (tracker *x.QueryTracker, response *types.Response, err error) {
398 // check database size first, wal/kayak/chain database size is not included

Callers 2

DropMethod · 0.95
TestDatabaseRecycleFunction · 0.95

Calls 1

ShutdownMethod · 0.95

Tested by 1

TestDatabaseRecycleFunction · 0.76