Versions in this module Expand all Collapse all v1 v1.0.0 Nov 2, 2026 Changes in this version + const AuditSQL + const Channel + const FiltersSQL + const IdempotencySQL + const PresenceSQL + const TriggerFunctionSQL + var ErrMalformedNotification = errors.New("postgresadapter: malformed notification") + func Distinct(ctx context.Context, database DBTX, specification *query.ResourceSQL, ...) ([]livewire.DistinctValue, error) + func HistoryPage[Item any](ctx context.Context, database DBTX, table string, listQuery *query.ListQuery, ...) (*livewire.Page[livewire.Version[Item]], error) + func HistorySQL(table string) (string, error) + func ListPage[Item any](ctx context.Context, database DBTX, specification *query.ResourceSQL, ...) (*livewire.Page[Item], error) + func PageIDs(rows []PageRow) []uuid.UUID + func PartitionedTriggerSQL(table, column string) string + func TriggerSQL(tables ...string) string + func WriteCSV(ctx context.Context, database DBTX, export *Export, writer io.Writer) (int, error) + type AuditStore struct + func NewAuditStore(options *AuditStoreOptions) (*AuditStore, error) + func (s *AuditStore) Maintain(ctx context.Context) error + func (s *AuditStore) Write(ctx context.Context, entry *livewire.AuditEntry) error + type AuditStoreOptions struct + Pool *pgxpool.Pool + Retention time.Duration + type DBTX interface + CopyFrom func(ctx context.Context, table pgx.Identifier, columns []string, ...) (int64, error) + Exec func(ctx context.Context, statement string, arguments ...any) (pgconn.CommandTag, error) + Query func(ctx context.Context, statement string, arguments ...any) (pgx.Rows, error) + QueryRow func(ctx context.Context, statement string, arguments ...any) pgx.Row + SendBatch func(ctx context.Context, batch *pgx.Batch) pgx.BatchResults + func TransactionFrom(ctx context.Context) DBTX + type Export struct + ChunkSize int + Columns query.Fields + Query *query.ListQuery + Specification *query.ResourceSQL + type FilterStore struct + func NewFilterStore(options *FilterStoreOptions) (*FilterStore, error) + func (s *FilterStore) Delete(ctx context.Context, owner livewire.Owner, id string) error + func (s *FilterStore) Get(ctx context.Context, owner livewire.Owner, id string) (*livewire.StoredFilter, error) + func (s *FilterStore) List(ctx context.Context, owner livewire.Owner, resource string) ([]livewire.StoredFilter, error) + func (s *FilterStore) Save(ctx context.Context, filter *livewire.StoredFilter) (*livewire.StoredFilter, error) + func (s *FilterStore) Sweep(ctx context.Context) (int, error) + type FilterStoreOptions struct + MaximumNamedPerOwner int + MaximumUnnamedPerOwner int + Pool *pgxpool.Pool + type Hydrate func(ctx context.Context, database DBTX, rows []PageRow) (map[uuid.UUID]Item, error) + type IdempotencyStore struct + func NewIdempotencyStore(options *IdempotencyStoreOptions) (*IdempotencyStore, error) + func (s *IdempotencyStore) Record(ctx context.Context, record *livewire.IdempotencyRecord) error + func (s *IdempotencyStore) Reserve(ctx context.Context, owner livewire.Owner, key, mutation string) (*livewire.IdempotencyRecord, bool, error) + func (s *IdempotencyStore) Sweep(ctx context.Context) (int, error) + type IdempotencyStoreOptions struct + Pool *pgxpool.Pool + Window time.Duration + type Listener struct + func NewListener(options *ListenerOptions) (*Listener, error) + func (l *Listener) Run(ctx context.Context, onChange func(livewire.Change), onResync func()) error + type ListenerOptions struct + Connect func(ctx context.Context) (*pgx.Conn, error) + DSN string + OnError func(err error) + PingInterval time.Duration + RetryInterval time.Duration + type PageRow struct + Derived map[string]any + ID uuid.UUID + type PresenceStore struct + func NewPresenceStore(options *PresenceStoreOptions) (*PresenceStore, error) + func (s *PresenceStore) Heartbeat(ctx context.Context, socket string) error + func (s *PresenceStore) Join(ctx context.Context, presence *livewire.Presence) error + func (s *PresenceStore) Leave(ctx context.Context, tenant, socket, target, key string) error + func (s *PresenceStore) List(ctx context.Context, tenant, target, key string) ([]livewire.Presence, error) + func (s *PresenceStore) Sweep(ctx context.Context, maximumAge time.Duration) (int, error) + type PresenceStoreOptions struct + Pool *pgxpool.Pool + type Transactor struct + func NewTransactor(options *TransactorOptions) (*Transactor, error) + func (t *Transactor) Begin(ctx context.Context, transactionDetails livewire.TransactionDetails) (livewire.Transaction, error) + type TransactorOptions struct + Pool *pgxpool.Pool