quasardb 3.14.2.dev3__cp38-cp38-win_amd64.whl → 3.14.2.dev5__cp38-cp38-win_amd64.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.

Files changed (105) hide show
  1. quasardb/INSTALL.vcxproj +6 -5
  2. quasardb/__init__.py +21 -7
  3. quasardb/cmake_install.cmake +6 -0
  4. quasardb/date/ALL_BUILD.vcxproj +10 -9
  5. quasardb/date/CMakeFiles/Export/df49adab93b9e0c10c64f72458b31971/dateTargets.cmake +2 -2
  6. quasardb/date/CMakeFiles/generate.stamp.depend +4 -4
  7. quasardb/date/INSTALL.vcxproj +6 -5
  8. quasardb/date/cmake_install.cmake +6 -0
  9. quasardb/date/dateTargets.cmake +2 -2
  10. quasardb/extensions/writer.py +59 -61
  11. quasardb/firehose.py +24 -22
  12. quasardb/numpy/__init__.py +181 -120
  13. quasardb/pandas/__init__.py +145 -95
  14. quasardb/pool.py +13 -2
  15. quasardb/pybind11/ALL_BUILD.vcxproj +10 -9
  16. quasardb/pybind11/CMakeFiles/generate.stamp.depend +14 -14
  17. quasardb/pybind11/INSTALL.vcxproj +6 -5
  18. quasardb/pybind11/cmake_install.cmake +6 -0
  19. quasardb/qdb_api.dll +0 -0
  20. quasardb/quasardb.cp38-win_amd64.pyd +0 -0
  21. quasardb/range-v3/ALL_BUILD.vcxproj +10 -9
  22. quasardb/range-v3/CMakeFiles/Export/d94ef200eca10a819b5858b33e808f5b/range-v3-targets.cmake +2 -2
  23. quasardb/range-v3/CMakeFiles/generate.stamp.depend +11 -11
  24. quasardb/range-v3/INSTALL.vcxproj +6 -5
  25. quasardb/range-v3/cmake_install.cmake +6 -0
  26. quasardb/range-v3/range-v3-config.cmake +2 -2
  27. quasardb/range-v3/range.v3.headers.vcxproj +10 -9
  28. quasardb/stats.py +92 -80
  29. quasardb/table_cache.py +5 -1
  30. {quasardb-3.14.2.dev3.dist-info → quasardb-3.14.2.dev5.dist-info}/METADATA +3 -6
  31. quasardb-3.14.2.dev5.dist-info/RECORD +54 -0
  32. {quasardb-3.14.2.dev3.dist-info → quasardb-3.14.2.dev5.dist-info}/WHEEL +1 -1
  33. quasardb/CMakeLists.txt +0 -517
  34. quasardb/batch_column.hpp +0 -80
  35. quasardb/batch_inserter.hpp +0 -248
  36. quasardb/blob.hpp +0 -150
  37. quasardb/cluster.cpp +0 -102
  38. quasardb/cluster.hpp +0 -593
  39. quasardb/concepts.hpp +0 -322
  40. quasardb/continuous.cpp +0 -199
  41. quasardb/continuous.hpp +0 -109
  42. quasardb/convert/array.hpp +0 -299
  43. quasardb/convert/point.hpp +0 -330
  44. quasardb/convert/range.hpp +0 -282
  45. quasardb/convert/unicode.hpp +0 -598
  46. quasardb/convert/util.hpp +0 -22
  47. quasardb/convert/value.hpp +0 -782
  48. quasardb/convert.hpp +0 -38
  49. quasardb/detail/invoke.hpp +0 -0
  50. quasardb/detail/qdb_resource.hpp +0 -129
  51. quasardb/detail/retry.cpp +0 -30
  52. quasardb/detail/retry.hpp +0 -147
  53. quasardb/detail/sleep.hpp +0 -53
  54. quasardb/detail/ts_column.hpp +0 -224
  55. quasardb/detail/writer.cpp +0 -440
  56. quasardb/detail/writer.hpp +0 -550
  57. quasardb/direct_blob.hpp +0 -108
  58. quasardb/direct_handle.hpp +0 -83
  59. quasardb/direct_integer.hpp +0 -94
  60. quasardb/dispatch.hpp +0 -157
  61. quasardb/double.hpp +0 -87
  62. quasardb/entry.hpp +0 -273
  63. quasardb/error.hpp +0 -393
  64. quasardb/handle.cpp +0 -29
  65. quasardb/handle.hpp +0 -98
  66. quasardb/integer.hpp +0 -88
  67. quasardb/logger.cpp +0 -106
  68. quasardb/logger.hpp +0 -228
  69. quasardb/masked_array.hpp +0 -658
  70. quasardb/metrics.cpp +0 -103
  71. quasardb/metrics.hpp +0 -112
  72. quasardb/module.cpp +0 -92
  73. quasardb/module.hpp +0 -24
  74. quasardb/node.hpp +0 -132
  75. quasardb/numpy.cpp +0 -6
  76. quasardb/numpy.hpp +0 -489
  77. quasardb/object_tracker.hpp +0 -282
  78. quasardb/options.hpp +0 -273
  79. quasardb/perf.hpp +0 -336
  80. quasardb/properties.cpp +0 -41
  81. quasardb/properties.hpp +0 -85
  82. quasardb/pytypes.hpp +0 -221
  83. quasardb/query.cpp +0 -420
  84. quasardb/query.hpp +0 -92
  85. quasardb/reader.cpp +0 -282
  86. quasardb/reader.hpp +0 -256
  87. quasardb/remove_cvref.hpp +0 -31
  88. quasardb/string.hpp +0 -160
  89. quasardb/table.cpp +0 -257
  90. quasardb/table.hpp +0 -366
  91. quasardb/tag.hpp +0 -77
  92. quasardb/timestamp.hpp +0 -97
  93. quasardb/traits.hpp +0 -642
  94. quasardb/ts_iterator.hpp +0 -193
  95. quasardb/utils/blob_deque.hpp +0 -96
  96. quasardb/utils/ostream.hpp +0 -17
  97. quasardb/utils/permutation.hpp +0 -50
  98. quasardb/utils/stable_sort.hpp +0 -25
  99. quasardb/utils/unzip_view.hpp +0 -89
  100. quasardb/utils.cpp +0 -28
  101. quasardb/utils.hpp +0 -174
  102. quasardb/writer.hpp +0 -354
  103. quasardb-3.14.2.dev3.dist-info/RECORD +0 -124
  104. {quasardb-3.14.2.dev3.dist-info → quasardb-3.14.2.dev5.dist-info}/LICENSE.md +0 -0
  105. {quasardb-3.14.2.dev3.dist-info → quasardb-3.14.2.dev5.dist-info}/top_level.txt +0 -0
quasardb/metrics.cpp DELETED
@@ -1,103 +0,0 @@
1
- #include "metrics.hpp"
2
- #include <mutex>
3
-
4
- namespace qdb
5
- {
6
-
7
- static metrics_container_t metrics_totals_ = metrics_container_t{};
8
- static std::mutex metrics_lock_ = std::mutex{};
9
-
10
- metrics::scoped_capture::~scoped_capture()
11
- {
12
- using std::chrono::nanoseconds;
13
-
14
- time_point_t stop = clock_t::now();
15
-
16
- auto duration = std::chrono::duration_cast<nanoseconds>(stop - start_);
17
-
18
- metrics::record(test_id_, duration.count());
19
- }
20
-
21
- metrics::measure::measure()
22
- : start_{metrics::totals()}
23
- {}
24
-
25
- metrics_container_t metrics::measure::get() const
26
- {
27
- metrics_container_t cur = metrics::totals();
28
-
29
- metrics_container_t ret{};
30
-
31
- for (auto i : cur)
32
- {
33
- assert(ret.find(i.first) == ret.end());
34
-
35
- metrics_container_t::const_iterator prev = start_.find(i.first);
36
-
37
- if (prev == start_.end())
38
- {
39
- // Previously, metric didn't exist yet, as such it's entirely new
40
- // and all accumulated time was within the scope.
41
- ret.emplace(i.first, i.second);
42
- }
43
- else if (i.second > prev->second)
44
- {
45
- // Accumulated time actually increased, record difference
46
- ret.emplace(i.first, i.second - prev->second);
47
- }
48
- else
49
- {
50
- // Integrity check: we can only increase totals over time, never decrease
51
- assert(i.second == prev->second);
52
- }
53
- };
54
-
55
- return ret;
56
- };
57
-
58
- /* static */ void metrics::record(std::string const & test_id, std::uint64_t nsec)
59
- {
60
- std::lock_guard<std::mutex> guard(metrics_lock_);
61
-
62
- metrics_container_t::iterator pos = metrics_totals_.lower_bound(test_id);
63
-
64
- if (pos == metrics_totals_.end() || pos->first != test_id) [[unlikely]]
65
- {
66
- pos = metrics_totals_.emplace_hint(pos, test_id, 0);
67
-
68
- assert(pos->second == 0);
69
- }
70
-
71
- assert(pos->first == test_id);
72
- pos->second += nsec;
73
- }
74
-
75
- /* static */ metrics_container_t metrics::totals()
76
- {
77
- std::lock_guard<std::mutex> guard(metrics_lock_);
78
- return metrics_totals_;
79
- }
80
-
81
- /* static */ void metrics::clear()
82
- {
83
- std::lock_guard<std::mutex> guard(metrics_lock_);
84
- metrics_totals_.clear();
85
- }
86
-
87
- void register_metrics(py::module_ & m)
88
- {
89
-
90
- py::module_ metrics_module =
91
- m.def_submodule("metrics", "Keep track of low-level performance metrics")
92
- .def("totals", &qdb::metrics::totals)
93
- .def("clear", &qdb::metrics::clear);
94
-
95
- auto metrics_measure = py::class_<qdb::metrics::measure>(
96
- metrics_module, "Measure", "Track all metrics within a block of code")
97
- .def(py::init())
98
- .def("__enter__", &qdb::metrics::measure::enter)
99
- .def("__exit__", &qdb::metrics::measure::exit)
100
- .def("get", &qdb::metrics::measure::get);
101
- };
102
-
103
- }; // namespace qdb
quasardb/metrics.hpp DELETED
@@ -1,112 +0,0 @@
1
- /*
2
- *
3
- * Official Python API
4
- *
5
- * Copyright (c) 2009-2024, quasardb SAS. All rights reserved.
6
- * All rights reserved.
7
- *
8
- * Redistribution and use in source and binary forms, with or without
9
- * modification, are permitted provided that the following conditions are met:
10
- *
11
- * * Redistributions of source code must retain the above copyright
12
- * notice, this list of conditions and the following disclaimer.
13
- * * Redistributions in binary form must reproduce the above copyright
14
- * notice, this list of conditions and the following disclaimer in the
15
- * documentation and/or other materials provided with the distribution.
16
- * * Neither the name of quasardb nor the names of its contributors may
17
- * be used to endorse or promote products derived from this software
18
- * without specific prior written permission.
19
- *
20
- * THIS SOFTWARE IS PROVIDED BY QUASARDB AND CONTRIBUTORS ``AS IS'' AND ANY
21
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
24
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
- */
31
- #pragma once
32
-
33
- #include <pybind11/pybind11.h>
34
- #include <pybind11/stl.h>
35
- #include <cassert>
36
- #include <chrono>
37
- #include <map>
38
- #include <string>
39
-
40
- namespace qdb
41
- {
42
- namespace py = pybind11;
43
- using metrics_container_t = std::map<std::string, std::uint64_t>;
44
-
45
- class metrics
46
- {
47
- private:
48
- public:
49
- /**
50
- * Utility fixture that automatically records timings for a certain block of code.
51
- * This is intended to be used from native C++ code only.
52
- */
53
- class scoped_capture
54
- {
55
- using clock_t = std::chrono::high_resolution_clock;
56
- using time_point_t = std::chrono::time_point<clock_t>;
57
-
58
- public:
59
- scoped_capture(std::string const & test_id) noexcept
60
- : test_id_{test_id}
61
- , start_{clock_t::now()} {};
62
- ~scoped_capture();
63
-
64
- private:
65
- std::string test_id_;
66
- time_point_t start_;
67
- };
68
-
69
- /**
70
- * Utility class that's exposed to Python which can be used to record metrics in
71
- * a scope. It makes it easy to track the difference between the beginning and end
72
- * of execution.
73
- */
74
- class measure
75
- {
76
- public:
77
- measure();
78
- ~measure(){};
79
-
80
- public:
81
- measure enter()
82
- {
83
- // No-op, all initialization is done in the constructor.
84
- return *this;
85
- }
86
-
87
- void exit(py::object /* type */, py::object /* value */, py::object /* traceback */)
88
- {}
89
-
90
- metrics_container_t get() const;
91
-
92
- private:
93
- metrics_container_t start_;
94
- };
95
-
96
- public:
97
- metrics() noexcept {};
98
-
99
- ~metrics() noexcept {};
100
-
101
- public:
102
- static void record(std::string const & test_id, std::uint64_t nsec);
103
-
104
- static metrics_container_t totals();
105
- static void clear();
106
-
107
- private:
108
- };
109
-
110
- void register_metrics(py::module_ & m);
111
-
112
- } // namespace qdb
quasardb/module.cpp DELETED
@@ -1,92 +0,0 @@
1
- #include "module.hpp"
2
- #include "cluster.hpp"
3
- #include "metrics.hpp"
4
- #include "node.hpp"
5
- #include "reader.hpp"
6
- #include "writer.hpp"
7
- #include <functional>
8
- #include <list>
9
-
10
- #ifndef QDB_TESTS_ENABLED
11
- # include "detail/sleep.hpp"
12
- # include "detail/writer.hpp"
13
- using push_strategy_t = qdb::detail::default_writer_push_strategy;
14
- using sleep_strategy_t = qdb::detail::default_sleep_strategy<>;
15
- #else
16
- # include "../tests/detail/sleep.hpp"
17
- # include "../tests/detail/writer.hpp"
18
- using push_strategy_t = qdb::detail::mock_failure_writer_push_strategy;
19
- using sleep_strategy_t = qdb::detail::mock_sleep_strategy<>;
20
- #endif
21
-
22
- namespace qdb
23
- {
24
-
25
- /**
26
- * This approach is inspired from pybind11, where we keep a global static variable
27
- * of initializers for components/modules that which to register with our global
28
- * quasardb module.
29
- *
30
- * It has the downside of module initialization order essentially being random, which
31
- * is fine for our use case. It allows decoupling of code in many places.
32
- */
33
- std::list<std::function<void(py::module_ &)>> & initializers()
34
- {
35
- static std::list<std::function<void(py::module_ &)>> inits;
36
- return inits;
37
- }
38
-
39
- submodule_initializer::submodule_initializer(initialize_fn init)
40
- {
41
- initializers().emplace_back(init);
42
- }
43
-
44
- submodule_initializer::submodule_initializer(const char * submodule_name, initialize_fn init)
45
- {
46
- initializers().emplace_back([=](py::module_ & parent) { init(parent); });
47
- }
48
-
49
- }; // namespace qdb
50
-
51
- PYBIND11_MODULE(quasardb, m)
52
- {
53
- m.doc() = "QuasarDB Official Python API";
54
- m.def("version", &qdb_version, "Return version number");
55
- m.def("build", &qdb_build, "Return build number");
56
- m.attr("never_expires") = std::chrono::system_clock::time_point{};
57
-
58
- qdb::register_errors(m);
59
- qdb::register_cluster(m);
60
- qdb::register_node(m);
61
- qdb::register_options(m);
62
- qdb::register_properties(m);
63
- qdb::register_perf(m);
64
- qdb::register_entry(m);
65
- qdb::register_double(m);
66
- qdb::register_integer(m);
67
- qdb::register_blob(m);
68
- qdb::register_string(m);
69
- qdb::register_timestamp(m);
70
- qdb::register_direct_blob(m);
71
- qdb::register_direct_integer(m);
72
- qdb::register_tag(m);
73
- qdb::register_query(m);
74
- qdb::register_continuous(m);
75
- qdb::register_table(m);
76
- qdb::register_batch_column(m);
77
- qdb::register_batch_inserter(m);
78
- qdb::register_masked_array(m);
79
- qdb::register_reader(m);
80
-
81
- qdb::register_writer<push_strategy_t, sleep_strategy_t>(m);
82
-
83
- qdb::register_metrics(m);
84
-
85
- qdb::detail::register_ts_column(m);
86
- qdb::detail::register_retry_options(m);
87
-
88
- for (const auto & initializer : qdb::initializers())
89
- {
90
- initializer(m);
91
- }
92
- }
quasardb/module.hpp DELETED
@@ -1,24 +0,0 @@
1
- #pragma once
2
-
3
- #include <pybind11/pybind11.h>
4
-
5
- namespace qdb
6
- {
7
-
8
- namespace py = pybind11;
9
-
10
- class submodule_initializer
11
- {
12
- using initialize_fn = void (*)(py::module_ &);
13
-
14
- public:
15
- explicit submodule_initializer(initialize_fn init);
16
- submodule_initializer(const char * submodule_name, initialize_fn init);
17
- };
18
-
19
- }; // namespace qdb
20
-
21
- #define QDB_REGISTER_MODULE(name, variable) \
22
- void qdb_submodule_##name(py::module_ &); \
23
- submodule_initializer name(#name, qdb_submodule_##name); \
24
- void qdb_submodule_##name(py::module_ &(variable))
quasardb/node.hpp DELETED
@@ -1,132 +0,0 @@
1
- /*
2
- *
3
- * Official Python API
4
- *
5
- * Copyright (c) 2009-2024, quasardb SAS. All rights reserved.
6
- * All rights reserved.
7
- *
8
- * Redistribution and use in source and binary forms, with or without
9
- * modification, are permitted provided that the following conditions are met:
10
- *
11
- * * Redistributions of source code must retain the above copyright
12
- * notice, this list of conditions and the following disclaimer.
13
- * * Redistributions in binary form must reproduce the above copyright
14
- * notice, this list of conditions and the following disclaimer in the
15
- * documentation and/or other materials provided with the distribution.
16
- * * Neither the name of quasardb nor the names of its contributors may
17
- * be used to endorse or promote products derived from this software
18
- * without specific prior written permission.
19
- *
20
- * THIS SOFTWARE IS PROVIDED BY QUASARDB AND CONTRIBUTORS ``AS IS'' AND ANY
21
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
24
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
- */
31
- #pragma once
32
-
33
- #include "direct_blob.hpp"
34
- #include "direct_handle.hpp"
35
- #include "direct_integer.hpp"
36
- #include "options.hpp"
37
- #include "utils.hpp"
38
- #include <memory>
39
-
40
- namespace qdb
41
- {
42
-
43
- class node
44
- {
45
- public:
46
- /**
47
- * Construct a direct node connection directly, possibly with security credentials.
48
- */
49
- node(const std::string & node_uri,
50
- const std::string & user_name = {},
51
- const std::string & user_private_key = {},
52
- const std::string & cluster_public_key = {},
53
- const std::string & user_security_file = {},
54
- const std::string & cluster_public_key_file = {},
55
- bool enable_encryption = false)
56
- : _uri{node_uri}
57
- , _handle{make_handle_ptr()}
58
- , _direct_handle{make_direct_handle_ptr()}
59
- {
60
- qdb::options{_handle}.apply_credentials(user_name, user_private_key, cluster_public_key,
61
- user_security_file, cluster_public_key_file);
62
-
63
- if (enable_encryption) {
64
- qdb::options{_handle}.set_encryption(qdb_crypt_aes_gcm_256);
65
- }
66
-
67
- _direct_handle->connect(_handle, node_uri);
68
- }
69
-
70
- /**
71
- * Construct a direct node from a cluster handle, reusing its security credentials if applicable.
72
- */
73
- node(const std::string & node_uri, handle_ptr handle)
74
- : _uri{node_uri}
75
- , _handle{handle}
76
- , _direct_handle{make_direct_handle_ptr()}
77
- {
78
- _direct_handle->connect(_handle, node_uri);
79
- }
80
-
81
- std::vector<std::string> prefix_get(const std::string & prefix, qdb_int_t max_count)
82
- {
83
- const char ** result = nullptr;
84
- size_t count = 0;
85
-
86
- // don't throw if no prefix is found
87
- const qdb_error_t err =
88
- qdb_direct_prefix_get(*_direct_handle, prefix.c_str(), max_count, &result, &count);
89
- qdb_throw_if_error(*_handle, err);
90
-
91
- return convert_strings_and_release(_handle, result, count);
92
- }
93
-
94
- qdb::direct_blob_entry blob(const std::string & alias)
95
- {
96
- return qdb::direct_blob_entry{_handle, _direct_handle, alias};
97
- }
98
-
99
- qdb::direct_integer_entry integer(const std::string & alias)
100
- {
101
- return qdb::direct_integer_entry{_handle, _direct_handle, alias};
102
- }
103
-
104
- private:
105
- std::string _uri;
106
- handle_ptr _handle;
107
- direct_handle_ptr _direct_handle;
108
- };
109
-
110
- template <typename Module>
111
- static inline void register_node(Module & m)
112
- {
113
- namespace py = pybind11;
114
-
115
- py::class_<qdb::node>(m, "Node")
116
- .def(py::init<std::string const &, std::string const &, std::string const &, std::string const &,
117
- std::string const &, std::string const &, bool>(),
118
- py::arg("uri"), //
119
- py::arg("user_name") = std::string{}, //
120
- py::arg("user_private_key") = std::string{}, //
121
- py::arg("cluster_public_key") = std::string{}, //
122
- py::kw_only(), //
123
- py::arg("user_security_file") = std::string{}, //
124
- py::arg("cluster_public_key_file") = std::string{}, //
125
- py::arg("enable_encryption") = false //
126
- ) //
127
- .def("prefix_get", &qdb::node::prefix_get)
128
- .def("blob", &qdb::node::blob)
129
- .def("integer", &qdb::node::integer);
130
- }
131
-
132
- } // namespace qdb
quasardb/numpy.cpp DELETED
@@ -1,6 +0,0 @@
1
- #include "numpy.hpp"
2
- #include "convert/value.hpp"
3
-
4
- qdb::numpy::datetime64::datetime64(qdb_timespec_t const & ts)
5
- : datetime64(convert::value<qdb_timespec_t, std::int64_t>(ts))
6
- {}