pgrows

package
v1.58.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2026 License: MPL-2.0 Imports: 4 Imported by: 0

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

func Collect(rows pgx.Rows, arrayMode bool) (any, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL