db

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateModelParams

type CreateModelParams struct {
	Name    string
	Title   string
	Fax     string
	Web     string
	Age     int32
	Right   bool
	Counter int64
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type ListModelsParams

type ListModelsParams struct {
	ID    int32
	Limit int32
}

type Model

type Model struct {
	ID      int32
	Name    string
	Title   string
	Fax     string
	Web     string
	Age     int32
	Right   bool
	Counter int64
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateModel

func (q *Queries) CreateModel(ctx context.Context, arg CreateModelParams) (Model, error)

func (*Queries) GetModel

func (q *Queries) GetModel(ctx context.Context, id int32) (Model, error)

func (*Queries) ListModels

func (q *Queries) ListModels(ctx context.Context, arg ListModelsParams) ([]Model, error)

func (*Queries) UpdateModel

func (q *Queries) UpdateModel(ctx context.Context, arg UpdateModelParams) error

func (*Queries) WithTx

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

type UpdateModelParams

type UpdateModelParams struct {
	Name    string
	Title   string
	Fax     string
	Web     string
	Age     int32
	Right   bool
	Counter int64
	ID      int32
}

Jump to

Keyboard shortcuts

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