quasardb 3.14.2.dev3__cp39-cp39-win32.whl → 3.14.2.dev5__cp39-cp39-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.

Files changed (105) hide show
  1. quasardb/INSTALL.vcxproj +5 -4
  2. quasardb/__init__.py +21 -7
  3. quasardb/cmake_install.cmake +6 -0
  4. quasardb/date/ALL_BUILD.vcxproj +9 -8
  5. quasardb/date/CMakeFiles/Export/df49adab93b9e0c10c64f72458b31971/dateTargets.cmake +2 -2
  6. quasardb/date/CMakeFiles/generate.stamp.depend +4 -4
  7. quasardb/date/INSTALL.vcxproj +5 -4
  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 +9 -8
  16. quasardb/pybind11/CMakeFiles/generate.stamp.depend +14 -14
  17. quasardb/pybind11/INSTALL.vcxproj +5 -4
  18. quasardb/pybind11/cmake_install.cmake +6 -0
  19. quasardb/qdb_api.dll +0 -0
  20. quasardb/quasardb.cp39-win32.pyd +0 -0
  21. quasardb/range-v3/ALL_BUILD.vcxproj +9 -8
  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 +5 -4
  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 +9 -8
  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 +13 -8
  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
@@ -1,282 +0,0 @@
1
- #pragma once
2
-
3
- #include <any>
4
- #include <cassert>
5
- #include <iostream>
6
- #include <memory>
7
- #include <stack>
8
- #include <typeindex>
9
- #include <unordered_map>
10
- #include <unordered_set>
11
-
12
- namespace qdb::object_tracker
13
- {
14
-
15
- ////////////////////////////////////////////////////////////////////////////////
16
- //
17
- // Implementation
18
- //
19
- ///////////////////
20
-
21
- namespace detail
22
- {
23
-
24
- ////////////////////////////////////////////////////////////////////////////////
25
- //
26
- // Trackable objects
27
- //
28
- ///////////////////
29
- //
30
- // Typically we don't really care about the type of the underlying pointers
31
- // we track, and would like to just use `void *`; this makes the code a lot
32
- // simpler.
33
- //
34
- // There's a problem, however: we cannot invoke `delete` on void * because
35
- // the compiler wouldn't know which destructor to call.
36
- //
37
- // The code below deal with this mess: it's able to "wrap" any typed unique_ptr
38
- // in something which can best be considered a std::unique_ptr<void>, but
39
- // uses the original, type-based deleter.
40
- //
41
- // Not sure if evil hack or elaborate genius, but it works.
42
- //
43
- ///////////////////
44
-
45
- using void_delete_fn = std::function<void(void *)>;
46
-
47
- template <typename T, typename DT>
48
- inline auto deleter_of() noexcept -> void_delete_fn
49
- {
50
- // Magic is here: we make a `void *` deleter function, which under-the-hood
51
- // invokes the original deleter.
52
- return [](void * x) -> void { DT{}(static_cast<T *>(x)); };
53
- };
54
-
55
- using trackable_object = std::unique_ptr<void, void_delete_fn>;
56
-
57
- template <typename T, typename DT>
58
- inline trackable_object make_trackable_object(std::unique_ptr<T, DT> && x)
59
- {
60
- return trackable_object{x.release(), deleter_of<T, DT>()};
61
- };
62
-
63
- template <typename T, typename DT = std::default_delete<T>>
64
- inline trackable_object make_trackable_object(T * x)
65
- {
66
- return make_trackable_object(std::unique_ptr<T>{x});
67
- };
68
-
69
- ////////////////////////////////////////////////////////////////////////////////
70
- //
71
- // Repository
72
- //
73
- ///////////////////
74
- //
75
- // The repository contains all tracked objects. It maintains a container of tracked
76
- // objects, which are effectively unique_ptr<void>, and as such automatically released
77
- // upon destruction.
78
- //
79
- // Intended use is to immediately pass the pointer to immediately track:
80
- //
81
- // char * buf = qdb::object_tracker::track<char>(new char[32]);
82
- //
83
- // or, even better:
84
- //
85
- // char * buf = qdb::object_tracker::alloc<char>(32);
86
- //
87
- ///////////////////
88
-
89
- class repository
90
- {
91
- private:
92
- using container_t = std::vector<trackable_object>;
93
-
94
- public:
95
- repository() = default;
96
-
97
- repository(repository const &) = delete;
98
- repository(repository && other) = delete;
99
- repository & operator=(repository const &) = delete;
100
-
101
- public:
102
- [[nodiscard]] static inline repository & instance() noexcept
103
- {
104
- static repository instance_;
105
- // If this assertion fails it implies a component tries to have its objects
106
- // tracked but there is no collector being able to track these yet.
107
- //
108
- // Ensure you have a `collector` with its scoped wrapped around the rest of
109
- // the code that wants its objects tracked.
110
- return instance_;
111
- };
112
-
113
- /**
114
- * Swaps the tracked objects of `this` repo with the tracked objects of another
115
- * repository.
116
- *
117
- * Used by `scoped_repository` to temporarily "claim" the global scope, and to
118
- * release it back again later.
119
- */
120
- static inline void swap(repository & x) noexcept
121
- {
122
- std::swap(instance().xs_, x.xs_);
123
- };
124
-
125
- public:
126
- // Delegate functions
127
-
128
- [[nodiscard]] inline void * track(trackable_object && x) noexcept
129
- {
130
- void * ptr = x.get();
131
- xs_.push_back(std::move(x));
132
-
133
- return ptr;
134
- };
135
-
136
- template <typename T>
137
- [[nodiscard]] inline T * track(T * x) noexcept
138
- {
139
- return static_cast<T *>(track(make_trackable_object(std::unique_ptr<T>{x})));
140
- };
141
-
142
- /**
143
- * Allocates `n` bytes and immediately tracks it. n is the amount of bytes to allocate, *not* the
144
- * amount of objects of sizeof(T) to allocate.
145
- */
146
- template <typename T>
147
- [[nodiscard]] inline T * alloc(std::size_t n) noexcept
148
- {
149
- return track<T>((T *)::operator new(n));
150
- };
151
-
152
- public:
153
- // Inspection / management functions
154
-
155
- [[nodiscard]] inline std::size_t size() const noexcept
156
- {
157
- return xs_.size();
158
- };
159
-
160
- [[nodiscard]] inline bool empty() const noexcept
161
- {
162
- return xs_.empty();
163
- };
164
-
165
- private:
166
- container_t xs_;
167
- };
168
-
169
- ////////////////////////////////////////////////////////////////////////////////
170
- //
171
- // Scoped Repository
172
- //
173
- ///////////////////
174
- //
175
- // Wraps a repository that automatically releases everything when it goes out
176
- // of scope.
177
- //
178
- // Intended use case:
179
- // * Attach a scoped_repository to the object that initiates a query/request, *and*
180
- // stays alive as long as any pointers are still being referenced.
181
- // * In conjunction with `scoped_capture`, captures all tracked pointers during
182
- // its scope;
183
- // * only once e.g. the scoped_repository goes completely out of scope, does the cleanup
184
- // happen.
185
- //
186
- // You would attach this scoped_repository to e.g. a `query_result` structure.
187
- //
188
- ///////////////////
189
-
190
- class scoped_repository
191
- {
192
- friend class scoped_capture;
193
-
194
- public:
195
- scoped_repository() = default;
196
-
197
- ~scoped_repository(){};
198
-
199
- [[nodiscard]] inline std::size_t size() const noexcept
200
- {
201
- return repo_.size();
202
- };
203
-
204
- [[nodiscard]] inline bool empty() const noexcept
205
- {
206
- return repo_.empty();
207
- };
208
-
209
- inline void swap()
210
- {
211
- repository::swap(repo_);
212
- };
213
-
214
- private:
215
- repository repo_;
216
- };
217
-
218
- ////////////////////////////////////////////////////////////////////////////////
219
- //
220
- // Scoped Capture
221
- //
222
- ///////////////////
223
- //
224
- // During its scope, redirects all new tracked objects to the provided repository.
225
- // You would typically put this around the code that invokes conversion or any
226
- // other components that can create tracked objects.
227
- //
228
- // *WARNING*: Multiple scoped_captures being active at the same time is unsupported.
229
- // Keep these scopes as small as possible, and do *not* use them in async
230
- // code.
231
- //
232
- ///////////////////
233
-
234
- class scoped_capture
235
- {
236
- public:
237
- inline scoped_capture(scoped_repository & ctx)
238
- : ctx_{ctx}
239
- {
240
- // This is where the magic happens: we 'claim' the global scope by swapping
241
- // our local scope with the global one...
242
- ctx_.swap();
243
- };
244
-
245
- inline ~scoped_capture()
246
- {
247
- // ... and we release it back by putting the global scope back in place.
248
- ctx_.swap();
249
- };
250
-
251
- private:
252
- scoped_repository & ctx_;
253
- };
254
- }; // namespace detail
255
-
256
- ////////////////////////////////////////////////////////////////////////////////
257
- //
258
- // Public interface
259
- //
260
- ///////////////////
261
-
262
- template <typename T>
263
- inline T * track(T * x)
264
- {
265
- return detail::repository::instance().track<T>(x);
266
- };
267
-
268
- template <typename T, typename DT>
269
- inline T * track(std::unique_ptr<T, DT> && x)
270
- {
271
- return detail::repository::instance().track<T>(std::forward<std::unique_ptr<T, DT> &&>(x));
272
- };
273
-
274
- template <typename T>
275
- inline T * alloc(std::size_t n)
276
- {
277
- return detail::repository::instance().alloc<T>(n);
278
- };
279
-
280
- using scoped_repository = qdb::object_tracker::detail::scoped_repository;
281
- using scoped_capture = qdb::object_tracker::detail::scoped_capture;
282
- }; // namespace qdb::object_tracker
quasardb/options.hpp DELETED
@@ -1,273 +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 "handle.hpp"
34
- #include <qdb/option.h>
35
- #include "detail/qdb_resource.hpp"
36
- #include <chrono>
37
-
38
- namespace qdb
39
- {
40
-
41
- class options
42
- {
43
- public:
44
- explicit options(qdb::handle_ptr h)
45
- : _handle{h}
46
- {}
47
-
48
- public:
49
- /**
50
- * Applies credentials if provided, throws exception when credentials are invalid.
51
- */
52
- void apply_credentials(const std::string & user_name,
53
- const std::string & user_private_key,
54
- const std::string & cluster_public_key,
55
- const std::string & user_security_file,
56
- const std::string & cluster_public_key_file)
57
- {
58
- // must specify keys or files or nothing
59
- auto empty_keys = user_name.empty() && user_private_key.empty() && cluster_public_key.empty();
60
- auto empty_files = user_security_file.empty() && cluster_public_key_file.empty();
61
-
62
- if (!empty_keys && !empty_files)
63
- throw qdb::exception{qdb_e_invalid_argument,
64
- "Either key or file security settings must be provided, or none at all"};
65
-
66
- if (!empty_keys)
67
- {
68
- if (user_name.empty() || user_private_key.empty() || cluster_public_key.empty())
69
- throw qdb::exception{qdb_e_invalid_argument,
70
- "Either all keys security settings must be provided, or none at all"};
71
-
72
- set_user_credentials(user_name, user_private_key);
73
- set_cluster_public_key(cluster_public_key);
74
- }
75
- else if (!empty_files)
76
- {
77
- if (user_security_file.empty() || cluster_public_key_file.empty())
78
- throw qdb::exception{qdb_e_invalid_argument,
79
- "Either all files security settings must be provided, or none at all"};
80
-
81
- set_file_credential(user_security_file, cluster_public_key_file);
82
- }
83
- };
84
-
85
- void set_timezone(std::string const & tz)
86
- {
87
- qdb::qdb_throw_if_error(*_handle, qdb_option_set_timezone(*_handle, tz.c_str()));
88
- }
89
-
90
- std::string get_timezone()
91
- {
92
- detail::qdb_resource<char const> tz{*_handle};
93
- qdb::qdb_throw_if_error(*_handle, qdb_option_get_timezone(*_handle, &tz));
94
-
95
- std::string ret{tz.get()};
96
-
97
- return ret;
98
- }
99
-
100
- void set_timeout(std::chrono::milliseconds ms)
101
- {
102
- qdb::qdb_throw_if_error(
103
- *_handle, qdb_option_set_timeout(*_handle, static_cast<int>(ms.count())));
104
- }
105
-
106
- std::chrono::milliseconds get_timeout()
107
- {
108
- int ms = 0;
109
-
110
- qdb::qdb_throw_if_error(*_handle, qdb_option_get_timeout(*_handle, &ms));
111
-
112
- return std::chrono::milliseconds{ms};
113
- }
114
-
115
- void enable_user_properties()
116
- {
117
- qdb::qdb_throw_if_error(*_handle, qdb_option_enable_user_properties(*_handle));
118
- }
119
-
120
- void disable_user_properties()
121
- {
122
- qdb::qdb_throw_if_error(*_handle, qdb_option_disable_user_properties(*_handle));
123
- }
124
-
125
- void set_client_soft_memory_limit(std::size_t limit)
126
- {
127
- qdb::qdb_throw_if_error(*_handle,
128
- qdb_option_set_client_soft_memory_limit(*_handle, static_cast<qdb_uint_t>(limit)));
129
- }
130
-
131
- void set_stabilization_max_wait(std::chrono::milliseconds ms)
132
- {
133
- qdb::qdb_throw_if_error(
134
- *_handle, qdb_option_set_stabilization_max_wait(*_handle, static_cast<int>(ms.count())));
135
- }
136
-
137
- std::chrono::milliseconds get_stabilization_max_wait()
138
- {
139
- int ms = 0;
140
-
141
- qdb::qdb_throw_if_error(*_handle, qdb_option_get_stabilization_max_wait(*_handle, &ms));
142
-
143
- return std::chrono::milliseconds{ms};
144
- }
145
-
146
- void set_max_cardinality(qdb_uint_t cardinality)
147
- {
148
- qdb::qdb_throw_if_error(*_handle, qdb_option_set_max_cardinality(*_handle, cardinality));
149
- }
150
-
151
- void set_compression(qdb_compression_t level)
152
- {
153
- qdb::qdb_throw_if_error(*_handle, qdb_option_set_compression(*_handle, level));
154
- }
155
-
156
- void set_encryption(qdb_encryption_t algo)
157
- {
158
- qdb::qdb_throw_if_error(*_handle, qdb_option_set_encryption(*_handle, algo));
159
- }
160
-
161
- void set_cluster_public_key(const std::string & key)
162
- {
163
- qdb::qdb_throw_if_error(*_handle, qdb_option_set_cluster_public_key(*_handle, key.c_str()));
164
- }
165
-
166
- void set_user_credentials(const std::string & user, const std::string & private_key)
167
- {
168
- qdb::qdb_throw_if_error(
169
- *_handle, qdb_option_set_user_credentials(*_handle, user.c_str(), private_key.c_str()));
170
- }
171
-
172
- void set_file_credential(
173
- const std::string & user_security_file, const std::string & cluster_public_key_file)
174
- {
175
- qdb::qdb_throw_if_error(
176
- *_handle, qdb_option_load_security_files(
177
- *_handle, cluster_public_key_file.c_str(), user_security_file.c_str()));
178
- }
179
-
180
- void set_client_max_in_buf_size(size_t max_size)
181
- {
182
- qdb::qdb_throw_if_error(*_handle, qdb_option_set_client_max_in_buf_size(*_handle, max_size));
183
- }
184
-
185
- size_t get_client_max_in_buf_size()
186
- {
187
- size_t buf_size = 0;
188
- qdb::qdb_throw_if_error(*_handle, qdb_option_get_client_max_in_buf_size(*_handle, &buf_size));
189
- return buf_size;
190
- }
191
-
192
- size_t get_cluster_max_in_buf_size()
193
- {
194
- size_t buf_size = 0;
195
- qdb::qdb_throw_if_error(*_handle, qdb_option_get_cluster_max_in_buf_size(*_handle, &buf_size));
196
- return buf_size;
197
- }
198
-
199
- void set_client_max_parallelism(size_t max_parallelism)
200
- {
201
- qdb::qdb_throw_if_error(
202
- *_handle, qdb_option_set_client_max_parallelism(*_handle, max_parallelism));
203
- }
204
-
205
- size_t get_client_max_parallelism()
206
- {
207
- size_t max_parallelism = 0;
208
- qdb::qdb_throw_if_error(
209
- *_handle, qdb_option_get_client_max_parallelism(*_handle, &max_parallelism));
210
- return max_parallelism;
211
- }
212
-
213
- void set_query_max_length(size_t query_max_length)
214
- {
215
- qdb::qdb_throw_if_error(*_handle, qdb_option_set_query_max_length(*_handle, query_max_length));
216
- }
217
-
218
- size_t get_query_max_length()
219
- {
220
- size_t query_max_length = 0;
221
- qdb::qdb_throw_if_error(*_handle, qdb_option_get_query_max_length(*_handle, &query_max_length));
222
- return query_max_length;
223
- }
224
-
225
- private:
226
- qdb::handle_ptr _handle;
227
- };
228
-
229
- template <typename Module>
230
- static inline void register_options(Module & m)
231
- {
232
- namespace py = pybind11;
233
-
234
- py::class_<qdb::options> o(m, "Options"); //
235
-
236
- // None is reserved keyword in Python
237
- py::enum_<qdb_compression_t>{o, "Compression", py::arithmetic(), "Compression type"} //
238
- .value("Disabled", qdb_comp_none) //
239
- .value("Fast", qdb_comp_fast) //
240
- .value("Best", qdb_comp_best) //
241
- .value("Balanced", qdb_comp_balanced); //
242
-
243
- py::enum_<qdb_encryption_t>{o, "Encryption", py::arithmetic(), "Encryption type"} //
244
- .value("Disabled", qdb_crypt_none) //
245
- .value("AES256GCM", qdb_crypt_aes_gcm_256); //
246
-
247
- o.def(py::init<qdb::handle_ptr>()) //
248
- .def("set_timeout", &qdb::options::set_timeout) //
249
- .def("get_timeout", &qdb::options::get_timeout) //
250
- .def("set_timezone", &qdb::options::set_timezone) //
251
- .def("get_timezone", &qdb::options::get_timezone) //
252
- .def("enable_user_properties", &qdb::options::enable_user_properties) //
253
- .def("disable_user_properties", &qdb::options::disable_user_properties) //
254
- .def("set_stabilization_max_wait", &qdb::options::set_stabilization_max_wait) //
255
- .def("get_stabilization_max_wait", &qdb::options::get_stabilization_max_wait) //
256
- .def("set_max_cardinality", &qdb::options::set_max_cardinality) //
257
- .def("set_compression", &qdb::options::set_compression) //
258
- .def("set_encryption", &qdb::options::set_encryption) //
259
- .def("set_cluster_public_key", &qdb::options::set_cluster_public_key) //
260
- .def("set_user_credentials", &qdb::options::set_user_credentials) //
261
- .def("set_client_max_in_buf_size", &qdb::options::set_client_max_in_buf_size) //
262
- .def("get_client_max_in_buf_size", &qdb::options::get_client_max_in_buf_size) //
263
- .def("get_cluster_max_in_buf_size", &qdb::options::get_cluster_max_in_buf_size) //
264
- .def("get_client_max_parallelism", &qdb::options::get_client_max_parallelism) //
265
- .def("set_query_max_length", &qdb::options::set_query_max_length, //
266
- py::arg("query_max_length")) //
267
- .def("get_query_max_length", &qdb::options::get_query_max_length) //
268
- .def("set_client_soft_memory_limit", &qdb::options::set_client_soft_memory_limit, //
269
- py::arg("limit")) //
270
- ;
271
- }
272
-
273
- } // namespace qdb