sqlc

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: GPL-3.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 AddResourceParams

type AddResourceParams struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Character

type Character struct {
	ID     int64  `json:"id"`
	Result string `json:"result"`
}

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 Prompt

type Prompt struct {
	ID          int64          `json:"id"`
	SessionID   string         `json:"session_id"`
	Agent       string         `json:"agent"`
	State       string         `json:"state"`
	System      string         `json:"system"`
	HistoryLen  int64          `json:"history_len"`
	Request     string         `json:"request"`
	Provider    string         `json:"provider"`
	Model       string         `json:"model"`
	Response    sql.NullString `json:"response"`
	CreatedAt   time.Time      `json:"created_at"`
	MachTimeSum int64          `json:"mach_time_sum"`
	MachTime    string         `json:"mach_time"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AddCharacter

func (q *Queries) AddCharacter(ctx context.Context, result string) (int64, error)

func (*Queries) AddResource

func (q *Queries) AddResource(ctx context.Context, arg AddResourceParams) (int64, error)

func (*Queries) DeleteAllCharacter

func (q *Queries) DeleteAllCharacter(ctx context.Context) error

func (*Queries) DeleteAllResources

func (q *Queries) DeleteAllResources(ctx context.Context) error

func (*Queries) GetCharacter

func (q *Queries) GetCharacter(ctx context.Context) (Character, error)

func (*Queries) GetResources

func (q *Queries) GetResources(ctx context.Context) ([]Resource, error)

func (*Queries) WithTx

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

type Resource

type Resource struct {
	ID    int64  `json:"id"`
	Key   string `json:"key"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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