You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on an API that allows fetching data from the ResultSet by name, but with only the column_name method it breaks if there are overlapping column names due to joins.
I've been looking into java's sql stuff lately and found that this is a method on their result set metadata (doc link).
I've also been looking at implementations of this method and I know this won't exactly be easy. Well, it will be easy for sqlite probably. Here's the java adapter's implementation for it. On the other hand, Postgres doesn't have this functionality and so the pgjdbc library issues a query for the information (link). I did not look into any databases other than that.
We could even make it nilable so that implementations don't have to provide table name if they don't want to at first.
I'm working on an API that allows fetching data from the ResultSet by name, but with only the
column_name
method it breaks if there are overlapping column names due to joins.I've been looking into java's sql stuff lately and found that this is a method on their result set metadata (doc link).
I've also been looking at implementations of this method and I know this won't exactly be easy. Well, it will be easy for sqlite probably. Here's the java adapter's implementation for it. On the other hand, Postgres doesn't have this functionality and so the pgjdbc library issues a query for the information (link). I did not look into any databases other than that.
We could even make it nilable so that implementations don't have to provide table name if they don't want to at first.
The text was updated successfully, but these errors were encountered: