r2dbc-postgresql
r2dbc-postgresql copied to clipboard
perf: add column name index mapping in PostgresqlRow class
[resolves #636]
Make sure that:
- [ x ] You have read the contribution guidelines.
- [ x ] You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
- [ x ] You use the code formatters provided here and have them applied to your changes. Don't submit any formatting related changes.
- [ x ] You submit test cases (unit or integration tests) that back your changes.
Issue description
Previously getting the fields of the row results requires looping the fields array list to find the field with the specified name, this can be very slow when there's a large amount of columns retrieved. Here I am trying to add a cache to map the column name to index such that we only need to loop the fields list once.