Allow connectors to use async/await
Maintainer thường phản hồi trong vòng 1 ngày
@markirish đang làm issue này rồi.
Từ ngày 24/9/2019.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 279
- Fork
- 362
- Merge trung bình
- 21 giờ 14 phút
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của loopbackio/loopback-datasource-juggler
-
Breaking changes for `loopback-datasource-juggler@7` not listed anywhereCó thể làm lại được @dhmlau đã nhận 158 ngày trước và không có pull request nào đang mở. Đang mởbug
loopbackio/loopback-datasource-juggler#2548 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Replace deprecated util._extend with Object.assign to ensure compatibility with modern Node.jsĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
loopbackio/loopback-datasource-juggler#2530 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
allow empty array in createAllCó thể đã có người làm @ajay-prajapati07 đã nhận 533 ngày trước. Đang mởfeature
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
loopbackio/loopback-datasource-juggler#2409 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
loopbackio/loopback-datasource-juggler#2319 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
loopbackio/loopback-datasource-juggler#1968 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của loopbackio/loopback-datasource-juggler
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
anothaDev/luci-theme-vantage#143 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
kingcharleslzy-ai/dsh-purge#282 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
-
a-corriger bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
christian-raj/S-Aloha#340 ·
-
area:image documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày