hiling_go/db/repository/images.sql.go

26 lines
505 B
Go
Executable File

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.30.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.QueryRow(ctx, getCountImageByLocation, imageOf)
var count int64
err := row.Scan(&count)
return count, err
}