Implement a Record object
Discussed in https://github.com/oracle/python-oracledb/discussions/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.
@anthony-tuininga what are your thoughts about this?
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!