package models

import "github.com/go-arrower/arrower/setting/models"

Index

Types

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type GetSettingsRow

type GetSettingsRow struct {
	Key   string
	Value string
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) DeleteSetting

func (q *Queries) DeleteSetting(ctx context.Context, key string) error

func (*Queries) GetSetting

func (q *Queries) GetSetting(ctx context.Context, key string) (string, error)

func (*Queries) GetSettings

func (q *Queries) GetSettings(ctx context.Context, compositeKeys []string) ([]GetSettingsRow, error)

func (*Queries) UpsertSetting

func (q *Queries) UpsertSetting(ctx context.Context, arg UpsertSettingParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type UpsertSettingParams

type UpsertSettingParams struct {
	Key   string
	Value string
}

Source Files

db.go models.go query.sql.go

Version
v0.0.0-20250311203644-ab26c1152cb4 (latest)
Published
Mar 11, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
1 week ago

Tools for package owners.