postgres

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

type Postgres struct{}

func New

func New() *Postgres

func (*Postgres) AdvisoryLockSQL added in v0.5.0

func (p *Postgres) AdvisoryLockSQL(key int64, mode dialect.AdvisoryLockMode) (dialect.Result, bool)

AdvisoryLockSQL returns the SQL to acquire a transaction-scoped advisory lock. Transaction-scoped locks (pg_advisory_xact_lock) auto-release on commit or rollback, so the runtime never needs an explicit unlock.

func (*Postgres) BuildBulkDelete

func (p *Postgres) BuildBulkDelete(table string, where *ast.WhereClause) dialect.Result

func (*Postgres) BuildBulkInsert

func (p *Postgres) BuildBulkInsert(table string, columns []string, rows [][]any) dialect.Result

func (*Postgres) BuildBulkSoftDelete

func (p *Postgres) BuildBulkSoftDelete(table string, where *ast.WhereClause) dialect.Result

func (*Postgres) BuildBulkUpdate

func (p *Postgres) BuildBulkUpdate(table string, sets []dialect.ColumnValue, where *ast.WhereClause) dialect.Result

func (*Postgres) BuildBulkUpsert

func (p *Postgres) BuildBulkUpsert(table string, columns []string, rows [][]any, conflictCols []string, updateCols []string, doNothing bool) dialect.Result

func (*Postgres) BuildDelete

func (p *Postgres) BuildDelete(table string, pkColumns []string, pkValues []any) dialect.Result

func (*Postgres) BuildDeleteVersioned added in v0.5.0

func (p *Postgres) BuildDeleteVersioned(table string, pkColumns []string, pkValues []any, versionCol string, currentVersion int) dialect.Result

func (*Postgres) BuildInsert

func (p *Postgres) BuildInsert(table string, columns []string, values []any, returningCols []string) dialect.Result

func (*Postgres) BuildSelect

func (p *Postgres) BuildSelect(node ast.SelectNode) dialect.Result

func (*Postgres) BuildSoftDelete

func (p *Postgres) BuildSoftDelete(table string, pkColumns []string, pkValues []any) dialect.Result

func (*Postgres) BuildSoftDeleteVersioned added in v0.5.0

func (p *Postgres) BuildSoftDeleteVersioned(table string, pkColumns []string, pkValues []any, versionCol string, currentVersion int) dialect.Result

func (*Postgres) BuildUpdate

func (p *Postgres) BuildUpdate(table string, changes []dialect.ColumnValue, pkColumns []string, pkValues []any) dialect.Result

func (*Postgres) BuildUpdateVersioned

func (p *Postgres) BuildUpdateVersioned(table string, changes []dialect.ColumnValue, pkColumns []string, pkValues []any, versionCol string, currentVersion int) dialect.Result

func (*Postgres) Explain added in v0.3.0

func (p *Postgres) Explain(query string) (string, bool)

func (*Postgres) Name added in v0.5.0

func (p *Postgres) Name() string

func (*Postgres) Now added in v0.3.0

func (p *Postgres) Now() string

func (*Postgres) SupportsReturning added in v0.3.0

func (p *Postgres) SupportsReturning() bool

func (*Postgres) UsesQuestionPlaceholders added in v0.5.0

func (p *Postgres) UsesQuestionPlaceholders() bool

Jump to

Keyboard shortcuts

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