MCPcopy Create free account
hub / github.com/TileDB-Inc/TileDB / Subarray

Method Subarray

tiledb/sm/cpp_api/subarray.h:107–120  ·  view source on GitHub ↗

* Creates a TileDB Subarray object. * * **Example:** * * @code{.cpp} * // Open the array for writing * tiledb::Context ctx; * tiledb::Array array(ctx, "my_array", TILEDB_WRITE); * tiledb::Subarray subarray(ctx, array); * @endcode * * @param ctx TileDB context * @param array Open Array object * @param coalesce_ranges When enabled, ranges will attempt to coales

Source from the content-addressed store, hash-verified

105 * with existing ranges as they are added.
106 */
107 Subarray(
108 const tiledb::Context& ctx,
109 const tiledb::Array& array,
110 bool coalesce_ranges = true)
111 : ctx_(ctx)
112 , array_(array)
113 , schema_(array.schema()) {
114 tiledb_subarray_t* capi_subarray;
115 ctx.handle_error(tiledb_subarray_alloc(
116 ctx.ptr().get(), array.ptr().get(), &capi_subarray));
117 tiledb_subarray_set_coalesce_ranges(
118 ctx.ptr().get(), capi_subarray, coalesce_ranges);
119 subarray_ = std::shared_ptr<tiledb_subarray_t>(capi_subarray, deleter_);
120 }
121
122 /** Set the coalesce_ranges flag for the subarray. */
123 Subarray& set_coalesce_ranges(bool coalesce_ranges) {

Callers

nothing calls this directly

Calls 6

tiledb_subarray_allocFunction · 0.85
handle_errorMethod · 0.80
schemaMethod · 0.45
getMethod · 0.45
ptrMethod · 0.45

Tested by

no test coverage detected