We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43e7c40 commit 7b71e6fCopy full SHA for 7b71e6f
bson/raw.go
@@ -35,8 +35,8 @@ func (r Raw) Validate() (err error) { return bsoncore.Document(r).Validate() }
35
36
// Lookup search the document, potentially recursively, for the given key. If
37
// there are multiple keys provided, this method will recurse down, as long as
38
-// the top and intermediate nodes are either documents or arrays. If any key
39
-// except for the last is not a document or an array, an error will be returned.
+// the top and intermediate nodes are either documents or arrays.If an error
+// occurs or if the value doesn't exist, an empty RawValue is returned.
40
func (r Raw) Lookup(key ...string) RawValue {
41
return convertFromCoreValue(bsoncore.Document(r).Lookup(key...))
42
}
0 commit comments