26 lines
512 B
Go
26 lines
512 B
Go
|
// Code generated by sqlc. DO NOT EDIT.
|
||
|
// versions:
|
||
|
// sqlc v1.20.0
|
||
|
// source: images.sql
|
||
|
|
||
|
package db
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
)
|
||
|
|
||
|
const getCountImageByLocation = `-- name: GetCountImageByLocation :one
|
||
|
SELECT
|
||
|
COUNT(id)
|
||
|
FROM images
|
||
|
WHERE image_type = 'locations'
|
||
|
AND image_of = $1
|
||
|
`
|
||
|
|
||
|
func (q *Queries) GetCountImageByLocation(ctx context.Context, imageOf int32) (int64, error) {
|
||
|
row := q.db.QueryRowContext(ctx, getCountImageByLocation, imageOf)
|
||
|
var count int64
|
||
|
err := row.Scan(&count)
|
||
|
return count, err
|
||
|
}
|