Documentation
¶
Overview ¶
Package postgres owns a single server's PostgreSQL connections and paired schemas. The owned connection executes every write and never reconnects.
Index ¶
- Constants
- Variables
- func Connect(dsn string) (*sql.DB, error)
- func Inspect(ctx context.Context, db *sql.DB) (map[string]string, error)
- type Store
- func (s *Store) BeginWrite(ctx context.Context) (*sql.Tx, error)
- func (s *Store) Check(ctx context.Context) error
- func (s *Store) Close() error
- func (s *Store) Context() context.Context
- func (s *Store) Ready(ctx context.Context) error
- func (s *Store) SQL() *sql.DB
- func (s *Store) WriteTransaction(ctx context.Context, operation func(*sql.Tx) error) error
Constants ¶
View Source
const AccountSchemaVersion = 1
View Source
const SchemaVersion = 1
Variables ¶
View Source
var AccountSchema string
View Source
var DataSchema string
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.