v0.33.0 62a09f5

favicon.sql.go RawHistoryFolder

1// Code generated by sqlc. DO NOT EDIT.
2// versions:
3//   sqlc v1.30.0
4// source: favicon.sql
5
6package sqlc
7
8import (
9	"context"
10	"database/sql"
11	"time"
12)
13
14const DeleteFavicon = `-- name: DeleteFavicon :exec
15DELETE FROM favicons WHERE key = ?
16`
17
18func (q *Queries) DeleteFavicon(ctx context.Context, key string) error {
19	_, err := q.db.ExecContext(ctx, DeleteFavicon, key)
20	return err
21}
22
23const GetFavicon = `-- name: GetFavicon :one
24SELECT "key", source_url, page_url, source, content_hash, content_type, updated_at, last_checked_at FROM favicons WHERE key = ? LIMIT 1
25`
26
27func (q *Queries) GetFavicon(ctx context.Context, key string) (Favicon, error) {
28	row := q.db.QueryRowContext(ctx, GetFavicon, key)
29	var i Favicon
30	err := row.Scan(
31		&i.Key,
32		&i.SourceUrl,
33		&i.PageUrl,
34		&i.Source,
35		&i.ContentHash,
36		&i.ContentType,
37		&i.UpdatedAt,
38		&i.LastCheckedAt,
39	)
40	return i, err
41}
42
43const UpdateFaviconLastChecked = `-- name: UpdateFaviconLastChecked :exec
44UPDATE favicons
45SET content_hash = ?, last_checked_at = ?
46WHERE key = ?
47`
48
49type UpdateFaviconLastCheckedParams struct {
50	ContentHash   string    `json:"content_hash"`
51	LastCheckedAt time.Time `json:"last_checked_at"`
52	Key           string    `json:"key"`
53}
54
55func (q *Queries) UpdateFaviconLastChecked(ctx context.Context, arg UpdateFaviconLastCheckedParams) error {
56	_, err := q.db.ExecContext(ctx, UpdateFaviconLastChecked, arg.ContentHash, arg.LastCheckedAt, arg.Key)
57	return err
58}
59
60const UpsertFavicon = `-- name: UpsertFavicon :exec
61INSERT INTO favicons (
62    key,
63    source_url,
64    page_url,
65    source,
66    content_hash,
67    content_type,
68    updated_at,
69    last_checked_at
70)
71VALUES (?, ?, ?, ?, ?, ?, ?, ?)
72ON CONFLICT(key) DO UPDATE SET
73    source_url = EXCLUDED.source_url,
74    page_url = EXCLUDED.page_url,
75    source = EXCLUDED.source,
76    content_hash = EXCLUDED.content_hash,
77    content_type = EXCLUDED.content_type,
78    updated_at = EXCLUDED.updated_at,
79    last_checked_at = EXCLUDED.last_checked_at
80`
81
82type UpsertFaviconParams struct {
83	Key           string         `json:"key"`
84	SourceUrl     sql.NullString `json:"source_url"`
85	PageUrl       sql.NullString `json:"page_url"`
86	Source        string         `json:"source"`
87	ContentHash   string         `json:"content_hash"`
88	ContentType   sql.NullString `json:"content_type"`
89	UpdatedAt     time.Time      `json:"updated_at"`
90	LastCheckedAt time.Time      `json:"last_checked_at"`
91}
92
93func (q *Queries) UpsertFavicon(ctx context.Context, arg UpsertFaviconParams) error {
94	_, err := q.db.ExecContext(ctx, UpsertFavicon,
95		arg.Key,
96		arg.SourceUrl,
97		arg.PageUrl,
98		arg.Source,
99		arg.ContentHash,
100		arg.ContentType,
101		arg.UpdatedAt,
102		arg.LastCheckedAt,
103	)
104	return err
105}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close