sqlc

package
v1.46.7 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddTodoWithIdAndSessionIdParams

type AddTodoWithIdAndSessionIdParams struct {
	ID          string `json:"id"`
	SessionID   string `json:"sessionId"`
	Description string `json:"description"`
	Checked     int64  `json:"checked"`
}

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 ModifySessionByIdParams

type ModifySessionByIdParams struct {
	Error string `json:"error"`
	ID    string `json:"id"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AddSessionWithId

func (q *Queries) AddSessionWithId(ctx context.Context, id string) error

func (*Queries) AddTodoWithIdAndSessionId

func (q *Queries) AddTodoWithIdAndSessionId(ctx context.Context, arg AddTodoWithIdAndSessionIdParams) error

func (*Queries) FindSessionById

func (q *Queries) FindSessionById(ctx context.Context, id string) (Session, error)

func (*Queries) FindTodosBySessionId

func (q *Queries) FindTodosBySessionId(ctx context.Context, sessionID string) ([]Todo, error)

func (*Queries) ModifySessionById

func (q *Queries) ModifySessionById(ctx context.Context, arg ModifySessionByIdParams) error

func (*Queries) RemoveTodosByIdAndSessionId

func (q *Queries) RemoveTodosByIdAndSessionId(ctx context.Context, arg RemoveTodosByIdAndSessionIdParams) error

func (*Queries) ToggleTodosByIdAndSessionId

func (q *Queries) ToggleTodosByIdAndSessionId(ctx context.Context, arg ToggleTodosByIdAndSessionIdParams) error

func (*Queries) WithTx

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

type RemoveTodosByIdAndSessionIdParams

type RemoveTodosByIdAndSessionIdParams struct {
	ID        string `json:"id"`
	SessionID string `json:"sessionId"`
}

type Session

type Session struct {
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	Error     string    `json:"error"`
}

type Todo

type Todo struct {
	ID          string `json:"id"`
	SessionID   string `json:"sessionId"`
	Description string `json:"description"`
	Checked     int64  `json:"checked"`
}

type ToggleTodosByIdAndSessionIdParams

type ToggleTodosByIdAndSessionIdParams struct {
	Checked   int64  `json:"checked"`
	ID        string `json:"id"`
	SessionID string `json:"sessionId"`
}

Jump to

Keyboard shortcuts

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