17 lines
273 B
MySQL
17 lines
273 B
MySQL
|
-- name: CreateSession :one
|
||
|
INSERT INTO user_sessions (
|
||
|
id,
|
||
|
email,
|
||
|
refresh_token,
|
||
|
user_agent,
|
||
|
client_ip,
|
||
|
is_blocked,
|
||
|
expires_at
|
||
|
) VALUES (
|
||
|
$1, $2, $3, $4, $5, $6, $7
|
||
|
) RETURNING *;
|
||
|
|
||
|
-- name: GetSession :one
|
||
|
SELECT * FROM user_sessions
|
||
|
WHERE id = $1
|
||
|
LIMIT 1;
|