Open gladkia opened 5 years ago
Merging #164 into master will decrease coverage by
0.13%
. The diff coverage is3.84%
.
@@ Coverage Diff @@
## master #164 +/- ##
==========================================
- Coverage 37.65% 37.52% -0.14%
==========================================
Files 130 130
Lines 21910 21929 +19
==========================================
- Hits 8250 8228 -22
- Misses 13660 13701 +41
Impacted Files | Coverage Δ | |
---|---|---|
src/collection.c | 35.84% <0%> (-2.82%) |
:arrow_down: |
R/client.R | 32.14% <0%> (-4.6%) |
:arrow_down: |
R/mongo.R | 49.7% <50%> (ø) |
:arrow_up: |
src/mongoc/mongoc-topology-description.c | 54.73% <0%> (-2.52%) |
:arrow_down: |
src/mongoc/mongoc-server-description.c | 53.36% <0%> (-1.08%) |
:arrow_down: |
src/gridfs.c | 66.16% <0%> (-0.67%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update db768cb...c3df7ab. Read the comment docs.
Thanks, will review this when I'm back from vacation.
It would be nice if we can make this work for any option by passing down the options as a json object (as we do for the keys
parameter).
Hi @jeroen,
We can split options into two categories:
documents
single-value elements (integer/boolean/string)
Do you mean changing 'addOpts' parameter from the list() to the JSON object? Sure, I can refactor code that way. This will be easy (asserts in R function) for the first category of options (single value elements) and will require more sophisticated actions (especially tests) for the second category (documents). We should probably define single argument per each option in the C function "R_mongo_collection_create_index" (to minimize the work on the C level as much as possible). Is that OK ?
I think that we can start with single-value elements. This part of work is the easy to implement and test. Then we can consider adding document options. What do you think about it ?
Hi, is there any update on this? I can't see the addOpts
parameter in run()
yet.
Hi, I've just added the support for creating indices with "unique" property (.c/.R code + R unit tests).
In theory, the 'addOpts' parameter (the list) can be extended with other properties of the created index.