Repository navigation
Universalize common params in API calls - #168
Merged
Merged
Conversation
Kelvinrr
reviewed
Nov 2, 2026
Kelvinrr
left a comment
Collaborator
There was a problem hiding this comment.
For the Python case, we should also support a more pythonic approach of passing in an arg dict that matches how the opts work. Should be something at the Python side only. If it complicates things too much let's not and keep the current API you made.
| * defaults and unrecognized keys are ignored, so a new field only needs to | ||
| * be added here and to the NLOHMANN_DEFINE_TYPE call below. | ||
| */ | ||
| struct SpiceQLOptions { |
Collaborator
There was a problem hiding this comment.
just stylistic feedback, but can we call it something like QueryOpts? Just to keep it shorter. The namespace can take care of the SpiceQL part e.g. SpiceQL::QueryOpts
Kelvinrr
approved these changes
Nov 3, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overloads api.cpp functions with a version that accepts
QueryOptsstruct instead of individual params. This struct consolidates the following options in theQueryOptsstruct:pyspiceql example:
This change was to allow future common params to be more easily added.
Some things to note:
optionsmust be passed by keyword (options=...) instead of passing it positionally because Python only sees the original functionoptionsfeatures are used, this raises an errorLicensing
This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words: