Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions document/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ func (doc *Document) SetAll(values map[string]interface{}) {
}
}

// GetAll returns a map containing all the fields of the document.
func (doc *Document) GetAll() map[string]interface{} {
return doc.fields
}

// ToMap returns a map of all available fields in the document. Nested fields are represented by sub-maps. This is a deep copy, but values are not cloned.
func (doc *Document) ToMap() map[string]interface{} {
return util.CopyMap(doc.fields)
Expand Down