Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Commit

Permalink
Fix db not prepared by adding init method
Browse files Browse the repository at this point in the history
  • Loading branch information
Zelak312 committed Mar 29, 2023
1 parent 0a18b98 commit ffd8c66
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ export class QuickDB<D = any> {
return this.instance;
}

async init(): Promise<void> {
// TODO: change this to remove prepared and call prepare here instead
await this.prepared;
}

async all<T = D>(): Promise<{ id: string; value: T }[]> {
return this.driver.getAllRows(this.tableName);
}
Expand Down

0 comments on commit ffd8c66

Please sign in to comment.