1// Code generated by sqlc. DO NOT EDIT.
13const createSession = `-- name: CreateSession :one
32 strftime('%s', 'now'),
34) RETURNING id, parent_session_id, title, message_count, prompt_tokens, completion_tokens, cost, updated_at, created_at
37type CreateSessionParams struct {
39 ParentSessionID sql.NullString `json:"parent_session_id"`
40 Title string `json:"title"`
41 MessageCount int64 `json:"message_count"`
42 PromptTokens int64 `json:"prompt_tokens"`
43 CompletionTokens int64 `json:"completion_tokens"`
44 Cost float64 `json:"cost"`
47func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error) {
48 row := q.queryRow(ctx, q.createSessionStmt, createSession,
72const deleteSession = `-- name: DeleteSession :exec
77func (q *Queries) DeleteSession(ctx context.Context, id string) error {
78 _, err := q.exec(ctx, q.deleteSessionStmt, deleteSession, id)
82const getSessionByID = `-- name: GetSessionByID :one
83SELECT id, parent_session_id, title, message_count, prompt_tokens, completion_tokens, cost, updated_at, created_at
88func (q *Queries) GetSessionByID(ctx context.Context, id string) (Session, error) {
89 row := q.queryRow(ctx, q.getSessionByIDStmt, getSessionByID, id)
105const listSessions = `-- name: ListSessions :many
106SELECT id, parent_session_id, title, message_count, prompt_tokens, completion_tokens, cost, updated_at, created_at
108WHERE parent_session_id is NULL
109ORDER BY created_at DESC
112func (q *Queries) ListSessions(ctx context.Context) ([]Session, error) {
113 rows, err := q.query(ctx, q.listSessionsStmt, listSessions)
134 items = append(items, i)
136 if err := rows.Close(); err != nil {
139 if err := rows.Err(); err != nil {
145const updateSession = `-- name: UpdateSession :one
150 completion_tokens = ?,
153RETURNING id, parent_session_id, title, message_count, prompt_tokens, completion_tokens, cost, updated_at, created_at
156type UpdateSessionParams struct {
157 Title string `json:"title"`
158 PromptTokens int64 `json:"prompt_tokens"`
159 CompletionTokens int64 `json:"completion_tokens"`
160 Cost float64 `json:"cost"`
161 ID string `json:"id"`
164func (q *Queries) UpdateSession(ctx context.Context, arg UpdateSessionParams) (Session, error) {
165 row := q.queryRow(ctx, q.updateSessionStmt, updateSession,
168 arg.CompletionTokens,
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list