// Fields returns the name of all the fields this
// Index has operated on.
180166
func (i *indexImpl) Fields() (fields []string, err error) {
	i.mutex.RLock()
	defer i.mutex.RUnlock()

	if !i.open {
		return nil, ErrorIndexClosed
	}

	indexReader, err := i.i.Reader()
	if err != nil {
		return nil, err
	}
	defer func() {
		if cerr := indexReader.Close(); err == nil && cerr != nil {
			err = cerr
		}
	}()

	fields, err = indexReader.Fields()
	if err != nil {
		return nil, err
	}
	return fields, nil
}
1161557
func (p *point) Fields() (Fields, error) {
	if p.cachedFields != nil {
		return p.cachedFields, nil
	}
	cf, err := p.unmarshalBinary()
	if err != nil {
		return nil, err
	}
	p.cachedFields = cf
	return p.cachedFields, nil
}
1126549
func (c *DefaultIndexingChain) perField(name string) *PerField {
	hashPos := util.Hashstr(name) & c.hashMask
	fp := c.fieldHash[hashPos]
	for fp != nil && fp.fieldInfo.Name != name {
		fp = fp.next
	}
	return fp
}
302934
func (r *DB) SetFields(fields []string) string {
	idx := 0
	sql := ""
	for _, field := range fields {
		if idx > 0 {
			sql = sql + ", "
		}
		idx++
		sql = sql + field + "=:" + field
	}
	return sql
}
1198762
func (q *PrefixQuery) Field(field string) *PrefixQuery {
	q.options["field"] = field
	return q
}
1185655
func (s *FieldCapsService) Index(index ...string) *FieldCapsService {
	s.index = append(s.index, index...)
	return s
}
174994
func (s *IndicesStatsService) FielddataFields(fielddataFields ...string) *IndicesStatsService {
	s.fielddataFields = append(s.fielddataFields, fielddataFields...)
	return s
}
1271149
func (c *Collection) FieldIndexKey(fieldName string) (string, error) {
	return c.spec.fieldIndexKey(fieldName)
}
629894
func (c *Config) GetFields() []string {
	var names []string
	for k := range c.fields.dict() {
		names = append(names, k)
	}
	return names
}
151756
func (r Relationship) AllFields() []interface{} {
	return []interface{}{r.RelIdentity, r.StartNodeIdentity, r.EndNodeIdentity, r.Type, r.Properties}
}
616512
func (q MoreLikeThisQuery) Fields(fields ...string) MoreLikeThisQuery {
	q.fields = append(q.fields, fields...)
	return q
}
843655
func (t *Transaction) saveFieldIndexesForFields(fieldNames []string, mr *modelRef) {
	for _, fs := range mr.spec.fields {
		// Skip fields whose names do not appear in fieldNames.
		if !stringSliceContains(fieldNames, fs.name) {
			continue
		}
		switch fs.indexKind {
		case noIndex:
			continue
		case numericIndex:
			t.saveNumericIndex(mr, fs)
		case booleanIndex:
			t.saveBooleanIndex(mr, fs)
		case stringIndex:
			t.saveStringIndex(mr, fs)
		}
	}
}
932900
func (f *Form) Field(name string) fields.FieldInterface {
	ind, ok := f.fieldMap[name]
	if !ok || !reflect.TypeOf(f.fields[ind]).Implements(reflect.TypeOf((*fields.FieldInterface)(nil)).Elem()) {
		if v, ok2 := f.containerMap[name]; ok2 {
			return f.FieldSet(v).Field(name)
		}
		return &fields.Field{}
	}
	return f.fields[ind].(fields.FieldInterface)
}
233208
func (s *ScanService) Fields(fields ...string) *ScanService {
	s.searchSource = s.searchSource.Fields(fields...)
	return s
}
1272989
func (*DatabaseSettings) Fields(c context.Context) ([]portal.Field, error) {
	fields := []portal.Field{
		{
			ID:    "Server",
			Title: "Server",
			Type:  portal.FieldText,
			Help:  "<p>Server to use (for Cloud SQL should be of the form project:region:database)</p>",
		},
		{
			ID:    "Username",
			Title: "Username",
			Type:  portal.FieldText,
			Help:  "<p>Username to authenticate to the SQL database with</p>",
		},
		{
			ID:    "Password",
			Title: "Password",
			Type:  portal.FieldPassword,
			Help:  "<p>Password to authenticate to the SQL database with</p>",
		},
		{
			ID:    "Database",
			Title: "Database",
			Type:  portal.FieldText,
			Help:  "<p>SQL database to use</p>",
		},
	}
	return fields, nil
}
1024929
func (ix *Reindexer) ScanFields(scanFields ...string) *Reindexer {
	ix.scanFields = scanFields
	return ix
}
1002214
func (p *RequestParams) FieldNames() (results []string) {
	if p == nil {
		return
	}
	t := *p
	for _, reqparam := range t {
		results = append(results, reqparam.FieldName)
	}
	return
}