sqlc

package
v0.0.0-...-4178823 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type ListTodoByUserIDRow

type ListTodoByUserIDRow struct {
	ID        uuid.UUID
	CreatedAt pgtype.Timestamptz
	UpdatedAt pgtype.Timestamptz
	Title     string
	Completed bool
	UserID    uuid.UUID
	UserName  string
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) FindUserByID

func (q *Queries) FindUserByID(ctx context.Context, id uuid.UUID) (User, error)

func (*Queries) ListTodoByUserID

func (q *Queries) ListTodoByUserID(ctx context.Context, userID uuid.UUID) ([]ListTodoByUserIDRow, error)

func (*Queries) ListTodos

func (q *Queries) ListTodos(ctx context.Context) ([]Todo, error)

func (*Queries) ListUsers

func (q *Queries) ListUsers(ctx context.Context) ([]User, error)

func (*Queries) WithTx

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

type SchemaMigration

type SchemaMigration struct {
	Version string
}

type Todo

type Todo struct {
	ID        uuid.UUID
	CreatedAt pgtype.Timestamptz
	UpdatedAt pgtype.Timestamptz
	Title     string
	Completed bool
	UserID    uuid.UUID
}

type User

type User struct {
	ID        uuid.UUID
	Name      string
	CreatedAt pgtype.Timestamptz
	UpdatedAt pgtype.Timestamptz
}

Jump to

Keyboard shortcuts

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