Skip to content

Commit

Permalink
Add small refinement for group creation with config (#536)
Browse files Browse the repository at this point in the history
* Add small refinement for group creation with config

* Update NEWS [ci skip]
  • Loading branch information
eddelbuettel authored Apr 5, 2023
1 parent 5e6bec9 commit f76dd7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

* Use of TileDB Embedded was upgraded to release 2.15.1 (#534)

* Group objects can be opened while supplying a Config object when 2.15.1 or newer is used (#535)
* Group objects can be opened while supplying a Config object when 2.15.1 or newer is used (#535, #536)

## Build and Test Systems

Expand Down
6 changes: 5 additions & 1 deletion src/libtiledb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4586,10 +4586,14 @@ XPtr<tiledb::Group> libtiledb_group_with_config(XPtr<tiledb::Context> ctx,
XPtr<tiledb::Config> cfg) {
check_xptr_tag<tiledb::Context>(ctx);
check_xptr_tag<tiledb::Config>(cfg);
#if TILEDB_VERSION >= TileDB_Version(2,15,1)
tiledb_query_type_t querytype = _string_to_tiledb_query_type(querytypestr);
#if TILEDB_VERSION >= TileDB_Version(2,15,1)
auto p = new tiledb::Group(*ctx.get(), uri, querytype, *cfg.get());
XPtr<tiledb::Group> ptr = make_xptr<tiledb::Group>(p);
#elif TILEDB_VERSION >= TileDB_Version(2,8,0)
Rcpp::warning("libtiledb_group_with_config should only called with TileDB 2.15.1 or later");
auto p = new tiledb::Group(*ctx.get(), uri, querytype); // placeholder
XPtr<tiledb::Group> ptr = make_xptr<tiledb::Group>(p);
#else
XPtr<tiledb::Group> ptr(new tiledb::Group()); // placeholder
#endif
Expand Down

0 comments on commit f76dd7e

Please sign in to comment.