Skip to content

Commit 1c3edaa

Browse files
Updated for sessions.sql
1 parent ad8b6da commit 1c3edaa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

db/queries/sessions.sql

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ INSERT INTO sessions_archive (
1111
SELECT * FROM sessions_archive
1212
WHERE id = $1;
1313

14-
-- name: GetSessionByUsernamePQ :many
15-
SELECT * FROM sessions_archive
14+
-- name: GetSessionByUsernamePaginatedPQ :many
15+
SELECT * FROM sessions_archive
1616
WHERE username = $1
17-
ORDER BY created_at DESC;
17+
ORDER BY created_at DESC
18+
LIMIT $2 OFFSET $3;
1819

1920
-- name: DeleteSessionPQ :exec
20-
DELETE FROM sessions_archive WHERE id = $1
21+
DELETE FROM sessions_archive WHERE id = $1;

0 commit comments

Comments
 (0)