Skip to content

Commit

Permalink
fix SQL sample parameters for direct usability (#3056)
Browse files Browse the repository at this point in the history
  • Loading branch information
k-omotani committed Dec 13, 2023
1 parent 19024bd commit 3f533f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/howto/embedding.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Here's how we'd usually do that:
SELECT students.*, test_scores.*
FROM students
JOIN test_scores ON test_scores.student_id = students.id
WHERE students.id = ?;
WHERE students.id = $1;
```

When using Go, sqlc will produce a struct like this:
Expand All @@ -50,7 +50,7 @@ flattened list of columns.
SELECT sqlc.embed(students), sqlc.embed(test_scores)
FROM students
JOIN test_scores ON test_scores.student_id = students.id
WHERE students.id = ?;
WHERE students.id = $1;
```

```
Expand Down

0 comments on commit 3f533f5

Please sign in to comment.