query

package
v0.0.0-...-ebb074b Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 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 Author

type Author struct {
	ID   int64
	Name string
	Bio  sql.NullString
}

type CreateAuthorParams

type CreateAuthorParams struct {
	ID   int64
	Name string
	Bio  sql.NullString
}

type CreateAuthorsParams

type CreateAuthorsParams struct {
	Ids   []int64
	Names []string
	Bios  []string
}

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 Queries

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

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) CreateAuthor

func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) error

func (*Queries) CreateAuthors

func (q *Queries) CreateAuthors(ctx context.Context, arg CreateAuthorsParams) error

func (*Queries) UpdateAuthor

func (q *Queries) UpdateAuthor(ctx context.Context, arg UpdateAuthorParams) error

func (*Queries) UpdateAuthors

func (q *Queries) UpdateAuthors(ctx context.Context, arg UpdateAuthorsParams) error

func (*Queries) WithTx

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

type UpdateAuthorParams

type UpdateAuthorParams struct {
	ID   int64
	Name string
	Bio  sql.NullString
}

type UpdateAuthorsParams

type UpdateAuthorsParams struct {
	Ids   []int64
	Names []string
	Bios  []string
}

Jump to

Keyboard shortcuts

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