queries

package
v0.0.0-...-3a46aa3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 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 CreateUserDetailParams

type CreateUserDetailParams struct {
	ID    int64  `json:"id"`
	Email string `json:"email"`
}

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 (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, name string) (sql.Result, error)

func (*Queries) CreateUserDetail

func (q *Queries) CreateUserDetail(ctx context.Context, arg CreateUserDetailParams) (sql.Result, error)

func (*Queries) WithTx

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

type User

type User struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

type UserDetail

type UserDetail struct {
	ID    int64  `json:"id"`
	Email string `json:"email"`
}

Jump to

Keyboard shortcuts

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