MCPcopy
hub / github.com/andeya/pholcus / Find

Struct Find

common/mgo/find.go:13–21  ·  view source on GitHub ↗

Find performs a conditional query on the specified collection.

Source from the content-addressed store, hash-verified

11
12// Find performs a conditional query on the specified collection.
13type Find struct {
14 Database string // database name
15 Collection string // collection name
16 Query map[string]interface{} // query filter
17 Sort []string // sort fields, e.g. Sort("firstname", "-lastname") for asc firstname, desc lastname
18 Skip int // skip first n documents
19 Limit int // return at most n documents
20 Select interface{} // projection, e.g. {"name":1} to return only name
21}
22
23func (f *Find) Exec(resultPtr interface{}) (r result.Result[any]) {
24 defer r.Catch()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected