Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Builtins = map[string]interface{}{
"oid": oid,
"regex": regex,
}
Builtins contains all the currently registered functions that can be used when templating query templates. Publicly exposed so that callers can add their own conversion functions.
Functions ¶
func Build ¶
func Build[T bson.M | bson.D | bson.A | bson.E](query string, vars map[string]any) (out T, err error)
Build builds a MongoDB query of type T given an input query template. The caller may optionally provide variables that will be templated into the query. The caller may also use any of the registered functions above to handle special types of variables such as the ObjectIds or regular expressions.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.