Skip to content

Commit 9938cf8

Browse files
authored
Use config.contains for libtiledb >= 2.9 (#1256)
1 parent 9fa75f6 commit 9938cf8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tiledb/core.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,17 @@ struct StatsInfo {
5454
};
5555

5656
bool config_has_key(tiledb::Config config, std::string key) {
57+
#if TILEDB_VERSION_MAJOR >= 2 && TILEDB_VERSION_MINOR >= 9
58+
return config.contains(key);
59+
#else
5760
try {
5861
config.get(key);
5962
} catch (TileDBError &e) {
6063
(void)e;
6164
return false;
6265
}
6366
return true;
67+
#endif
6468
}
6569

6670
struct PAPair {

0 commit comments

Comments
 (0)