Enhancement: Parsed connection strings proxy
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, typescript
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Start with the parseSqlConnectionString entry point and review the linked MDN Proxy reference. The requested result should support the shown host, port, proto, alias, and case-insensitive property access while retaining the original connection-string values; the issue does not name any files or tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy
Ideally a connection object should add some layer of abstraction around the parsed connection string. This would result in more than a simple map of key value pairs being returned and instead the object being queried and parsed in a more helpful way.
eg:
const { parseSqlConnectionString } = require('@tediousjs/connection-string');
const connStr = "Data Source=tcp:mydomain.com,1433";
const connectionObj = parseSqlConnectionString(connStr);
console.log(connectionObj.host); // mydomain.com
console.log(connectionObj.port); // 1433
console.log(connectionObj.proto); // tcp
console.log(connectionObj['data source']); // tcp:mydomain.com,1433
console.log(connectionObj.Addr); // tcp:mydomain.com,1433
This could be implemented as
const connStr = "Data Source=tcp:mydomain.com,1433";
const connectionObj = parseSqlConnectionString(connStr);
return new Proxy(connectionObj, {
get: (target, prop, receiver) => {
// special handling for some cases like alias props
// special handling for computed props (eg: host, proto, port)
// return case insensitive look up
}
});
- Ngôn ngữ chính
- TypeScript
- Star
- 9
- Fork
- 6
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 tediousjs/connection-string
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
tediousjs/connection-string#279 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
tediousjs/connection-string#6 · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của tediousjs/connection-string
Issue tương tự
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
inu-appcenter/memorIN-frontend#106 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 7 ngày
-
[Bug] @deck.gl/arcgis dist import resolves to unpublished @deck.gl/core source path (9.3.11, 9.4.0)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
fix: CopyFilters ignores tabĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
CSCfi/sd-search-ui#145 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: Cbeebies pl SDĐang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày