// All the IDs corresponding to the given value
11948
func (idx *ListIndex) All(value []byte, opts *Options) ([][]byte, error) {
	var list [][]byte
	c := idx.IndexBucket.Cursor()
	cur := internal.Cursor{C: c, Reverse: opts != nil && opts.Reverse}

	prefix := generatePrefix(value)

	k, id := c.Seek(prefix)
	if cur.Reverse {
		var count int
		kc := k
		idc := id
		for ; kc != nil && bytes.HasPrefix(kc, prefix); kc, idc = c.Next() {
			count++
			k, id = kc, idc
		}
		if kc != nil {
			k, id = c.Prev()
		}
		list = make([][]byte, 0, count)
	}

	for ; bytes.HasPrefix(k, prefix); k, id = cur.Next() {
		if opts != nil && opts.Skip > 0 {
			opts.Skip--
			continue
		}

		if opts != nil && opts.Limit == 0 {
			break
		}

		if opts != nil && opts.Limit > 0 {
			opts.Limit--
		}

		list = append(list, id)
	}

	return list, nil
}
85852
func (item *MultiGetItem) Id(id string) *MultiGetItem {
	item.id = id
	return item
}
562894
func (c *Cluster) AllocIDs(n int) []uint64 {
	c.Lock()
	defer c.Unlock()

	var ids []uint64
	for len(ids) < n {
		ids = append(ids, c.allocID())
	}
	return ids
}
486580
func (s *GetTemplateService) Id(id string) *GetTemplateService {
	s.id = id
	return s
}
1080753
func (e Event) Id() common.Hash {
	types := make([]string, len(e.Inputs))
	i := 0
	for _, input := range e.Inputs {
		types[i] = input.Type.String()
		i++
	}
	return common.BytesToHash(crypto.Keccak256([]byte(fmt.Sprintf("%v(%v)", e.Name, strings.Join(types, ",")))))
}
1337247
func (m BoolMapper) ID(bi ...interface{}) (rowIDs []int64, err error) {
	return []int64{bi[0].(int64)}, nil
}
1101065
func partitionIds(maxIds int, ids []string) [][]string {
	index := 0
	total := len(ids)
	var partitions [][]string
	for remaining := total - index; remaining > 0; remaining = total - index {
		if remaining < maxIds {
			partitions = append(partitions, ids[index:])
			break
		} else {
			partitions = append(partitions, ids[index:index+maxIds])
			index += maxIds
		}
	}

	return partitions
}
1242606
func (c *Connection) ID() int {
	c.RLock()
	defer c.RUnlock()
	return c.id
}
1049447
func (t *IPsTable) ids(c context.Context) map[common.IPv4]int64 {
	ips := make(map[common.IPv4]int64, len(t.current))
	for _, ip := range t.current {
		ips[ip.IPv4] = ip.Id
	}
	return ips
}
751803
func (c idExporter) findIDs() ([]id, error) {
	var idsList []id
	_, err := c.dbMap.Select(
		&idsList,
		`SELECT id
		FROM registrations
		WHERE contact != 'null' AND
			id IN (
				SELECT registrationID
				FROM certificates
				WHERE expires >= :expireCutoff
			);`,
		map[string]interface{}{
			"expireCutoff": c.clk.Now().Add(-c.grace),
		})
	if err != nil {
		c.log.AuditErrf("Error finding IDs: %s", err)
		return nil, err
	}

	return idsList, nil
}
1074724
func (dht *DHT) id(target string) string {
	if dht.IsStandardMode() || target == "" {
		return dht.node.id.RawString()
	}
	return target[:15] + dht.node.id.RawString()[15:]
}
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
}
1048530
func (p *Secring) KeyIDs() []string {
	p.Lock()
	defer p.Unlock()

	ids := make([]string, 0, len(p.data.PrivateKeys))
	for _, pk := range p.data.PrivateKeys {
		ids = append(ids, pk.PublicKey.Fingerprint)
	}
	sort.Strings(ids)
	return ids
}
1279001
func (r *BulkDeleteRequest) Id(id string) *BulkDeleteRequest {
	r.id = id
	r.source = nil
	return r
}
1145828
func (s *IngestDeletePipelineService) Id(id string) *IngestDeletePipelineService {
	s.id = id
	return s
}
620927
func (self *LightingX10) Id() string {
	return fmt.Sprintf("%s%02x", lightingX10HouseCodes[self.HouseCode], self.UnitCode)
}
706789
func (c *lruCache) IDs() []uint64 {
	a := make([]uint64, 0, len(c.counts))
	for id := range c.counts {
		a = append(a, id)
	}
	sort.Sort(uint64Slice(a))
	return a
}