corevolumetest

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	CRnd int64 `db:"c_rnd" json:"c_rnd"`
	CInt int64 `db:"c_int" json:"c_int"`
}

type Model

type Model struct {
	Id int64 `db:"id" json:"id"`
	Input
}

type Store

type Store struct {
	Db *pgxpool.Pool
}

func (Store) Delete

func (s Store) Delete(ctx context.Context, id int64) (stmt string, err error)

func (Store) GetJsonFields

func (s Store) GetJsonFields() []string

func (Store) GetJsonTagTypeMap added in v0.1.5

func (s Store) GetJsonTagTypeMap() map[string]string

func (Store) GetName added in v0.1.5

func (s Store) GetName() string

func (Store) Insert

func (s Store) Insert(ctx context.Context, input Input) (newItem Model, stmt string, err error)

func (Store) Select

func (s Store) Select(ctx context.Context, params lyspg.SelectParams) (items []Model, unpagedCount lyspg.TotalCount, stmt string, err error)

func (Store) Select10

func (s Store) Select10(ctx context.Context) (vals []int, stmt string, err error)

func (Store) SelectById

func (s Store) SelectById(ctx context.Context, fields []string, id int64) (item Model, stmt string, err error)

func (Store) Update

func (s Store) Update(ctx context.Context, input Input, id int64) (stmt string, err error)

func (Store) UpdatePartial

func (s Store) UpdatePartial(ctx context.Context, assignmentsMap map[string]any, id int64) (stmt string, err error)

func (Store) Validate

func (s Store) Validate(validate *validator.Validate, input Input) error

Jump to

Keyboard shortcuts

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