postgres

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, config Config) (*pgxpool.Pool, error)

Types

type BuiltQuery

type BuiltQuery struct {
	SQL  string
	Args []any
}

type Config

type Config struct {
	DatabaseURL      string
	MaxConns         int32
	MinConns         int32
	ConnectTimeout   time.Duration
	StatementTimeout time.Duration
}

type QueryBuilder

type QueryBuilder struct {
	Table        string
	PrimaryKey   string
	Allowed      map[string]filters.AllowedField
	TenantColumn string
}

func (QueryBuilder) Count

func (b QueryBuilder) Count(query filters.Query, tenantID string) (BuiltQuery, error)

func (QueryBuilder) Select

func (b QueryBuilder) Select(query filters.Query, tenantID string) (BuiltQuery, error)

Jump to

Keyboard shortcuts

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