multi: use fillPlaceHolders in CountActions

This commits ensures that the `CountActions` function in the `sqlc` &
`sqlcmig6` packages utilizes the `fillPlaceHolders` function to properly
handle SQL query placeholders.

This ensures that the function works correctly on `Postgres` backends
when it contains ? placeholders instead of positional ones (e.g., $1).
This commit is contained in:
Viktor Torstensson 2026-05-14 12:05:44 +02:00
parent 003041271a
commit 67804670c6
No known key found for this signature in database
GPG key ID: 961CC8259AE675D4
2 changed files with 2 additions and 2 deletions

View file

@ -85,7 +85,7 @@ func (q *Queries) CountActions(ctx context.Context,
arg ActionQueryParams) (int64, error) {
query, args := buildActionsQuery(arg, true)
row := q.db.QueryRowContext(ctx, query, args...)
row := q.db.QueryRowContext(ctx, fillPlaceHolders(query), args...)
var count int64
err := row.Scan(&count)

View file

@ -85,7 +85,7 @@ func (q *Queries) CountActions(ctx context.Context,
arg ActionQueryParams) (int64, error) {
query, args := buildActionsQuery(arg, true)
row := q.db.QueryRowContext(ctx, query, args...)
row := q.db.QueryRowContext(ctx, fillPlaceHolders(query), args...)
var count int64
err := row.Scan(&count)