[GODRIVER-111] Optimize checking for first bson document key starting with '$' Created: 27/Oct/17  Updated: 27/Oct/23  Resolved: 24/Jul/20

Status: Closed
Project: Go Driver
Component/s: BSON
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Samuel Rossi (Inactive) Assignee: Unassigned
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In order to correctly handle replace and update operations differently, we need to be able to check whether the first key in a document (interface{}) begins with '$'. Currently, we have to marshal the document into a byte slice and then unmarshal into a bson.D. This is very inefficient, so we should implement a more efficient method of doing this check.


Generated at Thu Feb 08 08:33:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.