* @brief Function to create the TileDB array used in this example. * The array will be 1D with size 1 with dimension "index". * The bounds on the index will be 0 through 9, inclusive. * * The array has four attributes. The four attributes are * - "a" (type int) * - "b" (type std::string) * - "c" (type int32_t) * - "d" (type float) * * @param ctx The context. */
| 79 | * @param ctx The context. |
| 80 | */ |
| 81 | void create_array(Context& ctx) { |
| 82 | // Creating the domain and the dimensions. |
| 83 | Domain domain(ctx); |
| 84 | domain.add_dimension( |
| 85 | Dimension::create<int32_t>(ctx, "index", {{0, num_elems - 1}})); |
| 86 | |
| 87 | // The array will be dense. |
| 88 | ArraySchema schema(ctx, TILEDB_DENSE); |
| 89 | schema.set_domain(domain).set_order({{TILEDB_ROW_MAJOR}}); |
| 90 | |
| 91 | // Adding the attributes of the array to the array schema. |
| 92 | Attribute a = Attribute::create<int>(ctx, "a").set_nullable(true); |
| 93 | Attribute b = Attribute::create<std::string>(ctx, "b"); |
| 94 | Attribute c = Attribute::create<int32_t>(ctx, "c").set_fill_value( |
| 95 | &c_fill_value, sizeof(int32_t)); |
| 96 | Attribute d = Attribute::create<float>(ctx, "d").set_fill_value( |
| 97 | &d_fill_value, sizeof(float)); |
| 98 | schema.add_attribute(a).add_attribute(b).add_attribute(c).add_attribute(d); |
| 99 | |
| 100 | // Create the (empty) array. |
| 101 | Array::create(ctx, array_name, schema); |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * @brief Execute a write on array query_condition_dense array |
no test coverage detected