// Has returns true if the DB does contains the given key.
//
// It is safe to modify the contents of the argument after Has returns.
181363
func (db *DB) Has(key []byte, ro *opt.ReadOptions) (ret bool, err error) {
	err = db.ok()
	if err != nil {
		return
	}

	se := db.acquireSnapshot()
	defer db.releaseSnapshot(se)
	return db.has(nil, nil, key, se.seq, ro)
}
149667
func (snap *dbCacheSnapshot) Has(key []byte) bool {
	// Check the cached entries first.
	if snap.pendingRemove.Has(key) {
		return false
	}
	if snap.pendingKeys.Has(key) {
		return true
	}

	// Consult the database.
	hasKey, _ := snap.dbSnapshot.Has(key, nil)
	return hasKey
}
34204
func (m ConcurrentMap) Has(key string) bool {
	// Get shard
	shard := m.GetShard(key)
	shard.RLock()
	// See if element is within shard.
	_, ok := shard.items[key]
	shard.RUnlock()
	return ok
}
167130
func (s *Set) Has(c Cid) bool {
	_, ok := s.set[c]
	return ok
}
318584
func (m *MemLogger) Has(lvl logging.Level, msg string, data map[string]interface{}) bool {
	return m.Get(lvl, msg, data) != nil
}
613827
func (ndb *nodeDB) Has(hash []byte) bool {
	key := ndb.nodeKey(hash)

	if ldb, ok := ndb.db.(*dbm.GoLevelDB); ok {
		exists, err := ldb.DB().Has(key, nil)
		if err != nil {
			panic("Got error from leveldb: " + err.Error())
		}
		return exists
	}
	return ndb.db.Get(key) != nil
}
1075170
func (ls *LocalStore) Has(ctx context.Context, addr Address) bool {
	return ls.DbStore.Has(ctx, addr)
}
339141
func (p Protected) Has(key string) bool {
	_, ok := p[key]
	return ok
}
349989
func (s Set) Has(value string) bool {
	_, ret := s[value]
	return ret
}
770814
func (b Box) Has(name string) bool {
	_, err := b.find(name)
	if err != nil {
		return false
	}
	return true
}
1071218
func (d *NullDatastore) Has(key Key) (exists bool, err error) {
	return false, nil
}
684730
func (s *Set) Has(value string) (exists bool, err error) {
	if s.name == nil {
		return false, ErrDoesNotExist
	}
	return exists, (*bbolt.DB)(s.db).View(func(tx *bbolt.Tx) error {
		bucket := tx.Bucket(s.name)
		if bucket == nil {
			return ErrBucketNotFound
		}
		bucket.ForEach(func(_, byteValue []byte) error {
			if value == string(byteValue) {
				exists = true
				return ErrFoundIt // break the ForEach by returning an error
			}
			return nil // Continue ForEach
		})
		return nil // Return from View function
	})
}
48698
func (d Document) Has(k string) bool {
	_, ok := d[k]
	return ok
}
400568
func (b *BoltKeyspace) Contains(key string) (exists bool, err error) {

    err = b.db.View(func(tx *bolt.Tx) error {
        b := tx.Bucket([]byte(b.name))
        value := b.Get([]byte(key))
        if value != nil {
            exists = true
        }
        return nil
    })

    return exists, err
}
527664
func (d *Datastore) Has(key ds.Key) (exists bool, err error) {
	return d.child.Has(d.ConvertKey(key))
}
1280626
func (c *ARC) Has(key interface{}) bool {
	c.mu.RLock()
	defer c.mu.RUnlock()
	now := time.Now()
	return c.has(key, &now)
}
1133395
func (f Index) Has(keyFields Item) (bool, error) {
	key, err := f.encodeKeyFunc(keyFields)
	if err != nil {
		return false, err
	}
	return f.db.Has(key)
}