postgresql

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package postgresql provides the Better Auth PostgreSQL database adapter.

Applications may open the *sql.DB with pgx/v5/stdlib or another compatible PostgreSQL database/sql driver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(db *sql.DB) (*sqladapter.Adapter, error)

func NewWithOptions added in v1.1.0

func NewWithOptions(db *sql.DB, options Options) (*sqladapter.Adapter, error)

NewWithOptions is New with optional settings.

Types

type Options added in v1.1.0

type Options struct {
	// SchemaName is the schema (namespace) that holds Better Auth's tables,
	// for example "auth". When set, every statement names its table as
	// "auth"."user", so the adapter no longer depends on the connection's
	// search_path, and Migrate runs CREATE SCHEMA IF NOT EXISTS before it
	// creates tables. It matches Better Auth's database.schemaName.
	SchemaName string
}

Options holds optional PostgreSQL adapter settings.

Jump to

Keyboard shortcuts

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