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: sqlite3torrentuserdb.go
    path of file: ./repos/exatorrent/internal/db
    
    the code of the file until where you have to start completion: //go:build cgo
// +build cgo

package db

import (
	"sync"

	sqlite "github.com/go-llsqlite/crawshaw"
	"github.com/go
    
func (db *SqliteTorrentUserDb) HasUser(username string, ih string) (ret bool) {
	db.mu.Lock()
	defer db.mu.Unlock()

	serr := sqlitex.Exec(
		db.Db, `select 1 from torrentuserdb where username=? and infohash=?;`,
		func(stmt *sqlite.Stmt) error {
			ret = stmt.ColumnInt(0) == 1
			return nil
		}, username, ih)
	if serr != nil {
		return false
	}
	return
}