Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Async CSV/COPY: import_csv / export_csv / import_text / export_text on AsyncConnection

Đang mở
#64 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
58/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
rust
Lĩnh vực
api, databases

Hướng nghiên cứu

Start in hyperdb-api/src/copy.rs at the listed Connection methods and compare them with AsyncClient::copy_in and copy_out. Review the existing TestConnection patterns in hyperdb-api/tests/ and examples in hyperdb-api/examples/. Done means all six AsyncConnection methods, real Hyper tests for each async path, and an async CSV import/export example with streaming I/O.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Summary

The copy module is sync-only — import_csv, export_csv, import_text, export_text are all defined under impl Connection and have no async counterparts on AsyncConnection. Async users either block-on-thread or fall back to the Arrow path. The underlying primitives (AsyncClient::copy_in / copy_out) already exist, so this is plumbing, not new protocol work.

Current state

All four CSV/text COPY methods live in hyperdb-api/src/copy.rs:

AsyncConnection exposes none of these. Original gap analysis: §4 of docs/RUST_API_GAP_ANALYSIS.md (predecessor repo).

Proposed work

  • Add async equivalents on AsyncConnection: export_csv, export_text, export_csv_string, import_csv, import_csv_with_header, import_text. Use impl AsyncRead/AsyncWrite (from tokio::io) instead of std::io::Read/Write.
  • Mirror the existing sync API surface and behavior exactly — same arguments, same return types, same error semantics.
  • Add tests that exercise each async path against a real Hyper instance (use the existing TestConnection patterns in hyperdb-api/tests/).
  • Add an example under hyperdb-api/examples/ demonstrating async CSV import + export.

Backwards compatibility

Purely additive. New methods on AsyncConnection only.

Performance note

The plumbing path is AsyncClient::copy_in/copy_out (already implemented). The async wrappers should stream through chunked I/O without buffering the full CSV — match the streaming behavior of the sync versions.

Ngôn ngữ chính
Rust
Star
2
Fork
2
Merge trung bình
22 giờ 10 phút
Pull request đã merge (30 ngày)
58

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tableau/hyper-api-rust

Tất cả issue của tableau/hyper-api-rust

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.