// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.20.0 // source: messages.sql package pgc import ( "context" ) const getUnreadCount = `-- name: GetUnreadCount :one SELECT count(*) FROM p_message WHERE receiver_user_id=$1 AND is_read=0 AND is_del=0 ` // ------------------------------------------------------------------------------ // message sql dml // ------------------------------------------------------------------------------ func (q *Queries) GetUnreadCount(ctx context.Context, receiverUserID int64) (int64, error) { row := q.db.QueryRow(ctx, getUnreadCount, receiverUserID) var count int64 err := row.Scan(&count) return count, err }