// IDs returns only the ids of the models without actually retrieving the
// models themselves. IDs will return the first error that occurred during the
// lifetime of the query (if any).
427157
func (q *Query) IDs() ([]string, error) {
	tx := q.pool.NewTransaction()
	ids := []string{}
	newTransactionQuery(q.query, tx).IDs(&ids)
	if err := tx.Exec(); err != nil {
		return nil, err
	}
	return ids, nil
}
333837
func (d *Dispatch) GetIds(names ...string) (dispid []int32, err error) {
	dispid, err = d.Object.GetIDsOfName(names)
	return
}
711291
func (offers Slice) IDs() []mesos.OfferID {
	ids := make([]mesos.OfferID, len(offers))
	for i := range offers {
		ids[i] = offers[i].ID
	}
	return ids
}
788824
func NewIdsQuery(types ...string) *IdsQuery {
	return &IdsQuery{
		types:  types,
		values: make([]string, 0),
	}
}
595068
func RetrieveVinsByIDs(ctx context.Context, db *sql.DB, vinDbIDs []uint64) ([]dbtypes.VinTxProperty, error) {
	vins := make([]dbtypes.VinTxProperty, len(vinDbIDs))
	for i, id := range vinDbIDs {
		vin := &vins[i]
		err := db.QueryRowContext(ctx, internal.SelectAllVinInfoByID, id).Scan(&vin.TxID,
			&vin.TxIndex, &vin.TxTree, &vin.IsValid, &vin.IsMainchain,
			&vin.Time, &vin.PrevTxHash, &vin.PrevTxIndex, &vin.PrevTxTree,
			&vin.ValueIn, &vin.TxType)
		if err != nil {
			return nil, err
		}
	}
	return vins, nil
}
1194049
func (p IndexFiles) IDs() []int {
	a := make([]int, len(p))
	for i, f := range p {
		a[i] = f.ID()
	}
	return a
}
1169367
func (s *PercolateService) Id(id string) *PercolateService {
	s.id = id
	return s
}
724414
func (t *RacksTable) ids(c context.Context) map[string]int64 {
	racks := make(map[string]int64, len(t.current))
	for _, rack := range t.current {
		racks[rack.Name] = rack.Id
	}
	return racks
}
31411
func getIds(u *user.User) (C.int, C.int, error) {
	uid, err := strconv.Atoi(u.Uid)
	if err != nil {
		return -1, -1, fmt.Errorf("invalid uid: %v", err)
	}

	gid, err := strconv.Atoi(u.Gid)
	if err != nil {
		return -1, -1, fmt.Errorf("invalid gid: %v", err)
	}
	return C.int(uid), C.int(gid), nil
}
425338
func BuildWithIDs(keywords []string, ids []int) (DoubleArray, error) {
	d := DoubleArray{}
	d.init()
	if len(keywords) != len(ids) {
		return d, fmt.Errorf("invalid arguments")
	}
	if len(keywords) == 0 {
		return d, nil
	}
	if !sort.StringsAreSorted(keywords) {
		h := make(map[string]int)
		for i, key := range keywords {
			h[key] = ids[i]
		}
		sort.Strings(keywords)
		ids = ids[:0]
		for _, key := range keywords {
			ids = append(ids, h[key])
		}
	}
	branches := make([]int, len(keywords))
	for i := range keywords {
		branches[i] = i
	}
	d.add(0, 0, branches, keywords, ids)
	d.truncate()
	return d, nil
}
1291502
func (a Nodes) IDs() []string {
	ids := make([]string, len(a))
	for i, n := range a {
		ids[i] = n.ID
	}
	return ids
}
1248508
func (self *Model) Delete(ids ...interface{}) error {
	return self.db.Delete(self.collection.Name, ids...)
}
888496
func (s *TermvectorsService) Id(id string) *TermvectorsService {
	s.id = id
	return s
}
1156434
func (idm *IdentityManager) GetIdentityModels() []*models.IdentityEndpoints {
	idm.mutex.RLock()
	defer idm.mutex.RUnlock()

	identities := make([]*models.IdentityEndpoints, 0, len(idm.identities))

	for _, v := range idm.identities {
		identities = append(identities, &models.IdentityEndpoints{
			Identity: v.identity.GetModel(),
			RefCount: int64(v.refCount),
		})
	}

	return identities
}
1170921
func (self *Model) Get(id interface{}, into interface{}) error {
	if record, err := self.db.Retrieve(self.collection.Name, id); err == nil {
		return record.Populate(into, self.collection)
	} else {
		return err
	}
}
547977
func (ind *Indices) extractIndexes(indexIds []string) IndexMetadataSlice {
	result := make(IndexMetadataSlice, 0, len(ind.Indexes))
	if len(indexIds) == 0 {
		// No ids specified so return everything.
		for _, metadata := range ind.Indexes {
			result = append(result, metadata)
		}
	} else {
		// Return metadata for just the specified ids.
		for _, id := range indexIds {
			if metadata, ok := ind.Indexes[id]; ok {
				result = append(result, metadata)
			}
		}
	}
	return result
}
832361
func ByIDs(ids ...string) Filter {
	var filters = make([]Filter, 0, len(ids))
	for _, id := range ids {
		id := id
		filters = append(filters, func(a Artifact) bool {
			return a.ExtraOr("ID", "") == id
		})
	}
	return Or(filters...)
}