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

Function write_array

examples/cpp_api/array_schema_evolution.cc:61–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void write_array(const Context& ctx) {
62 // Write some simple data to cells (1, 1), (2, 4) and (2, 3).
63 std::vector<int> coords_rows = {1, 2, 2};
64 std::vector<int> coords_cols = {1, 4, 3};
65 std::vector<int> data = {1, 2, 3};
66
67 // Open the array for writing and create the query.
68 Array array(ctx, array_uri, TILEDB_WRITE);
69 Query query(ctx, array, TILEDB_WRITE);
70 query.set_layout(TILEDB_UNORDERED)
71 .set_data_buffer("a", data)
72 .set_data_buffer("rows", coords_rows)
73 .set_data_buffer("cols", coords_cols);
74
75 // Perform the write and close the array.
76 query.submit();
77 array.close();
78}
79
80void write_array2(const Context& ctx) {
81 // Write some simple data to cells (1, 1), (2, 4) and (2, 3).

Callers 1

mainFunction · 0.70

Calls 4

set_data_bufferMethod · 0.45
set_layoutMethod · 0.45
submitMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected