2023-09-19 21:49:48 +07:00
|
|
|
// Code generated by sqlc. DO NOT EDIT.
|
|
|
|
// versions:
|
2024-08-19 07:40:01 +07:00
|
|
|
// sqlc v1.26.0
|
2023-09-19 21:49:48 +07:00
|
|
|
// 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) {
|
2024-02-06 11:55:25 +07:00
|
|
|
row := q.db.QueryRow(ctx, getCountImageByLocation, imageOf)
|
2023-09-19 21:49:48 +07:00
|
|
|
var count int64
|
|
|
|
err := row.Scan(&count)
|
|
|
|
return count, err
|
|
|
|
}
|