Skip to content

Commit

Permalink
Merge branch 'main' into fix/388/correctly-use-multi-select
Browse files Browse the repository at this point in the history
  • Loading branch information
aidantrabs authored Feb 4, 2025
2 parents 7f68d32 + 2472851 commit d2c9ea6
Show file tree
Hide file tree
Showing 8 changed files with 450 additions and 316 deletions.
12 changes: 7 additions & 5 deletions backend/.sqlc/queries/projects.sql
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,15 @@ INSERT INTO project_answers (
) RETURNING *;

-- name: GetProjectComments :many
SELECT * FROM project_comments
WHERE project_id = $1
ORDER BY created_at DESC;
SELECT pc.*, u.first_name as commenter_first_name, u.last_name as commenter_last_name FROM project_comments pc
JOIN users u ON u.id = pc.commenter_id
WHERE pc.project_id = $1
ORDER BY pc.created_at DESC;

-- name: GetProjectComment :one
SELECT * FROM project_comments
WHERE id = $1 AND project_id = $2
SELECT pc.*, u.first_name as commenter_first_name, u.last_name as commenter_last_name FROM project_comments pc
JOIN users u ON u.id = pc.commenter_id
WHERE pc.id = $1 AND pc.project_id = $2
LIMIT 1;

-- name: CreateProjectComment :one
Expand Down
52 changes: 42 additions & 10 deletions backend/db/projects.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d2c9ea6

Please sign in to comment.