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
Is your feature request related to a problem? Please describe.
For a variety of complicated tasks, I want to use hand-crafted queries (instead of relying on Fluent's ORM). I run these queries and would like to convert them into an array to return them to my client.
To do this, however, I seem to need to know in advance how the row fields are named, since I can only access a row field by name. This is frustrating since I would like to use different row field names in different queries and still use the same code to convert them into a dictionary.
Describe the solution you'd like
I almost got my solution from PostgresRow.description, which loops through self.lookupTable.rowDescription.fields to get the field names.
I tried to write an extension to PostgresRow that would give me the field names, but 'lookupTable' is inaccessible due to 'internal' protection level. So my request is to make the lookupTable property readable.
Describe alternatives you've considered
The alternative I'm going with for now is to build a query and staple to it the list of expected field names and types. This seems a bit unwieldy, especially since the data is right there 😅
Thanks and stay awesome <3
The text was updated successfully, but these errors were encountered:
I'm saying if I build a raw SQL query, and get the result back, I don't know any easy solution to find out the column titles in the result. I mean, I kinda know because I wrote the query and defined the column titles there, but it would be helpful to read these out of the PostgresRow instance somehow.
Is your feature request related to a problem? Please describe.
For a variety of complicated tasks, I want to use hand-crafted queries (instead of relying on Fluent's ORM). I run these queries and would like to convert them into an array to return them to my client.
To do this, however, I seem to need to know in advance how the row fields are named, since I can only access a row field by name. This is frustrating since I would like to use different row field names in different queries and still use the same code to convert them into a dictionary.
Describe the solution you'd like
I almost got my solution from PostgresRow.description, which loops through
self.lookupTable.rowDescription.fields
to get the field names.I tried to write an extension to
PostgresRow
that would give me the field names, but'lookupTable' is inaccessible due to 'internal' protection level
. So my request is to make thelookupTable
property readable.Describe alternatives you've considered
The alternative I'm going with for now is to build a query and staple to it the list of expected field names and types. This seems a bit unwieldy, especially since the data is right there 😅
Thanks and stay awesome <3
The text was updated successfully, but these errors were encountered: