// GetQueryArray returns a slice of strings for a given query key, plus
// a boolean value whether at least one value exists for the given key.
337836
func (c *Context) GetQueryArray(key string) ([]string, bool) {
	if values, ok := c.Request.URL.Query()[key]; ok && len(values) > 0 {
		return values, true
	}
	return []string{}, false
}
1367731
func (k *KeyValueYARPCServer) GetValue(ctx context.Context, request *examplepb.GetValueRequest) (*examplepb.GetValueResponse, error) {
	if request == nil {
		return nil, errRequestNil
	}
	if request.Key == "" {
		return nil, errRequestKeyNil
	}
	k.RLock()
	if value, ok := k.items[request.Key]; ok {
		k.RUnlock()
		var nextError error
		k.Lock()
		if k.nextError != nil {
			nextError = k.nextError
			k.nextError = nil
		}
		k.Unlock()
		return &examplepb.GetValueResponse{Value: value}, nextError
	}
	k.RUnlock()
	return nil, yarpcerrors.Newf(yarpcerrors.CodeNotFound, request.Key)
}
556224
func getArray(schema proto.Schema) (*proto.Array, error) {
	if schema == nil {
		return nil, nil
	}
	visitor := &arraySchemaVisitor{}
	schema.Accept(visitor)
	return visitor.Result, visitor.Err
}
741792
func (env *Environment) GetArray(key string, overrideDefault *[]string) ([]string, error) {
	var oD *string
	if overrideDefault != nil {
		if len(*overrideDefault) > 0 {
			ovr := (*overrideDefault)[0]
			oD = &ovr
		}
	}
	v, e := env.Get(key, oD)
	arr := []string{v}

	if env.supportArrays {
		if strings.Contains(v, ",") {
			arr = strings.Split(v, ",")
		}
	}

	if len(v) > 0 {
		return arr, e
	}
	return []string{}, e
}
1204715
func (d *NullDatastore) Get(key Key) (value []byte, err error) {
	return nil, ErrNotFound
}
353916
func (k *KV) Get(key string, q *QueryOptions) (*KVPair, *QueryMeta, error) {
	resp, qm, err := k.getInternal(key, nil, q)
	if err != nil {
		return nil, nil, err
	}
	if resp == nil {
		return nil, qm, nil
	}
	defer resp.Body.Close()

	var entries []*KVPair
	if err := decodeBody(resp, &entries); err != nil {
		return nil, nil, err
	}
	if len(entries) > 0 {
		return entries[0], qm, nil
	}
	return nil, qm, nil
}
599753
func (j *JsonQuery) ArrayOfArrays(s ...string) ([][]interface{}, error) {
	array, err := j.Array(s...)
	if err != nil {
		return [][]interface{}{}, err
	}
	toReturn := make([][]interface{}, len(array))
	for index, val := range array {
		toReturn[index], err = arrayFromInterface(val)
		if err != nil {
			return toReturn, err
		}
	}
	return toReturn, nil
}
1016070
func GetMany(json string, path ...string) []Result {
	res := make([]Result, len(path))
	for i, path := range path {
		res[i] = Get(json, path)
	}
	return res
}
466657
func (s *DbSession) findQuery(d Document, q Q) *mgo.Query {
	//collection pointer for the given document
	return s.collection(d.CollectionName()).Find(q)
}
705694
func getStringArrayVar(key string, defaultVal string) []string {
	valueString := os.Getenv(key)

	if valueString == "" {
		valueString = defaultVal
	}

	valueSlice := splitDelimmitedString(valueString, stringListDelimitRegex)

	return valueSlice
}
374388
func Ginqueryarrayextract(db XODB, v0 pgtypes.Anyarray, v1 pgtypes.Internal, v2 int16, v3 pgtypes.Internal, v4 pgtypes.Internal, v5 pgtypes.Internal, v6 pgtypes.Internal) (pgtypes.Internal, error) {
	var err error

	// sql query
	const sqlstr = `SELECT pg_catalog.ginqueryarrayextract($1, $2, $3, $4, $5, $6, $7)`

	// run query
	var ret pgtypes.Internal
	XOLog(sqlstr, v0, v1, v2, v3, v4, v5, v6)
	err = db.QueryRow(sqlstr, v0, v1, v2, v3, v4, v5, v6).Scan(&ret)
	if err != nil {
		return pgtypes.Internal{}, err
	}

	return ret, nil
}
979863
func (ts *TripleStore) QueryArrayOp(q *protocol.ArrayOp, limit int) ([]*protocol.Triple, error) {
	query := ArrayOpToSQL(q)
	args := make([]interface{}, len(query)-1)
	for i, arg := range query[1:] {
		args[i] = arg
	}
	dbq := ts.db.Where(query[0], args...)
	if limit > 0 {
		dbq = dbq.Limit(limit)
	}
	var results []*protocol.Triple
	if err := dbq.Find(&results).Error; err != nil {
		return nil, err
	}
	return results, nil
}
977207
func (r *request) GetQueryParams() url.Values {
	var result = make(url.Values)
	for key, value := range r.query {
		result[key] = append([]string{}, value...)
	}
	return result
}
851138
func (c *Context) GetPostFormArray(key string) ([]string, bool) {
	req := c.Request
	if err := req.ParseMultipartForm(c.engine.MaxMultipartMemory); err != nil {
		if err != http.ErrNotMultipart {
			debugPrint("error on parse multipart form array: %v", err)
		}
	}
	if values := req.PostForm[key]; len(values) > 0 {
		return values, true
	}
	if req.MultipartForm != nil && req.MultipartForm.File != nil {
		if values := req.MultipartForm.Value[key]; len(values) > 0 {
			return values, true
		}
	}
	return []string{}, false
}
649432
func (that *JSONNode) GetKeys() []interface{} {
	var ret []interface{}
	switch that.t {
	case TypeMap:
		nb := len(that.m)
		ret = make([]interface{}, nb)
		for key := range that.m {
			nb--
			ret[nb] = key
		}
	case TypeArray:
		nb := len(that.a)
		ret = make([]interface{}, nb)
		for nb > 0 {
			nb--
			ret[nb] = nb
		}
	default:
		panic(ErrorGetKeys)
	}
	return ret
}
1103846
func (r *URLQueryReader) Get(name string, def string) string {
	val := r.values[name]
	if len(val) == 0 {
		return def
	}

	return val[0]
}
870304
func (reader PluginConfigReaderWithError) GetStringArray(key string, defaultValue []string) ([]string, error) {
	key = reader.config.registerKey(key)
	if reader.HasValue(key) {
		return reader.config.Settings.StringArray(key)
	}
	return defaultValue, nil
}