-- name: CreateEncryptedLog :one
INSERT INTO encrypted_logs (
    log_type, encrypted_payload, blind_index_hash, server_id, session_id
) VALUES (
    $1, $2, $3, $4, $5
) RETURNING *;

-- name: CreateTelemetry :one
INSERT INTO telemetry (
    community_id, server_fps, player_count
) VALUES (
    $1, $2, $3
) RETURNING *;

-- name: GetRecentLogs :many
SELECT * FROM encrypted_logs
WHERE server_id = $1
ORDER BY created_at DESC
LIMIT $2;
