Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#64 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
58/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
冷清
技术栈
rust
领域
api, databases

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Rust
星标
3
派生
2
平均合并
22 小时 10 分钟
30 天内合并 PR
58

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tableau/hyper-api-rust 的其他 Issue

查看 tableau/hyper-api-rust 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。