coreparamtest

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: 7 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 {
	CBool      bool              `db:"c_bool" json:"c_bool"`
	CBoolN     *bool             `db:"c_booln" json:"c_booln"`
	CInt       int64             `db:"c_int" json:"c_int,omitempty"`
	CIntN      *int64            `db:"c_intn" json:"c_intn,omitempty"`
	CDouble    float32           `db:"c_double" json:"c_double,omitempty"`
	CDoubleN   *float32          `db:"c_doublen" json:"c_doublen,omitempty"`
	CDate      lystype.Date      `db:"c_date" json:"c_date,omitempty"`
	CDateN     *lystype.Date     `db:"c_daten" json:"c_daten,omitempty"`
	CTime      lystype.Time      `db:"c_time" json:"c_time,omitempty"`
	CTimeN     *lystype.Time     `db:"c_timen" json:"c_timen,omitempty"`
	CDatetime  lystype.Datetime  `db:"c_datetime" json:"c_datetime,omitempty"`
	CDatetimeN *lystype.Datetime `db:"c_datetimen" json:"c_datetimen,omitempty"`
	CEnum      string            `db:"c_enum" json:"c_enum,omitempty"`
	CEnumN     *string           `db:"c_enumn" json:"c_enumn,omitempty"`
	CText      string            `db:"c_text" json:"c_text,omitempty"`
	CTextN     *string           `db:"c_textn" json:"c_textn,omitempty"`
}

type Model

type Model struct {
	Id     int64  `db:"id" json:"id,omitempty"`
	IdUUID string `db:"id_uuid" json:"id_uuid,omitempty"`
	Input
}

type Store

type Store struct {
	Db *pgxpool.Pool
}

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) Select

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

func (Store) SelectById

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

Jump to

Keyboard shortcuts

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