Page MenuHomeSealhub

database-clear.ts
No OneTemporary

database-clear.ts

import type { App } from "../main.js";
export async function databaseClear(app: App): Promise<void> {
if (app.Datastore.db) {
app.Logger.info("TEST APP", "Clearing the database...");
for (const collection_name in app.collections) {
// eslint-disable-next-line no-await-in-loop
await app.Datastore.remove(collection_name, {}, false);
}
await app.Datastore.remove(app.Metadata.db_collection_name, {}, false);
}
}

File Metadata

Mime Type
text/x-java
Expires
Sun, Nov 2, 17:56 (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1002075
Default Alt Text
database-clear.ts (428 B)

Event Timeline