feat: session specific logs

This commit is contained in:
adamdottv
2025-05-14 13:06:09 -05:00
parent d68a8bc622
commit 5056a67f57
15 changed files with 178 additions and 195 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ func (q *Queries) ListAllLogs(ctx context.Context, limit int64) ([]Log, error) {
const listLogsBySession = `-- name: ListLogsBySession :many
SELECT id, session_id, timestamp, level, message, attributes, created_at, updated_at FROM logs
WHERE session_id = ?
ORDER BY timestamp ASC
ORDER BY timestamp DESC
`
func (q *Queries) ListLogsBySession(ctx context.Context, sessionID sql.NullString) ([]Log, error) {
+1 -1
View File
@@ -18,7 +18,7 @@ INSERT INTO logs (
-- name: ListLogsBySession :many
SELECT * FROM logs
WHERE session_id = ?
ORDER BY timestamp ASC;
ORDER BY timestamp DESC;
-- name: ListAllLogs :many
SELECT * FROM logs