Add a drop DB function

draft
kimory 2022-10-21 22:54:03 +02:00
parent afe2e12f5f
commit 2a97f2f218
1 changed files with 6 additions and 1 deletions

View File

@ -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)))