package bsonutil
import "go.mongodb.org/mongo-driver/internal/bsonutil"
Index ¶
- func RawToDocuments(doc bson.Raw) []bson.Raw
- func RawToInterfaces(docs ...bson.Raw) []interface{}
- func StringSliceFromRawValue(name string, val bson.RawValue) ([]string, error)
Functions ¶
func RawToDocuments ¶
RawToDocuments converts a bson.Raw that is internally an array of documents to []bson.Raw.
func RawToInterfaces ¶
RawToInterfaces takes one or many bson.Raw documents and returns them as a []interface{}.
func StringSliceFromRawValue ¶
StringSliceFromRawValue decodes the provided BSON value into a []string. This function returns an error if the value is not an array or any of the elements in the array are not strings. The name parameter is used to add context to error messages.
Source Files ¶
bsonutil.go
- Version
- v1.17.3 (latest)
- Published
- Feb 25, 2025
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 16 hours ago –
Tools for package owners.