sqlc

package
v0.0.0-...-bd23a96 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB(path string)

Types

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 GithubUser

type GithubUser struct {
	ID   int64
	Name string
}

type Queries

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

func New

func New(db DBTX) *Queries

func Q

func Q() *Queries

func (*Queries) CreateGithubUser

func (q *Queries) CreateGithubUser(ctx context.Context, name string) (GithubUser, error)

func (*Queries) DeleteGithubUser

func (q *Queries) DeleteGithubUser(ctx context.Context, id int64) error

func (*Queries) GetGithubUser

func (q *Queries) GetGithubUser(ctx context.Context, name string) (GithubUser, error)

func (*Queries) ListGithubUsers

func (q *Queries) ListGithubUsers(ctx context.Context) ([]GithubUser, error)

func (*Queries) UpdateGithubUser

func (q *Queries) UpdateGithubUser(ctx context.Context, arg UpdateGithubUserParams) (GithubUser, error)

func (*Queries) WithTx

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

type UpdateGithubUserParams

type UpdateGithubUserParams struct {
	Name string
	ID   int64
}

Jump to

Keyboard shortcuts

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