Allow connectors to use async/await
メンテナーはふだん 1 日以内に返信
@markirish がすでに取り組んでいます。
2019年9月24日 から。
評価
この issue はまだ評価されていません。
説明
I would like to allow connector authors to use async functions instead of the current callback style.
Acceptance criteria
- Define a new contract for connector: a connector provides a flag indicating whether it's callback based or async/promise based. We assume callbacks when the flag is not set (backward compatibility).
- All DAO/KVAO methods need to be updated to check what flavor of flow control the connector support and invoke connector methods accordingly. Ideally, there should be a shared helper taking care of implementation details of consuming callback or promise style connectors.
- Rework Connector and SqlConnector classes provided by loopback-connector to use async functions instead of callbacks everywhere. This is a semver-major change.
- Rework the documentation for connector authors to use async functions instead of callbacks.
- Add a new DataSource method
executethat supports dual callback/promise API and under the hood calls connector'sexecutemethod using the correct style (callback/promise) as provided by the connector. EDIT: The method was already added by https://github.com/strongloop/loopback-datasource-juggler/pull/1671, now we need to update it to support async execute provided by the connector.
Out of scope
Eventually we should update all of our connectors to use the new major version of loopback-connector and switch to async functions. There should be follow-up issues opened (one per the connector repository). Note that connectors using async functions become incompatible with LB 3.x projects (because they don't support connectors exporting async functions), the upgrade must be released as semver-major.
- 主要言語
- JavaScript
- スター
- 279
- フォーク
- 362
- 平均マージ
- 21時間 14分
- マージ済み PR(30日)
- 16
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
loopbackio/loopback-datasource-juggler のほかの issue
-
Breaking changes for `loopback-datasource-juggler@7` not listed anywhere再び着手できるかも @dhmlau が 158 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
loopbackio/loopback-datasource-juggler#2548 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
loopbackio/loopback-datasource-juggler#2530 ·
メンテナーはふだん 1 日以内に返信
-
allow empty array in createAll対応中かも @ajay-prajapati07 が 533 日前に担当しました。 オープンfeature
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
loopbackio/loopback-datasource-juggler#2409 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
loopbackio/loopback-datasource-juggler#2319 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
loopbackio/loopback-datasource-juggler#1968 ·
メンテナーはふだん 1 日以内に返信
loopbackio/loopback-datasource-juggler の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
anothaDev/luci-theme-vantage#143 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
kingcharleslzy-ai/dsh-purge#282 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
a-corriger bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
christian-raj/S-Aloha#340 ·
-
area:image documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信