Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
Array adapts a string-kind slice (plain or named, e.g. `type Selection []string`) to PostgreSQL text[] over database/sql, implementing both driver.Valuer (bind) and sql.Scanner (scan).
It replaces lib/pq's pq.Array, which the platform no longer depends on: GO-2026-6166..6173 flag lib/pq with no fixed release available, and the driver was vestigial (pgx/v5 stdlib has been the actual driver all along — lib/pq was linked only for these helpers). The bind format is byte-identical to pq's ({"a","b"} — every element quoted); the parser additionally accepts PostgreSQL's own output form ({a,b}), so row fixtures and driver output both scan.
Scope is deliberately strings-only — every array column in the schema (architectures, selection, domains, CIDRs, bases) is text[]. Numeric arrays would need this generalized; don't until one exists.
func New ¶
New wraps a string-kind slice for BINDING as a text[] argument. Accepts the slice directly or a pointer to it.