Ask coding questions

← Back to all posts
How do I clear all keys from the Database?
maraujogosling (0)

How do I clear all keys from the Database?

Comments
hotnewtop
Coder100 (17091)

Oh that's easy.

const Client = require("@replit/database");
const db = new Client();

db.empty();
alanchen12 (28)

Just loop through all the keys in the dB then delete em. If you tell me what Lang I can provide an example