Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Derive Clone for Row #1152

Merged
merged 1 commit into from
Jul 6, 2024
Merged

Conversation

levkk
Copy link
Contributor

@levkk levkk commented Jul 6, 2024

Feature

Derive a Clone implementation for tokio_postgres::Row.

Use case

I want to clone the row. I can't see why I shouldn't be able to, the actual data is stored in bytes::Bytes, which is made to be cloned, and the Statement (including columns, etc) is behind an Arc, which is exactly the same as bytes::Bytes.

Workarounds

I could place the row in an Arc, but that would be pretty silly since underneath it would be two Arcs stored inside another Arc.

@sfackler sfackler merged commit f9c2d5c into sfackler:master Jul 6, 2024
3 of 4 checks passed
@levkk levkk deleted the levkk-add-clone-to-row branch July 6, 2024 21:23
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants