MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / deleteDb

Function deleteDb

packages/baseai/src/utils/memory/db/lib.ts:90–101  ·  view source on GitHub ↗
(dbPath: string)

Source from the content-addressed store, hash-verified

88
89// Delete a database
90export async function deleteDb(dbPath: string): Promise<void> {
91 try {
92 await fs.unlink(dbPath);
93 console.log(`Database at ${dbPath} has been deleted.`);
94 } catch (error) {
95 if ((error as NodeJS.ErrnoException).code === 'ENOENT') {
96 console.log(`No database found at ${dbPath}. Nothing to delete.`);
97 } else {
98 throw error;
99 }
100 }
101}
102
103// Load a database
104export async function loadDb(memoryName: string) {

Callers

nothing calls this directly

Calls 1

logMethod · 0.80

Tested by

no test coverage detected