Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Implement a Record object #302

Open
anthony-tuininga opened this issue Feb 27, 2024 Discussed in #301 · 2 comments
Open

Implement a Record object #302

anthony-tuininga opened this issue Feb 27, 2024 Discussed in #301 · 2 comments
Labels
enhancement New feature or request

Comments

@anthony-tuininga
Copy link
Member

Discussed in #301

Originally posted by syniex February 27, 2024
Currently, when retrieving results from a database, many of us construct dictionaries from lists of tuples to provide a more convenient API for working with the data. This approach is common but might not be the most efficient.

We could create a Record class in Cython that encapsulates the data returned from the database. This class would allow for easier access to column values and could potentially offer performance benefits over the current approach of using dictionaries.

asyncpg Record API Documentation

@anthony-tuininga anthony-tuininga added the enhancement New feature or request label Feb 27, 2024
@syniex
Copy link

syniex commented Mar 27, 2024

@anthony-tuininga what are your thoughts about this?

@anthony-tuininga
Copy link
Member Author

I am still thinking about it. I need some time to determine how much of a performance hit this would incur. Assuming that is too much of a hit I have some other thoughts on how to allow for an easy opt-in for those who want it -- but I need some time to do some research on these matters. I haven't forgotten about it, though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants