Page MenuHomeSealhub

database-clear.ts
No OneTemporary

database-clear.ts

import type { App } from "../main.js";
export async function databaseClear(app: App) {
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,
{},
"just_one" && false
);
}
await app.Datastore.remove(
app.Metadata.db_collection_name,
{},
"just_one" && false
);
}
}

File Metadata

Mime Type
text/x-java
Expires
Tue, Dec 24, 06:33 (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
556312
Default Alt Text
database-clear.ts (471 B)

Event Timeline