// Exists returns true if key exists.
15090
func (m Map) Exists(name string) bool {
	_, exists := m[name]
	return exists
}
37466
func (q *Query) Exists() (bool, error) {
	cp := q.Copy() // copy to not change original query
	cp.columns = []QueryAppender{Q("1")}
	cp.order = nil
	cp.limit = 1
	res, err := q.db.ExecContext(q.ctx, newSelectQuery(cp))
	if err != nil {
		return false, err
	}
	return res.RowsAffected() > 0, nil
}
792577
func (daemon *Daemon) Exists(id string) bool {
	c, _ := daemon.GetContainer(id)
	return c != nil
}
168653
func (s Int64Slice) Exists(x int64) bool {
	i := s.Search(x)
	if i == len(s) {
		return false
	}

	return s[i] == x
}
542104
func (s *Store) Exists(ctx context.Context, name string) bool {
	path := filepath.Join(s.path, filepath.Clean(name))
	out.Debug(ctx, "fs.Exists(%s) - %s", name, path)
	return fsutil.IsFile(path)
}
320979
func (b *BiMap) Exists(k interface{}) bool {
	b.s.RLock()
	defer b.s.RUnlock()
	_, ok := b.forward[k]
	return ok
}
831201
func (batch *UpdateBatch) Exists(ns string, key string) bool {
	nsUpdates, ok := batch.updates[ns]
	if !ok {
		return false
	}
	_, ok = nsUpdates.m[key]
	return ok
}
235295
func (fi *FastIntegerHashMap) Exists(key uint64) bool {
	return fi.packets.exists(key)
}
840234
func (c *Connection) Exists(path string) (bool, error) {
	c.RLock()
	defer c.RUnlock()
	if err := c.isClosed(); err != nil {
		return false, err
	}
	return c.exists(path)
}
1015353
func (d *ExistsResult) Exists() bool {
	return d.keyState != gocbcore.KeyStateNotFound && d.keyState != gocbcore.KeyStateDeleted
}
494141
func (section *Section) Exists(name string) bool {
	_, err := section.Get(name)
	return err == nil
}
913560
func Exists(args ...string) bool {
	if _, err := Raw(append([]string{"-C"}, args...)...); err != nil {
		return false
	}
	return true
}
1064850
func (nsRefcounts_) exists(coll mongo.Collection, key string) (bool, error) {
	count, err := coll.FindId(key).Count()
	if err != nil {
		return false, errors.Trace(err)
	}
	return count != 0, nil
}
777809
func exists(ctx context.Context, db *gorm.DB, tableName, idColumnName, id string, softDeletable bool) (bool, error) {
	var exists bool
	var query string
	if softDeletable {
		query = fmt.Sprintf(`
		SELECT EXISTS (
			SELECT 1 FROM %[1]s
			WHERE
				%[2]s=$1
				AND deleted_at IS NULL
		)`, tableName, idColumnName)
	} else {
		query = fmt.Sprintf(`
		SELECT EXISTS (
			SELECT 1 FROM %[1]s
			WHERE
				%[2]s=$1
		)`, tableName, idColumnName)
	}
	err := db.CommonDB().QueryRow(query, id).Scan(&exists)
	if err == nil && !exists {
		return exists, errors.NewNotFoundError(tableName, id)
	}
	if err != nil {
		return false, errors.NewInternalError(ctx, errs.Wrapf(err, "unable to verify if %s exists", tableName))
	}
	return exists, nil
}
729827
func (ns *Namespace) Exists(name string) bool {
	_, found := ns.deps.Tmpl.Lookup(name)
	return found

}
1286305
func (s *Etcd) Exists(key string) (bool, error) {
	_, err := s.Get(key)
	if err != nil {
		if err == store.ErrKeyNotFound {
			return false, nil
		}
		return false, err
	}
	return true, nil
}
996085
func (c *MemoryStore) Exists(key string) (bool, error) {
	if _, exists := c.cache.Get(key); exists {
		return true, nil
	}
	return false, nil
}