v0.33.1 9577fee

zoom.sql.go RawHistoryFolder

1// Code generated by sqlc. DO NOT EDIT.
2// versions:
3//   sqlc v1.30.0
4// source: zoom.sql
5
6package sqlc
7
8import (
9	"context"
10)
11
12const DeleteZoomLevel = `-- name: DeleteZoomLevel :exec
13DELETE FROM zoom_levels WHERE domain = ?
14`
15
16func (q *Queries) DeleteZoomLevel(ctx context.Context, domain string) error {
17	_, err := q.db.ExecContext(ctx, DeleteZoomLevel, domain)
18	return err
19}
20
21const GetZoomLevel = `-- name: GetZoomLevel :one
22SELECT domain, zoom_factor, updated_at FROM zoom_levels WHERE domain = ? LIMIT 1
23`
24
25func (q *Queries) GetZoomLevel(ctx context.Context, domain string) (ZoomLevel, error) {
26	row := q.db.QueryRowContext(ctx, GetZoomLevel, domain)
27	var i ZoomLevel
28	err := row.Scan(&i.Domain, &i.ZoomFactor, &i.UpdatedAt)
29	return i, err
30}
31
32const ListZoomLevels = `-- name: ListZoomLevels :many
33SELECT domain, zoom_factor, updated_at FROM zoom_levels ORDER BY updated_at DESC
34`
35
36func (q *Queries) ListZoomLevels(ctx context.Context) ([]ZoomLevel, error) {
37	rows, err := q.db.QueryContext(ctx, ListZoomLevels)
38	if err != nil {
39		return nil, err
40	}
41	defer rows.Close()
42	items := []ZoomLevel{}
43	for rows.Next() {
44		var i ZoomLevel
45		if err := rows.Scan(&i.Domain, &i.ZoomFactor, &i.UpdatedAt); err != nil {
46			return nil, err
47		}
48		items = append(items, i)
49	}
50	if err := rows.Close(); err != nil {
51		return nil, err
52	}
53	if err := rows.Err(); err != nil {
54		return nil, err
55	}
56	return items, nil
57}
58
59const SetZoomLevel = `-- name: SetZoomLevel :exec
60INSERT INTO zoom_levels (domain, zoom_factor, updated_at)
61VALUES (?, ?, CURRENT_TIMESTAMP)
62ON CONFLICT(domain) DO UPDATE SET
63    zoom_factor = excluded.zoom_factor,
64    updated_at = CURRENT_TIMESTAMP
65`
66
67type SetZoomLevelParams struct {
68	Domain     string  `json:"domain"`
69	ZoomFactor float64 `json:"zoom_factor"`
70}
71
72func (q *Queries) SetZoomLevel(ctx context.Context, arg SetZoomLevelParams) error {
73	_, err := q.db.ExecContext(ctx, SetZoomLevel, arg.Domain, arg.ZoomFactor)
74	return err
75}

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