-
Notifications
You must be signed in to change notification settings - Fork 916
GODRIVER-3522 Add support for the rawData option for time-series bucket access - PR0 #2121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
alcaeus
merged 9 commits into
mongodb:feature/godriver-3522-rawdata
from
qingyang-hu:godriver3522-0
Aug 4, 2025
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a9f34ad
add aggregate
qingyang-hu 547db1d
add count
qingyang-hu b1bb1fc
add delete
qingyang-hu 4485d8e
add distinct
qingyang-hu b573bb7
add insert
qingyang-hu 6724da3
update integration
qingyang-hu 244ab64
make rawDate internal
qingyang-hu 6a2e0d4
minor updates
qingyang-hu 53f0226
Rename custom options fields
qingyang-hu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the scope:
It sounds like we should add this as a deprecated option to
InsertOneOptions
and add aSetInternalInsertOneOptions
function to thexoptions
package, rather than exposing an options-level setter. It sounds like nobody will use this but internal teams, we can pivot in the future if necessary.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that the
rawData
option should be internal only. However, I doubt if it should be a client level option because it makes users to set up multiple clients to handle different scenario. IMO, for operation options following theLister
interface with a correlated "optionsBuilder" type, we can have a setter, for example:What are your thoughts?
cc: @matthewdale
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see an internal-only options pattern was added a few months ago: xoptions.SetInternalClientOptions. Can we extend that pattern for this use case?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing pattern for
SetInternalClientOptions
is meant for ClientOptions. I think that addingrawData
directly as a client option will cause inconvenience in most use cases, such as when setting an option for a specific operation.Another option would be like
xoptions.SetInternalAggregateOptions(opts *AggregateOptionsBuilder, key string, option any) error
. We add a setter method for each OptionsBuilder in the xoptions package.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qingyang-hu This sounds correct:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like there are two good options based on the existing pattern of
SetInternalClientOptions
. I prefer the first one because it can be extended to support future internal options without any additional API changes. Does that sound reasonable?Custom
key/value pairs withxoptions
setterAdd a
Custom optionsutil.Options
field to every CRUD method options struct (likeClientOptions.Custom
). Add a function toxoptions
to set custom k/v pairs inCustom
.E.g.
RawData
bool option withxoptions
setterAdd a
RawData *bool
field to every CRUD method options struct. Add a function toxoptions
to setRawData
for each supported option type.E.g.