1// Code generated by sqlc. DO NOT EDIT.
4// source: read_files.sql
12const getFileRead = `-- name: GetFileRead :one
13SELECT session_id, path, read_at FROM read_files
14WHERE session_id = ? AND path = ? LIMIT 1
17type GetFileReadParams struct {
18 SessionID string `json:"session_id"`
19 Path string `json:"path"`
22func (q *Queries) GetFileRead(ctx context.Context, arg GetFileReadParams) (ReadFile, error) {
23 row := q.queryRow(ctx, q.getFileReadStmt, getFileRead, arg.SessionID, arg.Path)
25 err := row.Scan(&i.SessionID, &i.Path, &i.ReadAt)
29const listSessionReadFiles = `-- name: ListSessionReadFiles :many
30SELECT session_id, path, read_at FROM read_files
35func (q *Queries) ListSessionReadFiles(ctx context.Context, sessionID string) ([]ReadFile, error) {
36 rows, err := q.query(ctx, q.listSessionReadFilesStmt, listSessionReadFiles, sessionID)
44 if err := rows.Scan(&i.SessionID, &i.Path, &i.ReadAt); err != nil {
47 items = append(items, i)
49 if err := rows.Close(); err != nil {
52 if err := rows.Err(); err != nil {
58const recordFileRead = `-- name: RecordFileRead :exec
59INSERT INTO read_files (
67) ON CONFLICT(path, session_id) DO UPDATE SET
68 read_at = excluded.read_at
71type RecordFileReadParams struct {
72 SessionID string `json:"session_id"`
73 Path string `json:"path"`
76func (q *Queries) RecordFileRead(ctx context.Context, arg RecordFileReadParams) error {
77 _, err := q.exec(ctx, q.recordFileReadStmt, recordFileRead, arg.SessionID, arg.Path)
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