diff --git a/src/main.lisp b/src/main.lisp index a89a6ae..fcd262c 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -10,7 +10,8 @@ :db/del ; del a value from the DB :db/get-by-index ; :db/get-by-partition ; - :db-data ; + :db/drop-everything ; + :db-data ; )) (in-package dodb) @@ -278,3 +279,7 @@ (maphash #'(lambda (partition-name fsymbol) (db/partition/update dbpath partition-name fsymbol object file-basename old-object)) (db-partitions database)))) + +(defun db/drop-everything (database) + (osicat:delete-directory-and-files (db-path database)) + (clrhash (db-data database)))