// Select selects the model by primary key.
424260
func (db *baseDB) Select(model interface{}) error {
	return orm.Select(db.db, model)
}
659076
func SELECT(entity interface{}, afterKeyword Expression, binding ...interface{}) Expression {
	return &PrefixedExp{"SELECT", []Expression{FROM(entity, afterKeyword)}, "", binding}
}
1194779
func (s *AccountsService) Select() ([]Account, *http.Response, error) {
	var ald AccountListDTO
	res, err := s.client.get(AccountsURI(), &ald)

	accts := []Account{}
	for _, t := range ald.Accounts {
		accts = append(accts, t)
	}
	return accts, res, err
}
37491
func (table *TableElem) Select(selections ...Selectable) SelectStmt {
	// If additional selections were provide, use the new behavior of
	// selection - this will not add the additional selections to the
	// SelectStmt's FROM clause
	if len(selections) > 0 {
		return SelectTable(table, selections...)
	}

	// Otherwise, use the old behavior
	return Select(table)
}
980997
func (c ConfigSelector) Select(r *http.Request) (config HandlerConfig) {
	for i := range c {
		if !c[i].Match(r) {
			continue
		}
		if config == nil || len(c[i].BasePath()) > len(config.BasePath()) {
			config = c[i]
		}
	}
	return config
}
1056396
func (s *IPDirectionalPoolsService) Select(k IPDirectionalPoolKey, query string) ([]AccountLevelIPDirectionalGroupDTO, error) {
	// TODO: Sane Configuration for timeouts / retries
	maxerrs := 5
	waittime := 5 * time.Second

	// init accumulators
	gs := []AccountLevelIPDirectionalGroupDTO{}
	errcnt := 0
	offset := 0

	for {
		reqIPGroups, ri, res, err := s.SelectWithOffset(k, query, offset)
		if err != nil {
			if res != nil && res.StatusCode >= 500 {
				errcnt = errcnt + 1
				if errcnt < maxerrs {
					time.Sleep(waittime)
					continue
				}
			}
			return gs, err
		}

		log.Printf("ResultInfo: %+v\n", ri)
		for _, g := range reqIPGroups {
			gs = append(gs, g)
		}
		if ri.ReturnedCount+ri.Offset >= ri.TotalCount {
			return gs, nil
		}
		offset = ri.ReturnedCount + ri.Offset
		continue
	}
}
1293451
func (s *sticky) Select(aps []AvailablePlugin, taskID string) (AvailablePlugin, error) {
	if ap, ok := s.plugins[taskID]; ok && ap != nil {
		return ap, nil
	}
	return s.selectPlugin(aps, taskID)
}
273964
func (*CompressionSelector) Select(r *http.Request) Encoder {
	encHeader := r.Header.Get("Accept-Encoding")
	encTypes := strings.FieldsFunc(encHeader, func(r rune) bool {
		return unicode.IsSpace(r) || r == ','
	})

	for _, enc := range encTypes {
		switch enc {
		case "gzip":
			return &gzipEncoder{}
		case "deflate":
			return &flateEncoder{}
		}
	}

	return DefaultEncoder
}
1276724
func (s *TasksService) Select(query string) ([]Task, error) {
	// TODO: Sane Configuration for timeouts / retries
	maxerrs := 5
	waittime := 5 * time.Second

	// init accumulators
	dtos := []Task{}
	offset := 0
	errcnt := 0

	for {
		reqDtos, ri, res, err := s.SelectWithOffset(query, offset)
		if err != nil {
			if res != nil && res.StatusCode >= 500 {
				errcnt = errcnt + 1
				if errcnt < maxerrs {
					time.Sleep(waittime)
					continue
				}
			}
			return dtos, err
		}

		log.Printf("[DEBUG] ResultInfo: %+v\n", ri)
		for _, d := range reqDtos {
			dtos = append(dtos, d)
		}
		if ri.ReturnedCount+ri.Offset >= ri.TotalCount {
			return dtos, nil
		}
		offset = ri.ReturnedCount + ri.Offset
		continue
	}
}
1113484
func (kp *Keypairs) Select(orgID *identity.ID, t primitive.KeyType) (*ClaimedKeyPair, error) {
	if orgID == nil {
		return nil, errors.New("Invalid OrgID Provided to select keypairs")
	}

	possible, ok := kp.keypairs[*orgID]
	if !ok {
		return nil, ErrMissingKeysForOrg
	}

	for _, k := range possible {
		if k.PublicKey.Body.KeyType == t && !k.Revoked() {
			return &k, nil
		}
	}

	return nil, ErrMissingValidKeypair
}
817352
func (f *Filter) Select(metric telegraf.Metric) bool {
	if !f.isActive {
		return true
	}

	if !f.shouldNamePass(metric.Name()) {
		return false
	}

	if !f.shouldTagsPass(metric.TagList()) {
		return false
	}

	return true
}
1016876
func (r *URIHash) Select(pool HostPool, request *http.Request) *UpstreamHost {
	return hostByHashing(pool, request.RequestURI)
}
93154
func (r *RoundRobin) Select(pool HostPool, request *http.Request) *UpstreamHost {
	poolLen := uint32(len(pool))
	r.mutex.Lock()
	defer r.mutex.Unlock()
	// Return next available host
	for i := uint32(0); i < poolLen; i++ {
		r.robin++
		host := pool[r.robin%poolLen]
		if host.Available() {
			return host
		}
	}
	return nil
}
617279
func Select(root NodeNavigator, expr string) *NodeIterator {
	exp, err := Compile(expr)
	if err != nil {
		panic(err)
	}
	return exp.Select(root)
}
600256
func (r *RoundRobin) Select(pool HostPool) *UpstreamHost {
	poolLen := uint32(len(pool))
	selection := atomic.AddUint32(&r.Robin, 1) % poolLen
	host := pool[selection]
	// if the currently selected host is down, just ffwd to up host
	for i := uint32(1); host.Down() && i < poolLen; i++ {
		host = pool[(selection+i)%poolLen]
	}
	return host
}
512477
func Select(dest interface{}, q *gocql.Query) error {
	return Iter(q).Select(dest)
}
1283739
func (c *RedisCache) Select(num int) {
	c.dbno = strconv.Itoa(num)
}