// CheckExists returns nil if the given ID exists otherwise returns an error
342969
func (m *GormIdentityRepository) CheckExists(ctx context.Context, id string) error {
	defer goa.MeasureSince([]string{"goa", "db", "identity", "exists"}, time.Now())
	return base.CheckExists(ctx, m.db, m.TableName(), id)
}
242271
func (s *ExpectedAttributeValue) SetExists(v bool) *ExpectedAttributeValue {
	s.Exists = &v
	return s
}
1110562
func (m *MapOfCharacterToGlyphIndex) KeyExists(k rune) bool {
	/*for _, key := range m.Keys {
		if k == key {
			return true
		}
	}*/
	if _, ok := m.keyIndexs[k]; ok {
		return true
	}
	return false
}
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
}
1092394
func (rd *RAMDirectory) FileExists(name string) bool {
	rd.EnsureOpen()
	rd.fileMapLock.RLock()
	defer rd.fileMapLock.RUnlock()
	_, ok := rd.fileMap[name]
	return ok
}
1066365
func IsExist(fname string) bool {
	_, err := os.Stat(fname)

	return !os.IsNotExist(err)
}
888166
func (asw *actualStateOfWorld) SnapshotExists(snapshotName string) bool {
	asw.RLock()
	defer asw.RUnlock()
	_, snapshotExists := asw.snapshots[snapshotName]

	return snapshotExists
}
168486
func macroExists(m string) bool {
	_, err := os.Stat(path.Join(profileDirectory, m))
	return err == nil
}
1014903
func (m *Manager) imageExists(repo, tag string) (bool, error) {
	if _, err := docker.FindImage(commons.JoinRepoTag(repo, tag), false); docker.IsImageNotFound(err) {
		return false, nil
	} else if err != nil {
		return false, err
	}
	return true, nil
}
625643
func (l *Loader) WalletExists() (bool, error) {
	dbPath := filepath.Join(l.dbDirPath, walletDbName)
	return fileExists(dbPath)
}
187706
func (c *collection) IndexExists(ctx context.Context, name string) (bool, error) {
	req, err := c.conn.NewRequest("GET", path.Join(c.relPath("index"), name))
	if err != nil {
		return false, WithStack(err)
	}
	resp, err := c.conn.Do(ctx, req)
	if err != nil {
		return false, WithStack(err)
	}
	if err := resp.CheckStatus(200); err == nil {
		return true, nil
	} else if IsNotFound(err) {
		return false, nil
	} else {
		return false, WithStack(err)
	}
}
558925
func (actor Actor) FileExists(path string) bool {
	_, err := os.Stat(path)
	return err == nil
}
27176
func (instanceApi *InstanceApi) Exists(id string) (bool, error) {
	_, err := instanceApi.Get(id)
	if err != nil {
		if ccaError, ok := err.(api.CcaErrorResponse); ok && ccaError.StatusCode == 404 {
			return false, nil
		}
		return false, err
	}
	return true, nil
}
410308
func (c *Container) ProcessExists(id string) bool {
	c.mu.Lock()
	defer c.mu.Unlock()
	_, ok := c.processes[id]
	return ok
}
1220851
func (d Data) KeyExists(key string) bool {
	_, found := d.Values[key]
	return found
}
580749
func (runtime *CRIRuntime) ImageExists(image string) (bool, error) {
	err := runtime.exec.Command("crictl", "-r", runtime.criSocket, "inspecti", image).Run()
	return err == nil, nil
}
315578
func (r *GormTrackerRepository) CheckExists(ctx context.Context, id uuid.UUID) error {
	return repository.CheckExists(ctx, r.db, trackersTableName, id)
}