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 AddPromptParams

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

type AddPromptResponseParams

type AddPromptResponseParams struct {
	Response sql.NullString `json:"response"`
	ID       int64          `json:"id"`
}

type Character added in v0.5.0

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) AddPrompt

func (q *Queries) AddPrompt(ctx context.Context, arg AddPromptParams) (int64, error)

func (*Queries) AddPromptResponse

func (q *Queries) AddPromptResponse(ctx context.Context, arg AddPromptResponseParams) error

func (*Queries) DropPrompts

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

func (*Queries) ListPromptsBySessID

func (q *Queries) ListPromptsBySessID(ctx context.Context, sessionID string) (Prompt, error)

func (*Queries) WithTx

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

type Resource added in v0.5.0

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