// Value returns the sort value of the DocumentMatch
// it also resets the state of this SortField for
// processing the next document
342479
func (s *SortField) Value(i *DocumentMatch) string {
	iTerms := s.filterTermsByType(s.values)
	iTerm := s.filterTermsByMode(iTerms)
	s.values = s.values[:0]
	return iTerm
}
835336
func (c *UsersProfileSetCall) Value(value string) *UsersProfileSetCall {
	c.value = value
	return c
}
811622
func (a StringArray) Value() (driver.Value, error) {
	if a == nil {
		return nil, nil
	}

	res := make([]string, len(a))
	for i, e := range a {
		r := e
		r = strings.Replace(r, `\`, `\\`, -1)
		r = strings.Replace(r, `"`, `\"`, -1)
		res[i] = `"` + r + `"`
	}
	return []byte("{" + strings.Join(res, ",") + "}"), nil
}
290750
func (c *APIContext) Value(key interface{}) interface{} {
	if keyAsString, ok := key.(string); ok {
		val, _ := c.Get(keyAsString)
		return val
	}
	return nil
}
662721
func (src *TimestampArray) Value() (driver.Value, error) {
	buf, err := src.EncodeText(nil, nil)
	if err != nil {
		return nil, err
	}
	if buf == nil {
		return nil, nil
	}

	return string(buf), nil
}
353035
func (p *ctx) Value(key interface{}) interface{} {
	if k, ok := key.(string); ok {
		if val, exist := p.ParamOk(k); exist {
			return val
		}
	}

	return p.parent.Value(key)
}
223776
func (it *Iterator) Value() []byte {
	v := it.it.Value()
	if v == nil {
		return nil
	}

	return append([]byte{}, v...)
}
543950
func (m JsonHelperScannable) Value() (driver.Value, error) {
	jsonBytes, err := json.Marshal(u.JsonHelper(m))
	if err != nil {
		return []byte{}, err
	}
	return jsonBytes, nil
}
1365285
func (c *Context) Value(key interface{}) interface{} {
	if s, ok := key.(string); ok {
		if v, ok := c.data[s]; ok {
			return v
		}
	}
	return c.Context.Value(key)
}
309273
func (b Base) Value() (driver.Value, error) {
	if b.Delete {
		return nil, nil
	}

	results, err := json.Marshal(b)
	return string(results), err
}
323523
func (iter *Iterator) Value() Entry {
	if iterExhausted(iter) {
		return nil
	}

	if iter.entries == nil || iter.index < 0 || iter.index >= len(iter.entries.entries) {
		return nil
	}

	return iter.entries.entries[iter.index]
}
927034
func (w *Value) Value() interface{} {
	w.lock.Lock()
	defer w.lock.Unlock()

	// If we already have a value just return
	for !w.valueSet {
		// No value, setup the condition variable if we have to
		if w.cond == nil {
			w.cond = sync.NewCond(&w.lock)
		}

		// Wait on it
		w.cond.Wait()
	}

	// Return the value
	return w.value
}
207608
func (d *decodeState) value(v reflect.Value) {
	if !v.IsValid() {
		d.next()
		return
	}
	switch op := d.peekState(); op {
	default:
		d.error(errPhase)

	case scanBeginArray:
		d.array(v)

	case scanBeginObject:
		d.object(v)

	case scanBeginLiteral:
		d.literal(v)
	}
}
1263917
func (kv KeyVal) Value() string {
	if !strings.Contains(string(kv), "=") {
		return ""
	}
	return strings.SplitN(strings.TrimSpace(string(kv)), "=", 2)[1]
}
1001564
func (n *leafPageElement) value() []byte {
	buf := (*[maxAllocSize]byte)(unsafe.Pointer(n))
	return buf[n.pos+n.ksize : n.pos+n.ksize+n.vsize]
}
1230236
func (f *Field) Value() interface{} {
	pieces := strings.Split(f.Name, ".")
	answer, ok := f.viewArgs[pieces[0]]
	if !ok {
		return ""
	}

	val := reflect.ValueOf(answer)
	for i := 1; i < len(pieces); i++ {
		if val.Kind() == reflect.Ptr {
			val = val.Elem()
		}
		val = val.FieldByName(pieces[i])
		if !val.IsValid() {
			return ""
		}
	}

	return val.Interface()
}
125423
func (c *Etcd2Lock) Value() (bool, string, error) {
	semaphoreKey, semaphoreValue, _, err := c.getSemaphoreKey()
	if err != nil {
		return false, "", err
	}

	if semaphoreKey == "" {
		return false, "", nil
	}
	return true, semaphoreValue, nil
}