Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/reference/macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ FROM authors
WHERE lower(name) = ?;
```

The `@name` syntax is a shorthand for `sqlc.arg(name)` and is not supported in
MySQL.

```sql
-- name: GetAuthorByName :one
SELECT *
FROM authors
WHERE lower(name) = @name;
```

See more examples in [Naming parameters](../howto/named_parameters.md).

## `sqlc.embed`
Expand Down