// retrieveAllAgendas returns all the current agendas in the db.
767647
func retrieveAllAgendas(db *sql.DB) (map[string]dbtypes.MileStone, error) {
	rows, err := db.Query(internal.SelectAllAgendas)
	if err != nil {
		return nil, err
	}

	currentMilestones := make(map[string]dbtypes.MileStone)
	defer closeRows(rows)

	for rows.Next() {
		var name string
		var m dbtypes.MileStone
		err = rows.Scan(&m.ID, &name, &m.Status, &m.VotingDone,
			&m.Activated, &m.HardForked)
		if err != nil {
			break
		}

		currentMilestones[name] = m
	}

	return currentMilestones, err
}
296759
func (f *Facade) GetRegistryImages(ctx datastore.Context) ([]registry.Image, error) {
	defer ctx.Metrics().Stop(ctx.Metrics().Start("Facade.GetRegistryImages"))
	rImages, err := f.registryStore.GetImages(ctx)
	if err != nil {
		return nil, err
	}
	return rImages, nil
}
617455
func (o *L2Domain) EgressAdvFwdTemplates(info *bambou.FetchingInfo) (EgressAdvFwdTemplatesList, *bambou.Error) {

	var list EgressAdvFwdTemplatesList
	err := bambou.CurrentSession().FetchChildren(o, EgressAdvFwdTemplateIdentity, &list, info)
	return list, err
}
383936
func (t *Template) GetAllAWSAppMeshRouteResources() map[string]*resources.AWSAppMeshRoute {
	results := map[string]*resources.AWSAppMeshRoute{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSAppMeshRoute:
			results[name] = resource
		}
	}
	return results
}
333324
func (t *Template) GetAllAWSEMRStepResources() map[string]*resources.AWSEMRStep {
	results := map[string]*resources.AWSEMRStep{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSEMRStep:
			results[name] = resource
		}
	}
	return results
}
1031848
func (as *availabilitySet) GetDataDisks(nodeName types.NodeName) ([]compute.DataDisk, error) {
	vm, err := as.getVirtualMachine(nodeName)
	if err != nil {
		return nil, err
	}

	if vm.StorageProfile.DataDisks == nil {
		return nil, nil
	}

	return *vm.StorageProfile.DataDisks, nil
}
1062427
func (t *Template) GetAllAWSAppSyncDataSourceResources() map[string]*resources.AWSAppSyncDataSource {
	results := map[string]*resources.AWSAppSyncDataSource{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSAppSyncDataSource:
			results[name] = resource
		}
	}
	return results
}
1195122
func (m *Manifest) getAdapterNames(adapters map[string]NewAdapterFunc) []string {
	if m.basicTransfersOnly {
		return []string{BasicAdapterName}
	}

	m.mu.Lock()
	defer m.mu.Unlock()

	ret := make([]string, 0, len(adapters))
	for n, _ := range adapters {
		ret = append(ret, n)
	}
	return ret
}
746161
func (t *Template) GetAllAWSIoTAnalyticsDatastoreResources() map[string]*resources.AWSIoTAnalyticsDatastore {
	results := map[string]*resources.AWSIoTAnalyticsDatastore{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSIoTAnalyticsDatastore:
			results[name] = resource
		}
	}
	return results
}
873217
func (_m *CollectionStore) RetrieveCollection(_a0 common.CollectionCriteria) (privdata.Collection, error) {
	ret := _m.Called(_a0)

	var r0 privdata.Collection
	if rf, ok := ret.Get(0).(func(common.CollectionCriteria) privdata.Collection); ok {
		r0 = rf(_a0)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(privdata.Collection)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(common.CollectionCriteria) error); ok {
		r1 = rf(_a0)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
1218877
func (t *Template) GetAllAWSGreengrassGroupResources() map[string]*resources.AWSGreengrassGroup {
	results := map[string]*resources.AWSGreengrassGroup{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSGreengrassGroup:
			results[name] = resource
		}
	}
	return results
}
349352
func (t *Template) GetAllAWSDAXClusterResources() map[string]*resources.AWSDAXCluster {
	results := map[string]*resources.AWSDAXCluster{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSDAXCluster:
			results[name] = resource
		}
	}
	return results
}
993646
func (_m *Facade) GetTenantIDs(ctx datastore.Context) ([]string, error) {
	ret := _m.Called(ctx)

	var r0 []string
	if rf, ok := ret.Get(0).(func(datastore.Context) []string); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(datastore.Context) error); ok {
		r1 = rf(ctx)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
53998
func (pgb *ChainDB) NumAddressIntervals(addr string, grouping dbtypes.TimeBasedGrouping) (int64, error) {
	ctx, cancel := context.WithTimeout(pgb.ctx, pgb.queryTimeout)
	defer cancel()
	return retrieveAddressTxsCount(ctx, pgb.db, addr, grouping.String())
}
1269124
func (t *Template) GetAllAWSRDSDBClusterResources() map[string]*resources.AWSRDSDBCluster {
	results := map[string]*resources.AWSRDSDBCluster{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSRDSDBCluster:
			results[name] = resource
		}
	}
	return results
}
1118038
func (e *Enforcer) GetAllNamedRoles(ptype string) []string {
	return e.model.GetValuesForFieldInPolicy("g", ptype, 1)
}
367814
func (t *Template) GetAllAWSGlueTriggerResources() map[string]*resources.AWSGlueTrigger {
	results := map[string]*resources.AWSGlueTrigger{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSGlueTrigger:
			results[name] = resource
		}
	}
	return results
}