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

Method call_handler

test/src/unit-request-handlers.cc:520–548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

518}
519
520std::tuple<
521 shared_ptr<ArraySchema>,
522 std::unordered_map<std::string, shared_ptr<ArraySchema>>>
523HandleLoadArraySchemaRequestFx::call_handler(
524 serialization::LoadArraySchemaRequest req, SerializationType stype) {
525 // If this looks weird, its because we're using the public C++ API to create
526 // these objets instead of the internal APIs elsewhere in this test suite.
527 // This is because the handlers are C API so accept API handles, not internal
528 // objects.
529 auto ctx = tiledb::Context();
530 auto array = tiledb::Array(ctx, uri_.to_string(), TILEDB_READ);
531 auto req_buf = tiledb_buffer_handle_t::make_handle(
532 ctx.ptr()->resources().serialization_memory_tracker());
533 auto resp_buf = tiledb_buffer_handle_t::make_handle(
534 ctx.ptr()->resources().serialization_memory_tracker());
535
536 serialization::serialize_load_array_schema_request(
537 cfg_, req, stype, req_buf->buffer());
538 auto rval = tiledb_handle_load_array_schema_request(
539 ctx.ptr().get(),
540 array.ptr().get(),
541 static_cast<tiledb_serialization_type_t>(stype),
542 req_buf,
543 resp_buf);
544 REQUIRE(rval == TILEDB_OK);
545
546 return serialization::deserialize_load_array_schema_response(
547 uri_, cfg_, stype, resp_buf->buffer(), memory_tracker_);
548}
549
550shared_ptr<ArraySchema> HandleQueryPlanRequestFx::create_schema() {
551 auto schema =

Callers

nothing calls this directly

Calls 13

to_stringMethod · 0.80
resourcesMethod · 0.80
ContextClass · 0.50
ArrayClass · 0.50
ptrMethod · 0.45
bufferMethod · 0.45

Tested by

no test coverage detected