You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: dao.go
    path of file: ./repos/cds/engine/cdn/storage
    
    the code of the file until where you have to start completion: package storage

import (
	"context"
	"strconv"
	"time"

	"github.com/go-gorp/gorp"
	"github.com/lib/pq"
	"github.com/rockbears/log"

	"github.com/ovh/cds/engine/cdn/item"
	"github.com/ovh/cds/engine/gorpmapper"
	"github.com/ovh/cds/sdk"
)

type ItemToSync struct {
	ItemID  string    `db:"id"`
	Created
    
func HashItemUnitByApiRefHash(db gorp.SqlExecutor, apiRefHash string, unitID string) (bool, error) {
	query := `
		SELECT count(sui.id) FROM storage_unit_item sui
		JOIN item on item.id = sui.item_id
		WHERE item.api_ref_hash = $1 AND unit_id = $2
	`
	nb, err := db.SelectInt(query, apiRefHash, unitID)
	if err != nil {
		return false, sdk.WithStack(err)
	}
	return nb > 0, nil
}