Documentation
¶
Overview ¶
Package pgrows encodes Postgres result sets into the JSON shape the database browser dashboards consume.
Both the local dev dashboard (served by the Encore daemon) and the cloud dashboard render query results with Drizzle Studio, so they must encode rows identically for the same query to render the same way in both.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Collect ¶
Collect reads the remaining rows, ready to be marshaled as the response.
In array mode that's a JSON array per row, holding the values in result set order. Otherwise it's a JSON object per row, keyed by column name — also in result set order, which is why the object form is marshaled by orderedRows rather than built as a map[string]any: encoding/json sorts map keys, so the dashboard would show columns alphabetically instead of as queried.
Types ¶
This section is empty.