// AddValuesFromIterator adds values to an array from the given iterator.
// The array must be opened before a call to this function and the array is left open Intentionally.
332166
func (b *Builder) AddValuesFromIterator(it *ArrayIterator) error {
	if b.stack.IsEmpty() {
		return WithStack(BuilderNeedOpenArrayError)
	}
	tos, _ := b.stack.Tos()
	h := b.buf[tos]
	if h != 0x06 && h != 0x13 {
		return WithStack(BuilderNeedOpenArrayError)
	}
	for it.IsValid() {
		v, err := it.Value()
		if err != nil {
			return WithStack(err)
		}
		if err := b.addInternal(NewSliceValue(v)); err != nil {
			return WithStack(err)
		}
		if err := it.Next(); err != nil {
			return WithStack(err)
		}
	}
	return nil
}
819223
func nextValues(node *parser.Node) []string {
	if node == nil {
		return nil
	}
	var values []string
	for next := node.Next; next != nil; next = next.Next {
		values = append(values, next.Value)
	}
	return values
}
896941
func expandKeyValuePairs(keyValuePairs []interface{}) string {
	kvPairs := make([]string, 0, len(keyValuePairs)/2)

	// Just ignore the last dangling kv if odd #, cuz bug.
	for i, kv := range keyValuePairs {
		if i%2 == 1 {
			kvPairs = append(kvPairs, fmt.Sprintf("%v='%v'", keyValuePairs[i-1], kv))
		}
	}

	return strings.Join(kvPairs, " ")
}
1284894
func (l *List) Add(values ...interface{}) {
	l.values = append(l.values, values...)
}
1067260
func (_m *DBClient) ValueDescriptors() ([]models.ValueDescriptor, error) {
	ret := _m.Called()

	var r0 []models.ValueDescriptor
	if rf, ok := ret.Get(0).(func() []models.ValueDescriptor); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]models.ValueDescriptor)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
1202412
func bindValues(keyvals []interface{}) {
	for i := 1; i < len(keyvals); i += 2 {
		if v, ok := keyvals[i].(Valuer); ok {
			keyvals[i] = v()
		}
	}
}
449903
func (d *Database) SomeValues(src interface{}, columns []string) ([]interface{}, error) {
	data, err := getFields(reflect.TypeOf(src))
	if err != nil {
		return nil, err
	}
	structVal := reflect.ValueOf(src).Elem()

	var values []interface{}
	for _, name := range columns {
		field, present := data.fields[name]
		if !present {
			// write null to the database
			values = append(values, nil)

			if Debug {
				log.Printf("meddler.SomeValues: column [%s] not found in struct", name)
			}
			continue
		}

		saveVal, err := field.meddler.PreWrite(structVal.Field(field.index).Interface())
		if err != nil {
			return nil, fmt.Errorf("meddler.SomeValues: PreWrite error on column [%s]: %v", name, err)
		}
		values = append(values, saveVal)
	}

	return values, nil
}
1123338
func (m *MultiMap) Values() []interface{} {
	values := make([]interface{}, m.Size())
	count := 0
	for _, vs := range m.m {
		for _, value := range vs {
			values[count] = value
			count++
		}
	}
	return values
}
41687
func (b *Builder) addCompoundValue(vType byte) {
	pos := b.buf.Len()
	b.stack.Push(pos)
	stackLen := b.stack.Len()
	toAdd := stackLen - len(b.index)
	for toAdd > 0 {
		newIndex := make(indexVector, 0, 16) // Pre-allocate 16 entries so we don't have to allocate memory for the first 16 entries
		b.index = append(b.index, newIndex)
		toAdd--
	}
	b.index[stackLen-1].Clear()
	b.buf.Write([]byte{vType, 0, 0, 0, 0, 0, 0, 0, 0})
}
245733
func (m *Meta) CopyInsertValues(i interface{}, values []interface{}) {
	ptr := reflects.Ptr(i)
	for vi, fi := range m.insertIndexes {
		values[vi] = m.fields[fi].Get(ptr)
	}
}
332838
func (s *CacheBehavior) SetForwardedValues(v *ForwardedValues) *CacheBehavior {
	s.ForwardedValues = v
	return s
}
876342
func (f *Values) Add(key, val string) {
	f.values = append(f.values, formValue{key, val})
}
837669
func (me *DefaultAdapter) updateValuesSql(buf *SqlBuilder, updates ...UpdateExpression) error {
	if len(updates) == 0 {
		return NewGoquError("No update values provided")
	}
	updateLen := len(updates)
	for i, update := range updates {
		if err := me.Literal(buf, update); err != nil {
			return err
		}
		if i < updateLen-1 {
			buf.WriteRune(comma_rune)
		}
	}
	return nil

}
239042
func (k *Key) AddNestedValue(val string) error {
	if !k.s.f.options.AllowNestedValues {
		return errors.New("nested value is not allowed")
	}
	return k.addNestedValue(val)
}
202404
func (v Map) Values() List {
	var valueList List
	for _, value := range v {
		valueList = append(valueList, value)
	}
	return valueList
}
834710
func (c *Client) AddDimensionValues(ctx context.Context, filterID, name string, options []string) error {
	uri := fmt.Sprintf("%s/filters/%s/dimensions/%s", c.url, filterID, name)

	clientlog.Do(ctx, "adding multiple dimension values to filter job", service, uri, log.Data{
		"method":  "POST",
		"options": options,
	})

	body := struct {
		Options []string `json:"options"`
	}{
		Options: options,
	}

	b, err := json.Marshal(body)
	if err != nil {
		return err
	}

	req, err := http.NewRequest("POST", uri, bytes.NewBuffer(b))
	if err != nil {
		return err
	}

	resp, err := c.cli.Do(ctx, req)
	if err != nil {
		return err
	}

	if resp.StatusCode != http.StatusCreated {
		return &ErrInvalidFilterAPIResponse{http.StatusCreated, resp.StatusCode, uri}
	}

	return nil
}
1092368
func (this *Put) AddValueTS(family, column, value []byte, ts int64) {
	pos := this.posOfFamily(family)

	if pos == -1 {
		this.families = append(this.families, family)
		this.qualifiers = append(this.qualifiers, make([][]byte, 0))
		this.values = append(this.values, make([][]byte, 0))
		this.timestamp = append(this.timestamp, make([]int64, 0))

		pos = this.posOfFamily(family)
	}

	this.qualifiers[pos] = append(this.qualifiers[pos], column)
	this.values[pos] = append(this.values[pos], value)
	this.timestamp[pos] = append(this.timestamp[pos], ts)
}