// Find implements DB.Find, as documented in the leveldb/db package.
186309
func (r *Reader) Find(key []byte, o *db.ReadOptions) db.Iterator {
	return r.find(key, o, nil)
}
1096987
func (s *DbSession) Find(query Q, document Document) error {
	q := s.findQuery(document, query)
	if err := q.One(document); err != nil {
		if err.Error() != mgo.ErrNotFound.Error() {
			log.Printf("Error fetching %s with query %s. Error: %s\n", document.CollectionName(), query, err)
		}
		return err
	}
	return nil
}
1194496
func (tx readTx) find(table string, by By, checkType func(By) error, appendResult func(api.StoreObject)) error {
	fromResultIterators := func(its ...memdb.ResultIterator) {
		ids := make(map[string]struct{})
		for _, it := range its {
			for {
				obj := it.Next()
				if obj == nil {
					break
				}
				o := obj.(api.StoreObject)
				id := o.GetID()
				if _, exists := ids[id]; !exists {
					appendResult(o.CopyStoreObject())
					ids[id] = struct{}{}
				}
			}
		}
	}

	iters, err := tx.findIterators(table, by, checkType)
	if err != nil {
		return err
	}

	fromResultIterators(iters...)

	return nil
}
224728
func (p *DataFrame) find(parts []string) interface{} {
	data := p.data

	for i, part := range parts {
		val := data[part]
		if val == nil {
			return nil
		}

		if i == len(parts)-1 {
			// found
			return val
		}

		valValue := reflect.ValueOf(val)
		if valValue.Kind() != reflect.Map {
			// not found
			return nil
		}

		// continue
		data = mapStringInterface(valValue)
	}

	// not found
	return nil
}
663089
func (r *RecordList) Find(ev string) (index int, rec *record) {
	for i, rec := range r.getList() {
		if rec.name == ev {
			return i, rec
		}
	}

	return -1, nil
}
1139353
func (engine *Engine) Find(beans interface{}, condiBeans ...interface{}) error {
	session := engine.NewSession()
	defer session.Close()
	return session.Find(beans, condiBeans...)
}
1226530
func (list *DeletionList) Find(id string) *Deletion {
	for _, item := range list.Data {
		if item.ID == id {
			return item
		}
	}

	return nil
}
1105465
func (d *Dir) Find(name string) (Entry, int, error) {
	for ii, v := range d.EntryNames {
		if v == name {
			return d.Entries[ii], ii, nil
		}
	}
	return nil, -1, os.ErrNotExist
}
1152629
func (d *dir) find(q string) node {
	q = strings.Trim(q, "/")
	i := strings.Index(q, "/")

	if q == "" {
		return d
	}

	if i == 0 {
		panic("shouldn't happen, no root paths")
	}

	var component string
	if i < 0 {
		// No more path components
		component = q
	} else {
		component = q[:i]
	}

	child, ok := d.children[component]
	if !ok {
		// Node was not found. Return p and the current node.
		return d
	}

	if child.isdir() {
		// traverse down!
		q = q[i+1:]
		return child.(*dir).find(q)
	}

	return child
}
327051
func Find(c context.Context, vers Version, lookPath LookPathFunc) (*Interpreter, error) {
	// pythonM.m, pythonM, python
	searches := make([]string, 0, 3)
	pv := vers
	pv.Patch = 0
	if pv.Minor > 0 {
		searches = append(searches, pv.PythonBase())
		pv.Minor = 0
	}
	if pv.Major > 0 {
		searches = append(searches, pv.PythonBase())
		pv.Major = 0
	}
	searches = append(searches, pv.PythonBase())

	lookErrs := errors.NewLazyMultiError(len(searches))
	for i, s := range searches {
		interp, err := findInterpreter(c, s, vers, lookPath)
		if err == nil {
			// Resolve to absolute path.
			if err := filesystem.AbsPath(&interp.Python); err != nil {
				return nil, errors.Annotate(err, "could not get absolute path for: %q", interp.Python).Err()
			}

			return interp, nil
		}

		logging.WithError(err).Debugf(c, "Could not find Python for: %q.", s)
		lookErrs.Assign(i, err)
	}

	// No Python interpreter could be identified.
	return nil, errors.Annotate(lookErrs.Get(), "no Python found").Err()
}
447509
func (t *Tree) Find(method, path string, paramValues []string) (r Route, tsr bool) {
	path = path[1:]
	var route *route
	if path == "" {
		route = t.root.getRoute(method)
		tsr = route == nil && t.root.routes != nil
	} else {
		route, tsr = t.root.find(method, path, paramValues, 0)
	}
	if route != nil {
		r = route
	}
	return
}
496283
func (b Box) Find(name string) ([]byte, error) {
	f, err := b.find(name)
	if err == nil {
		bb := &bytes.Buffer{}
		bb.ReadFrom(f)
		return bb.Bytes(), err
	}
	return nil, err
}
241769
func (db *DB) Get(dest interface{}, query string, args ...interface{}) error {
	return Get(db, dest, query, args...)
}
1006109
func (w *Writer) Get(key []byte, o *db.ReadOptions) ([]byte, error) {
	return nil, errors.New("leveldb/table: cannot Get from a write-only table")
}
342298
func (s *set) Find(path Ref) (Value, error) {
	if len(path) == 0 {
		return s, nil
	}
	if !s.Contains(path[0]) {
		return nil, fmt.Errorf("find: not found")
	}
	return path[0].Value.Find(path[1:])
}
721950
func (list *TransferList) Find(id string) *Transfer {
	for _, item := range list.Data {
		if item.ID == id {
			return item
		}
	}

	return nil
}
131136
func (s *DB) Find(out interface{}, where ...interface{}) *DB {
	return s.NewScope(out).inlineCondition(where...).callCallbacks(s.parent.callbacks.queries).db
}