[r] Replace SOMAArray
read and write calls with ManagedQuery
#3678
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.
Issue and/or context:
Part of work for #2054
Changes:
ManagedQuery
constructor to take inSOMAArray
instead ofstd::unique_ptr<SOMAArray>
. Pybind11 by default holds aunique_ptr
(shared_ptr
can be used, but there are known issues which prevents us from using it) whereas Rcpp holds ashared_ptr
- to easily support both, pass by value rather than smart pointerManagedQuery
for read and write queriessr_{setup,next,etc}
tomq_{setup,next,etc}
wheremq_setup
now returns aManagedQuery
(rather thanSOMAArray
) that can be iterated through withsr_next
apply_dim_{points,ranges}
utility functions to take in aManagedQuery
Notes for Reviewer:
Planned next steps:
read
,write
, etc. fromSOMAArray
in C++ API.ManagedQuery::submit_write
always callssubmit
andfinalize
. RenameManagedQuery::submit_read
toManagedQuery::submit
which both read and write path can use. Create a separateManagedQuery::finalize
.