pgjdbc / r2dbc-postgresql

Postgresql R2DBC Driver
https://r2dbc.io
Apache License 2.0
1.01k stars 177 forks source link

Add column name index mapping in `PostgresqlRow` #640

Closed cty123 closed 8 months ago

cty123 commented 8 months ago

[resolves #636]

Make sure that:

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.

New Public APIs

Additional context

mp911de commented 8 months ago

Thank you for your contribution. That's merged, polished, and backported now.