Faire une issue à at-database pour le pattern disposal #2

Open
opened 2021-05-16 16:34:19 +02:00 by florent · 0 comments
Owner

Faire une pull-request pour proposer d'intégrer à at-databases ce bout de code :

  async withDB<Type>(callback: (db: DatabaseConnection) => Promise<Type>): Promise<Type> {
    const db = connect(this.path);
    try {
      return callback(db);
    } finally {
      await db.dispose();
    }
  }
Faire une pull-request pour proposer d'intégrer à at-databases ce bout de code : ```ts async withDB<Type>(callback: (db: DatabaseConnection) => Promise<Type>): Promise<Type> { const db = connect(this.path); try { return callback(db); } finally { await db.dispose(); } } ```
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Outils-PeerTube/listener-rss-aggregator#2
No description provided.