postgres

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package postgres provides a PostgreSQL-backed db.Store implementation for Leaf, built on the jackc/pgx/v5 driver (PostgreSQL 18 compatible) through its database/sql-compatible stdlib adapter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(dsn string) (db.Store, error)

Open connects to PostgreSQL using the given DSN (libpq URL or key/value DSN, e.g. "postgres://user:pass@localhost:5432/game?sslmode=disable") and returns a ready-to-use db.Store.

func OpenWithTimeout

func OpenWithTimeout(dsn string, timeout time.Duration) (db.Store, error)

OpenWithTimeout behaves like Open but bounds the connection and initial schema setup with a timeout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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