| 41 | |
| 42 | namespace tiledb { |
| 43 | class QueryExperimental { |
| 44 | public: |
| 45 | /** |
| 46 | * Sets the update value. |
| 47 | * |
| 48 | * Note that more than one update value may be set on a query. |
| 49 | * |
| 50 | * @param ctx TileDB context. |
| 51 | * @param query Query object. |
| 52 | * @param field_name The attribute name. |
| 53 | * @param update_value The value to set. |
| 54 | * @param update_value_size The byte size of `update_value`. |
| 55 | * @return Reference to this Query |
| 56 | */ |
| 57 | static void add_update_value_to_query( |
| 58 | const Context& ctx, |
| 59 | Query& query, |
| 60 | const char* field_name, |
| 61 | const void* update_value, |
| 62 | uint64_t update_value_size) { |
| 63 | ctx.handle_error(tiledb_query_add_update_value( |
| 64 | ctx.ptr().get(), |
| 65 | query.ptr().get(), |
| 66 | field_name, |
| 67 | update_value, |
| 68 | update_value_size)); |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * Get the number of relevant fragments from the subarray. Should only be |
| 73 | * called after size estimation was asked for. |
| 74 | * |
| 75 | * @param ctx TileDB context. |
| 76 | * @param query Query object. |
| 77 | * @return Number of relevant fragments. |
| 78 | */ |
| 79 | static uint64_t get_relevant_fragment_num(Context& ctx, const Query& query) { |
| 80 | uint64_t relevant_fragment_num = 0; |
| 81 | ctx.handle_error(tiledb_query_get_relevant_fragment_num( |
| 82 | ctx.ptr().get(), query.ptr().get(), &relevant_fragment_num)); |
| 83 | return relevant_fragment_num; |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Sets the data for a fixed/var-sized attribute/dimension. |
| 88 | * |
| 89 | * **Example:** |
| 90 | * @code{.cpp} |
| 91 | * tiledb::Context ctx; |
| 92 | * tiledb::Array array(ctx, array_name, TILEDB_WRITE); |
| 93 | * std::vector<int> data_a1 = {0, 1, 2, 3}; |
| 94 | * Query query(ctx, array); |
| 95 | * query.set_data_buffer("a1", data_a1); |
| 96 | * @endcode |
| 97 | * |
| 98 | * @tparam T Attribute/Dimension value type |
| 99 | * @param name Attribute/Dimension name |
| 100 | * @param buf Buffer vector with elements of the attribute/dimension type. |
nothing calls this directly
no test coverage detected