quasardb 3.14.2.dev1__cp310-cp310-win32.whl → 3.14.2.dev2__cp310-cp310-win32.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of quasardb might be problematic. Click here for more details.
- quasardb/CMakeLists.txt +19 -12
- quasardb/INSTALL.vcxproj +4 -0
- quasardb/__init__.py +33 -4
- quasardb/cluster.cpp +7 -1
- quasardb/cluster.hpp +111 -72
- quasardb/concepts.hpp +56 -12
- quasardb/continuous.cpp +84 -34
- quasardb/continuous.hpp +10 -7
- quasardb/convert/array.hpp +23 -6
- quasardb/convert/value.hpp +78 -7
- quasardb/date/ALL_BUILD.vcxproj +4 -4
- quasardb/date/CMakeFiles/Export/df49adab93b9e0c10c64f72458b31971/dateTargets.cmake +12 -12
- quasardb/date/CMakeFiles/generate.stamp.depend +4 -4
- quasardb/date/INSTALL.vcxproj +4 -0
- quasardb/date/dateConfigVersion.cmake +0 -5
- quasardb/date/dateTargets.cmake +3 -7
- quasardb/detail/invoke.hpp +0 -0
- quasardb/detail/retry.cpp +30 -0
- quasardb/detail/retry.hpp +147 -0
- quasardb/detail/sleep.hpp +53 -0
- quasardb/{writer.cpp → detail/writer.cpp} +68 -162
- quasardb/detail/writer.hpp +550 -0
- quasardb/error.hpp +76 -1
- quasardb/masked_array.hpp +9 -2
- quasardb/module.cpp +20 -4
- quasardb/numpy/__init__.py +58 -10
- quasardb/object_tracker.hpp +2 -3
- quasardb/options.hpp +32 -3
- quasardb/pandas/__init__.py +59 -102
- quasardb/properties.cpp +41 -0
- quasardb/properties.hpp +85 -0
- quasardb/pybind11/ALL_BUILD.vcxproj +4 -4
- quasardb/pybind11/CMakeFiles/generate.stamp.depend +14 -14
- quasardb/pybind11/INSTALL.vcxproj +4 -0
- quasardb/qdb_api.dll +0 -0
- quasardb/quasardb.cp310-win32.pyd +0 -0
- quasardb/range-v3/ALL_BUILD.vcxproj +4 -4
- quasardb/range-v3/CMakeFiles/Export/d94ef200eca10a819b5858b33e808f5b/range-v3-targets.cmake +12 -12
- quasardb/range-v3/CMakeFiles/generate.stamp.depend +11 -11
- quasardb/range-v3/INSTALL.vcxproj +4 -0
- quasardb/range-v3/cmake_install.cmake +36 -0
- quasardb/range-v3/range-v3-config-version.cmake +0 -5
- quasardb/range-v3/range-v3-config.cmake +3 -7
- quasardb/range-v3/range.v3.headers.vcxproj +4 -4
- quasardb/reader.cpp +282 -0
- quasardb/reader.hpp +256 -0
- quasardb/table.cpp +4 -36
- quasardb/table.hpp +69 -28
- quasardb/traits.hpp +23 -0
- quasardb/writer.hpp +245 -287
- {quasardb-3.14.2.dev1.dist-info → quasardb-3.14.2.dev2.dist-info}/METADATA +7 -7
- {quasardb-3.14.2.dev1.dist-info → quasardb-3.14.2.dev2.dist-info}/RECORD +55 -49
- {quasardb-3.14.2.dev1.dist-info → quasardb-3.14.2.dev2.dist-info}/WHEEL +1 -1
- quasardb/reader/ts_row.hpp +0 -281
- quasardb/reader/ts_value.hpp +0 -245
- quasardb/table_reader.hpp +0 -220
- {quasardb-3.14.2.dev1.dist-info → quasardb-3.14.2.dev2.dist-info}/LICENSE.md +0 -0
- {quasardb-3.14.2.dev1.dist-info → quasardb-3.14.2.dev2.dist-info}/top_level.txt +0 -0
quasardb/table.hpp
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
#include "entry.hpp"
|
|
34
34
|
#include "masked_array.hpp"
|
|
35
|
+
#include "reader.hpp"
|
|
35
36
|
#include "detail/ts_column.hpp"
|
|
36
37
|
|
|
37
38
|
namespace qdb
|
|
@@ -87,7 +88,7 @@ public:
|
|
|
87
88
|
qdb_ts_insert_columns_ex(*_handle, _alias.c_str(), c_columns.data(), c_columns.size()));
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
std::vector<detail::column_info> list_columns() const
|
|
91
|
+
std::vector<detail::column_info> const & list_columns() const
|
|
91
92
|
{
|
|
92
93
|
if (_columns.has_value()) [[likely]]
|
|
93
94
|
{
|
|
@@ -156,8 +157,14 @@ public:
|
|
|
156
157
|
return column_info_by_id(alias).type;
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
qdb::reader_ptr reader( //
|
|
161
|
+
std::vector<std::string> const & column_names, //
|
|
162
|
+
std::size_t batch_size, //
|
|
163
|
+
std::vector<py::tuple> const & ranges) const //
|
|
164
|
+
{
|
|
165
|
+
std::vector<std::string> table_names{get_name()};
|
|
166
|
+
return std::make_unique<qdb::reader>(_handle, table_names, column_names, batch_size, ranges);
|
|
167
|
+
};
|
|
161
168
|
|
|
162
169
|
/**
|
|
163
170
|
* Returns true if this table has a TTL assigned.
|
|
@@ -196,6 +203,23 @@ public:
|
|
|
196
203
|
throw qdb::alias_not_found_exception{};
|
|
197
204
|
}
|
|
198
205
|
|
|
206
|
+
inline std::chrono::milliseconds get_shard_size() const
|
|
207
|
+
{
|
|
208
|
+
if (_shard_size.has_value()) [[likely]]
|
|
209
|
+
{
|
|
210
|
+
return _shard_size.value();
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
_cache_metadata();
|
|
214
|
+
|
|
215
|
+
if (_shard_size.has_value()) [[likely]]
|
|
216
|
+
{
|
|
217
|
+
return _shard_size.value();
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
throw qdb::alias_not_found_exception{};
|
|
221
|
+
}
|
|
222
|
+
|
|
199
223
|
private:
|
|
200
224
|
/**
|
|
201
225
|
* Loads column info / metadata from server and caches it locally.
|
|
@@ -209,8 +233,9 @@ private:
|
|
|
209
233
|
{
|
|
210
234
|
if (_columns.has_value() == false) [[unlikely]]
|
|
211
235
|
{
|
|
212
|
-
// We expect _ttl and _columns to have the same state
|
|
236
|
+
// We expect _ttl and _columns and _shard_size (i.e. all metadata) to have the same state
|
|
213
237
|
assert(_ttl.has_value() == false);
|
|
238
|
+
assert(_shard_size.has_value() == false);
|
|
214
239
|
_cache_metadata();
|
|
215
240
|
}
|
|
216
241
|
}
|
|
@@ -264,6 +289,7 @@ private:
|
|
|
264
289
|
|
|
265
290
|
mutable std::optional<std::vector<detail::column_info>> _columns;
|
|
266
291
|
mutable std::optional<std::chrono::milliseconds> _ttl;
|
|
292
|
+
mutable std::optional<std::chrono::milliseconds> _shard_size;
|
|
267
293
|
};
|
|
268
294
|
|
|
269
295
|
template <typename Module>
|
|
@@ -285,7 +311,8 @@ static inline void register_table(Module & m)
|
|
|
285
311
|
.def("__repr__", &qdb::table::repr) //
|
|
286
312
|
.def("create", &qdb::table::create, py::arg("columns"), //
|
|
287
313
|
py::arg("shard_size") = std::chrono::hours{24}, //
|
|
288
|
-
py::arg("ttl") = std::chrono::milliseconds::zero()
|
|
314
|
+
py::arg("ttl") = std::chrono::milliseconds::zero() //
|
|
315
|
+
) //
|
|
289
316
|
.def("get_name", &qdb::table::get_name) //
|
|
290
317
|
.def("retrieve_metadata", &qdb::table::retrieve_metadata) //
|
|
291
318
|
.def("column_index_by_id", &qdb::table::column_index_by_id) //
|
|
@@ -297,29 +324,43 @@ static inline void register_table(Module & m)
|
|
|
297
324
|
.def("list_columns", &qdb::table::list_columns) //
|
|
298
325
|
.def("has_ttl", &qdb::table::has_ttl) //
|
|
299
326
|
.def("get_ttl", &qdb::table::get_ttl) //
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
//
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
py::arg("
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
.def("
|
|
310
|
-
.def("
|
|
311
|
-
.def("
|
|
312
|
-
.def("
|
|
313
|
-
.def("
|
|
314
|
-
|
|
315
|
-
.def("
|
|
316
|
-
|
|
317
|
-
.def("
|
|
318
|
-
py::arg("
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
.def("
|
|
322
|
-
py::arg("
|
|
327
|
+
.def("get_shard_size", &qdb::table::get_shard_size) //
|
|
328
|
+
//
|
|
329
|
+
.def("reader", &qdb::table::reader, //
|
|
330
|
+
py::kw_only(), //
|
|
331
|
+
py::arg("column_names") = std::vector<std::string>{}, //
|
|
332
|
+
py::arg("batch_size") = std::size_t{0}, //
|
|
333
|
+
py::arg("ranges") = std::vector<py::tuple>{} //
|
|
334
|
+
) //
|
|
335
|
+
//
|
|
336
|
+
.def("subscribe", &qdb::table::subscribe) //
|
|
337
|
+
.def("erase_ranges", &qdb::table::erase_ranges) //
|
|
338
|
+
.def("blob_insert", &qdb::table::blob_insert) //
|
|
339
|
+
.def("string_insert", &qdb::table::string_insert) //
|
|
340
|
+
.def("double_insert", &qdb::table::double_insert) //
|
|
341
|
+
.def("int64_insert", &qdb::table::int64_insert) //
|
|
342
|
+
.def("timestamp_insert", &qdb::table::timestamp_insert) //
|
|
343
|
+
//
|
|
344
|
+
.def("blob_get_ranges", &qdb::table::blob_get_ranges, //
|
|
345
|
+
py::arg("column"), //
|
|
346
|
+
py::arg("ranges") = py::none{} //
|
|
347
|
+
) //
|
|
348
|
+
.def("string_get_ranges", &qdb::table::string_get_ranges, //
|
|
349
|
+
py::arg("column"), //
|
|
350
|
+
py::arg("ranges") = py::none{} //
|
|
351
|
+
) //
|
|
352
|
+
.def("double_get_ranges", &qdb::table::double_get_ranges, //
|
|
353
|
+
py::arg("column"), //
|
|
354
|
+
py::arg("ranges") = py::none{} //
|
|
355
|
+
) //
|
|
356
|
+
.def("int64_get_ranges", &qdb::table::int64_get_ranges, //
|
|
357
|
+
py::arg("column"), //
|
|
358
|
+
py::arg("ranges") = py::none{} //
|
|
359
|
+
) //
|
|
360
|
+
.def("timestamp_get_ranges", &qdb::table::timestamp_get_ranges, //
|
|
361
|
+
py::arg("column"), //
|
|
362
|
+
py::arg("ranges") = py::none{} //
|
|
363
|
+
); //
|
|
323
364
|
}
|
|
324
365
|
|
|
325
366
|
} // namespace qdb
|
quasardb/traits.hpp
CHANGED
|
@@ -218,6 +218,21 @@ VALUE_TRAIT_DECL(qdb_blob_t)
|
|
|
218
218
|
}
|
|
219
219
|
};
|
|
220
220
|
|
|
221
|
+
VALUE_TRAIT_DECL(char const *)
|
|
222
|
+
{
|
|
223
|
+
static constexpr bool is_qdb_primitive = false;
|
|
224
|
+
|
|
225
|
+
static constexpr char const * null_value() noexcept
|
|
226
|
+
{
|
|
227
|
+
return nullptr;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
static constexpr bool is_null(char const * x) noexcept
|
|
231
|
+
{
|
|
232
|
+
return x == null_value();
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
|
|
221
236
|
VALUE_TRAIT_DECL(qdb_ts_double_point)
|
|
222
237
|
{
|
|
223
238
|
using primitive_type = double;
|
|
@@ -616,4 +631,12 @@ inline typename T::value_type null_value() noexcept
|
|
|
616
631
|
return T::null_value();
|
|
617
632
|
};
|
|
618
633
|
|
|
634
|
+
template <class T>
|
|
635
|
+
struct is_chrono_duration : std::false_type
|
|
636
|
+
{};
|
|
637
|
+
|
|
638
|
+
template <class Rep, class Period>
|
|
639
|
+
struct is_chrono_duration<std::chrono::duration<Rep, Period>> : std::true_type
|
|
640
|
+
{};
|
|
641
|
+
|
|
619
642
|
}; // namespace qdb::traits
|