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

Commit

Permalink
Merge pull request #288 from plexidev/fix/prepare-db
Browse files Browse the repository at this point in the history
Fix db not prepared by adding init method
  • Loading branch information
Zelak312 authored Mar 29, 2023
2 parents 0a18b98 + ffd8c66 commit c38ba16
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 c38ba16

Please sign in to comment.