// DocumentExists checks if a document with given key exists in the collection.
177740
func (c *edgeCollection) DocumentExists(ctx context.Context, key string) (bool, error) {
	if result, err := c.rawCollection().DocumentExists(ctx, key); err != nil {
		return false, WithStack(err)
	} else {
		return result, nil
	}
}
672183
func (r *Redis) IsExist(key string) bool {
	conn := r.conn.Get()
	defer conn.Close()

	a, _ := conn.Do("EXISTS", key)
	i := a.(int64)
	if i > 0 {
		return true
	}
	return false
}
1009867
func IsPathExists(pth string) (bool, error) {
	_, isExists, err := genericIsPathExists(pth)
	return isExists, err
}
558925
func (actor Actor) FileExists(path string) bool {
	_, err := os.Stat(path)
	return err == nil
}
93725
func (m *GormCommentRepository) CheckExists(ctx context.Context, id uuid.UUID) error {
	defer goa.MeasureSince([]string{"goa", "db", "comment", "exists"}, time.Now())
	return repository.CheckExists(ctx, m.db, Comment{}.TableName(), id)
}
643959
func (d *dbBasePostgres) IndexExists(db dbQuerier, table string, name string) bool {
	query := fmt.Sprintf("SELECT COUNT(*) FROM pg_indexes WHERE tablename = '%s' AND indexname = '%s'", table, name)
	row := db.QueryRow(query)
	var cnt int
	row.Scan(&cnt)
	return cnt > 0
}
1283280
func (c *FileCacher) IsExist(key string) bool {
	return com.IsExist(c.filepath(key))
}
346253
func (mock *Mock) FileExists(file string) bool {
	items := mock.getReturnValues("FileExists")
	return items[0].(bool)
}
400507
func (r *Response) fileExists(file string) bool {
	if _, err := os.Stat(file); err == nil {
		return true
	}

	r.Status = http.StatusNotFound
	log.Warnf("cannot find %s file", file)
	return false
}
900666
func (c *Connector) ScopeExists(ctx context.Context, scope string) (bool, error) {
	panic("not implemented")
}
720112
func (m *GormRoleMappingRepository) CheckExists(ctx context.Context, id uuid.UUID) error {
	defer goa.MeasureSince([]string{"goa", "db", "role_mapping", "exists"}, time.Now())
	return base.CheckExistsWithCustomIDColumn(ctx, m.db, m.TableName(), "role_mapping_id", id.String())
}
610359
func (c *Collection) Exists(id string) (bool, error) {
	t := c.pool.NewTransaction()
	exists := false
	t.Exists(c, id, &exists)
	if err := t.Exec(); err != nil {
		return false, err
	}
	return exists, nil
}
1239536
func (d Data) FileExists(key string) bool {
	_, found := d.Files[key]
	return found
}
1231497
func (c *Connector) ScopeExists(ctx context.Context, scope string) (bool, error) {
	return true, nil
}
408657
func (rh *HashMap) Exists(elementid string) (bool, error) {
	// TODO: key is not meant to be a wildcard, check for "*"
	return hasKey(rh.pool, rh.id+":"+elementid, rh.dbindex)
}
1021159
func imageExists(reg registry.Registry, imageID image.Ref) (bool, error) {
	_, err := reg.GetImage(imageID)
	if err != nil {
		return false, nil
	}
	return true, nil
}
211526
func (stmt SelectStmt) TableExists(name string) bool {
	for _, table := range stmt.tables {
		if table.Name() == name {
			return true
		}
	}
	return false
}