db

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get() (*sql.DB, error)

func Init

func Init() (*sql.DB, error)

func MustGet

func MustGet() *sql.DB

func SetUser

func SetUser(e Executable, role string, id uuid.UUID) error

func WithRLS

func WithRLS(
	ctx context.Context,
	db *sql.DB,
	role string,
	id uuid.UUID,
) (*sql.Tx, error)

Types

type Executable

type Executable interface {
	Exec(query string, args ...any) (sql.Result, error)
}

Jump to

Keyboard shortcuts

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