@@ -149,12 +149,13 @@ class base_index_group {
149149 *
150150 * @param ctx
151151 */
152- void init_for_open (const tiledb::Config& cfg ) {
152+ void init_for_open () {
153153 if (!exists (cached_ctx_)) {
154154 throw std::runtime_error (
155155 " Group uri " + std::string (group_uri_) + " does not exist." );
156156 }
157- auto read_group = tiledb::Group (cached_ctx_, group_uri_, TILEDB_READ, cfg);
157+ auto read_group = tiledb::Group (
158+ cached_ctx_, group_uri_, TILEDB_READ, cached_ctx_.config ());
158159
159160 // Load the metadata and check the version. We need to do this before
160161 // we can check the array names.
@@ -193,8 +194,8 @@ class base_index_group {
193194 }
194195 }
195196
196- void open_for_read (const tiledb::Config& cfg ) {
197- init_for_open (cfg );
197+ void open_for_read () {
198+ init_for_open ();
198199
199200 if (size (metadata_.ingestion_timestamps_ ) == 0 ) {
200201 throw std::runtime_error (" No ingestion timestamps found." );
@@ -235,10 +236,10 @@ class base_index_group {
235236 * @param uri
236237 * @param version
237238 */
238- void open_for_write (const tiledb::Config& cfg ) {
239+ void open_for_write () {
239240 if (exists (cached_ctx_)) {
240241 /* * Load the current group metadata */
241- init_for_open (cfg );
242+ init_for_open ();
242243 if (!metadata_.ingestion_timestamps_ .empty () &&
243244 index_timestamp_ < metadata_.ingestion_timestamps_ .back ()) {
244245 throw std::runtime_error (
@@ -249,7 +250,7 @@ class base_index_group {
249250 }
250251 } else {
251252 /* * Create a new group */
252- create_default (cfg );
253+ create_default ();
253254 }
254255 }
255256
@@ -260,8 +261,8 @@ class base_index_group {
260261 *
261262 * @todo Process the "base group" metadata here.
262263 */
263- void create_default (const tiledb::Config& cfg ) {
264- static_cast <group_type*>(this )->create_default_impl (cfg );
264+ void create_default () {
265+ static_cast <group_type*>(this )->create_default_impl ();
265266 }
266267
267268 /* * Convert an array key to a uri. */
@@ -307,20 +308,19 @@ class base_index_group {
307308 uint64_t dimension,
308309 tiledb_query_type_t rw = TILEDB_READ,
309310 size_t timestamp = 0 ,
310- const std::string& version = std::string{" " },
311- const tiledb::Config& cfg = tiledb::Config{})
311+ const std::string& version = std::string{" " })
312312 : cached_ctx_(ctx)
313313 , group_uri_(uri)
314314 , index_timestamp_(timestamp)
315315 , version_(version)
316316 , opened_for_(rw) {
317317 switch (opened_for_) {
318318 case TILEDB_READ:
319- open_for_read (cfg );
319+ open_for_read ();
320320 break ;
321321 case TILEDB_WRITE:
322322 set_dimension (dimension);
323- open_for_write (cfg );
323+ open_for_write ();
324324 break ;
325325 case TILEDB_MODIFY_EXCLUSIVE:
326326 break ;
@@ -340,9 +340,8 @@ class base_index_group {
340340 */
341341 ~base_index_group () {
342342 if (opened_for_ == TILEDB_WRITE) {
343- auto cfg = tiledb::Config ();
344- auto write_group =
345- tiledb::Group (cached_ctx_, group_uri_, TILEDB_WRITE, cfg);
343+ auto write_group = tiledb::Group (
344+ cached_ctx_, group_uri_, TILEDB_WRITE, cached_ctx_.config ());
346345 metadata_.store_metadata (write_group);
347346 }
348347 }
@@ -489,8 +488,8 @@ class base_index_group {
489488 }
490489 std::cout << " -------------------------------------------------------\n " ;
491490 std::cout << " Stored in " + group_uri_ + " :" << std::endl;
492- auto cfg = tiledb::Config ();
493- auto read_group = tiledb::Group ( cached_ctx_, group_uri_, TILEDB_READ, cfg );
491+ auto read_group = tiledb::Group (
492+ cached_ctx_, group_uri_, TILEDB_READ, cached_ctx_. config () );
494493 for (size_t i = 0 ; i < read_group.member_count (); ++i) {
495494 auto member = read_group.member (i);
496495 auto name = member.name ();
0 commit comments