quasardb 3.14.2.dev0__cp311-cp311-macosx_10_14_x86_64.whl → 3.14.2.dev2__cp311-cp311-macosx_10_14_x86_64.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 (59) hide show
  1. quasardb/CMakeFiles/CMakeDirectoryInformation.cmake +2 -2
  2. quasardb/CMakeLists.txt +30 -13
  3. quasardb/Makefile +19 -19
  4. quasardb/__init__.py +33 -4
  5. quasardb/cluster.cpp +7 -1
  6. quasardb/cluster.hpp +111 -72
  7. quasardb/cmake_install.cmake +3 -3
  8. quasardb/concepts.hpp +56 -12
  9. quasardb/continuous.cpp +84 -34
  10. quasardb/continuous.hpp +10 -7
  11. quasardb/convert/array.hpp +23 -6
  12. quasardb/convert/value.hpp +78 -7
  13. quasardb/date/CMakeFiles/CMakeDirectoryInformation.cmake +2 -2
  14. quasardb/date/CMakeFiles/Export/a52b05f964b070ee926bcad51d3288af/dateTargets.cmake +12 -12
  15. quasardb/date/Makefile +19 -19
  16. quasardb/date/cmake_install.cmake +3 -3
  17. quasardb/date/dateConfigVersion.cmake +9 -2
  18. quasardb/date/dateTargets.cmake +3 -7
  19. quasardb/detail/invoke.hpp +0 -0
  20. quasardb/detail/retry.cpp +30 -0
  21. quasardb/detail/retry.hpp +147 -0
  22. quasardb/detail/sleep.hpp +53 -0
  23. quasardb/{writer.cpp → detail/writer.cpp} +68 -162
  24. quasardb/detail/writer.hpp +550 -0
  25. quasardb/error.hpp +76 -1
  26. quasardb/libqdb_api.dylib +0 -0
  27. quasardb/masked_array.hpp +9 -2
  28. quasardb/module.cpp +20 -4
  29. quasardb/numpy/__init__.py +58 -10
  30. quasardb/object_tracker.hpp +2 -3
  31. quasardb/options.hpp +32 -3
  32. quasardb/pandas/__init__.py +59 -102
  33. quasardb/properties.cpp +41 -0
  34. quasardb/properties.hpp +85 -0
  35. quasardb/pybind11/CMakeFiles/CMakeDirectoryInformation.cmake +2 -2
  36. quasardb/pybind11/Makefile +19 -19
  37. quasardb/quasardb.cpython-311-darwin.so +0 -0
  38. quasardb/range-v3/CMakeFiles/CMakeDirectoryInformation.cmake +2 -2
  39. quasardb/range-v3/CMakeFiles/Export/d94ef200eca10a819b5858b33e808f5b/range-v3-targets.cmake +12 -12
  40. quasardb/range-v3/CMakeFiles/range.v3.headers.dir/DependInfo.cmake +6 -2
  41. quasardb/range-v3/CMakeFiles/range.v3.headers.dir/build.make +13 -13
  42. quasardb/range-v3/Makefile +24 -24
  43. quasardb/range-v3/cmake_install.cmake +15 -3
  44. quasardb/range-v3/range-v3-config-version.cmake +9 -2
  45. quasardb/range-v3/range-v3-config.cmake +3 -7
  46. quasardb/reader.cpp +282 -0
  47. quasardb/reader.hpp +256 -0
  48. quasardb/table.cpp +4 -36
  49. quasardb/table.hpp +69 -28
  50. quasardb/traits.hpp +23 -0
  51. quasardb/writer.hpp +245 -287
  52. {quasardb-3.14.2.dev0.dist-info → quasardb-3.14.2.dev2.dist-info}/METADATA +7 -7
  53. {quasardb-3.14.2.dev0.dist-info → quasardb-3.14.2.dev2.dist-info}/RECORD +56 -50
  54. {quasardb-3.14.2.dev0.dist-info → quasardb-3.14.2.dev2.dist-info}/WHEEL +1 -1
  55. quasardb/reader/ts_row.hpp +0 -281
  56. quasardb/reader/ts_value.hpp +0 -245
  57. quasardb/table_reader.hpp +0 -220
  58. {quasardb-3.14.2.dev0.dist-info → quasardb-3.14.2.dev2.dist-info}/LICENSE.md +0 -0
  59. {quasardb-3.14.2.dev0.dist-info → quasardb-3.14.2.dev2.dist-info}/top_level.txt +0 -0
@@ -1,9 +1,9 @@
1
1
  # CMAKE generated file: DO NOT EDIT!
2
- # Generated by "Unix Makefiles" Generator, CMake Version 3.24
2
+ # Generated by "Unix Makefiles" Generator, CMake Version 3.29
3
3
 
4
4
  # Relative path conversion top directories.
5
5
  set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/Users/teamcity/buildAgent/work/938b0bdf6727d1ad/thirdparty")
6
- set(CMAKE_RELATIVE_PATH_TOP_BINARY "/Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-12.0-x86_64-cpython-311/quasardb")
6
+ set(CMAKE_RELATIVE_PATH_TOP_BINARY "/Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-x86_64-cpython-311/quasardb")
7
7
 
8
8
  # Force unix paths in dependencies.
9
9
  set(CMAKE_FORCE_UNIX_PATHS 1)
quasardb/CMakeLists.txt CHANGED
@@ -2,9 +2,19 @@ cmake_minimum_required(VERSION 3.9.4)
2
2
  project(quasardb)
3
3
  set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
4
4
  set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
5
- set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0")
5
+ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15")
6
6
  set(CMAKE_VERBOSE_MAKEFILE FALSE)
7
7
 
8
+ if(APPLE)
9
+ # Robustly get the SDK path using xcrun.
10
+ execute_process(
11
+ COMMAND xcrun --sdk macosx --show-sdk-path
12
+ OUTPUT_VARIABLE SDK_PATH
13
+ COMMAND_ERROR_IS_FATAL ANY
14
+ )
15
+ string(STRIP "${SDK_PATH}" CMAKE_OSX_SYSROOT)
16
+ endif()
17
+
8
18
  include(CheckIPOSupported)
9
19
 
10
20
  option(QDB_LINK_STATIC_LIB "Link qdb_api_static instead of dynamic qdb_api." OFF)
@@ -213,12 +223,6 @@ elseif (MSVC)
213
223
 
214
224
 
215
225
  )
216
- if(QDB_CPU_IS_X86)
217
- add_compile_options(
218
- # Enable AVX as we target Core2 and later
219
- /arch:AVX
220
- )
221
- endif()
222
226
  endif()
223
227
 
224
228
  ###
@@ -347,23 +351,29 @@ set(QDB_FILES
347
351
  numpy.cpp
348
352
  object_tracker.hpp
349
353
  options.hpp
354
+ properties.cpp
355
+ properties.hpp
350
356
  query.hpp
351
357
  query.cpp
358
+ reader.cpp
359
+ reader.hpp
352
360
  string.hpp
353
361
  table.cpp
354
362
  table.hpp
355
- table_reader.hpp
356
363
  tag.hpp
357
364
  timestamp.hpp
358
365
  traits.hpp
359
366
  utils.cpp
360
367
  utils.hpp
361
- writer.cpp
362
368
  writer.hpp
369
+ detail/invoke.hpp
370
+ detail/retry.hpp
371
+ detail/retry.cpp
372
+ detail/sleep.hpp
363
373
  detail/qdb_resource.hpp
364
374
  detail/ts_column.hpp
365
- reader/ts_row.hpp
366
- reader/ts_value.hpp
375
+ detail/writer.cpp
376
+ detail/writer.hpp
367
377
  utils/blob_deque.hpp
368
378
  utils/ostream.hpp
369
379
  utils/permutation.hpp
@@ -377,11 +387,18 @@ if(QDB_TESTS_ENABLED)
377
387
  ------------------------------------------------------------------ \
378
388
  [qdb-api-python] Tests enabled -- do not enable for release builds \
379
389
  ------------------------------------------------------------------ \ ")
380
- set(QDB_TEST_FILES
381
390
 
391
+ add_compile_definitions(QDB_TESTS_ENABLED)
392
+
393
+ set(QDB_TEST_FILES
382
394
  ../tests/conftest.cpp
383
395
  ../tests/conftest.hpp
384
- ../tests/test_convert.cpp)
396
+ ../tests/test_convert.cpp
397
+
398
+ ../tests/detail/mock_failure.hpp
399
+ ../tests/detail/mock_failure.cpp
400
+ ../tests/detail/sleep.hpp
401
+ )
385
402
  endif()
386
403
 
387
404
  # step 3: build
quasardb/Makefile CHANGED
@@ -1,5 +1,5 @@
1
1
  # CMAKE generated file: DO NOT EDIT!
2
- # Generated by "Unix Makefiles" Generator, CMake Version 3.24
2
+ # Generated by "Unix Makefiles" Generator, CMake Version 3.29
3
3
 
4
4
  # Default target executed when no arguments are given to make.
5
5
  default_target: all
@@ -60,14 +60,14 @@ EQUALS = =
60
60
  CMAKE_SOURCE_DIR = /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/quasardb
61
61
 
62
62
  # The top-level build directory on which CMake was run.
63
- CMAKE_BINARY_DIR = /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-12.0-x86_64-cpython-311
63
+ CMAKE_BINARY_DIR = /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-14.0-x86_64-cpython-311
64
64
 
65
65
  #=============================================================================
66
66
  # Targets provided globally by CMake.
67
67
 
68
68
  # Special rule for the target edit_cache
69
69
  edit_cache:
70
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
70
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..."
71
71
  /opt/local/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
72
72
  .PHONY : edit_cache
73
73
 
@@ -77,7 +77,7 @@ edit_cache/fast: edit_cache
77
77
 
78
78
  # Special rule for the target rebuild_cache
79
79
  rebuild_cache:
80
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
80
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..."
81
81
  /opt/local/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
82
82
  .PHONY : rebuild_cache
83
83
 
@@ -87,7 +87,7 @@ rebuild_cache/fast: rebuild_cache
87
87
 
88
88
  # Special rule for the target list_install_components
89
89
  list_install_components:
90
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
90
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\""
91
91
  .PHONY : list_install_components
92
92
 
93
93
  # Special rule for the target list_install_components
@@ -96,50 +96,50 @@ list_install_components/fast: list_install_components
96
96
 
97
97
  # Special rule for the target install
98
98
  install: preinstall
99
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
99
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
100
100
  /opt/local/bin/cmake -P cmake_install.cmake
101
101
  .PHONY : install
102
102
 
103
103
  # Special rule for the target install
104
104
  install/fast: preinstall/fast
105
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
105
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
106
106
  /opt/local/bin/cmake -P cmake_install.cmake
107
107
  .PHONY : install/fast
108
108
 
109
109
  # Special rule for the target install/local
110
110
  install/local: preinstall
111
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
111
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
112
112
  /opt/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
113
113
  .PHONY : install/local
114
114
 
115
115
  # Special rule for the target install/local
116
116
  install/local/fast: preinstall/fast
117
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
117
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
118
118
  /opt/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
119
119
  .PHONY : install/local/fast
120
120
 
121
121
  # Special rule for the target install/strip
122
122
  install/strip: preinstall
123
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
123
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
124
124
  /opt/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
125
125
  .PHONY : install/strip
126
126
 
127
127
  # Special rule for the target install/strip
128
128
  install/strip/fast: preinstall/fast
129
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
129
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
130
130
  /opt/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
131
131
  .PHONY : install/strip/fast
132
132
 
133
133
  # The main all target
134
134
  all: cmake_check_build_system
135
- cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-12.0-x86_64-cpython-311 && $(CMAKE_COMMAND) -E cmake_progress_start /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-12.0-x86_64-cpython-311/CMakeFiles /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-12.0-x86_64-cpython-311/quasardb//CMakeFiles/progress.marks
136
- cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-12.0-x86_64-cpython-311 && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-12.0-x86_64-cpython-311/quasardb/all
137
- $(CMAKE_COMMAND) -E cmake_progress_start /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-12.0-x86_64-cpython-311/CMakeFiles 0
135
+ cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-14.0-x86_64-cpython-311 && $(CMAKE_COMMAND) -E cmake_progress_start /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-14.0-x86_64-cpython-311/CMakeFiles /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-x86_64-cpython-311/quasardb//CMakeFiles/progress.marks
136
+ cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-14.0-x86_64-cpython-311 && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-x86_64-cpython-311/quasardb/all
137
+ $(CMAKE_COMMAND) -E cmake_progress_start /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-14.0-x86_64-cpython-311/CMakeFiles 0
138
138
  .PHONY : all
139
139
 
140
140
  # The main clean target
141
141
  clean:
142
- cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-12.0-x86_64-cpython-311 && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-12.0-x86_64-cpython-311/quasardb/clean
142
+ cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-14.0-x86_64-cpython-311 && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-x86_64-cpython-311/quasardb/clean
143
143
  .PHONY : clean
144
144
 
145
145
  # The main clean target
@@ -148,17 +148,17 @@ clean/fast: clean
148
148
 
149
149
  # Prepare targets for installation.
150
150
  preinstall: all
151
- cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-12.0-x86_64-cpython-311 && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-12.0-x86_64-cpython-311/quasardb/preinstall
151
+ cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-14.0-x86_64-cpython-311 && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-x86_64-cpython-311/quasardb/preinstall
152
152
  .PHONY : preinstall
153
153
 
154
154
  # Prepare targets for installation.
155
155
  preinstall/fast:
156
- cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-12.0-x86_64-cpython-311 && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-12.0-x86_64-cpython-311/quasardb/preinstall
156
+ cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-14.0-x86_64-cpython-311 && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-x86_64-cpython-311/quasardb/preinstall
157
157
  .PHONY : preinstall/fast
158
158
 
159
159
  # clear depends
160
160
  depend:
161
- cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-12.0-x86_64-cpython-311 && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
161
+ cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-14.0-x86_64-cpython-311 && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
162
162
  .PHONY : depend
163
163
 
164
164
  # Help Target
@@ -184,6 +184,6 @@ help:
184
184
  # No rule that depends on this can have commands that come from listfiles
185
185
  # because they might be regenerated.
186
186
  cmake_check_build_system:
187
- cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-12.0-x86_64-cpython-311 && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
187
+ cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-14.0-x86_64-cpython-311 && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
188
188
  .PHONY : cmake_check_build_system
189
189
 
quasardb/__init__.py CHANGED
@@ -35,9 +35,19 @@
35
35
  .. moduleauthor: quasardb SAS. All rights reserved
36
36
  """
37
37
 
38
- def generic_error_msg(msg, e):
38
+ def generic_error_msg(msg, e = None):
39
39
  msg_str = "\n".join(msg)
40
- return """
40
+
41
+ if e is None:
42
+ return """
43
+ **************************************************************************
44
+
45
+ {}
46
+
47
+ **************************************************************************
48
+ """.format(msg_str, type(e), str(e))
49
+ else:
50
+ return """
41
51
  **************************************************************************
42
52
 
43
53
  {}
@@ -46,8 +56,8 @@ def generic_error_msg(msg, e):
46
56
 
47
57
  Original exception:
48
58
 
49
- Type: {}
50
- Message: {}
59
+ Type: {}
60
+ Message: {}
51
61
 
52
62
  **************************************************************************
53
63
  """.format(msg_str, type(e), str(e))
@@ -79,9 +89,23 @@ def glibc_error_msg(e):
79
89
 
80
90
  return generic_error_msg(msg, e)
81
91
 
92
+ def unknown_error_msg():
93
+ msg = [
94
+ "Unable to import quasardb module: unknown error. ",
95
+ "",
96
+ "This may have several causes, including, but not limited to: ",
97
+ " - a link error, ",
98
+ " - architecture mismatch, ",
99
+ " - the current working directory already contains a 'quasardb' subdirectory.",
100
+ "",
101
+ "If you believe this to be a bug, please reach out to QuasarDB at",
102
+ "support@quasar.ai"]
103
+
104
+ return generic_error_msg(msg)
82
105
  try:
83
106
  from quasardb.quasardb import *
84
107
  except BaseException as e:
108
+ print(e)
85
109
  if "undefined symbol" in str(e):
86
110
  print(link_error_msg(e))
87
111
  raise e
@@ -90,5 +114,10 @@ except BaseException as e:
90
114
  else:
91
115
  from quasardb import *
92
116
 
117
+ if not 'quasardb' in locals():
118
+ print(unknown_error_msg())
119
+ raise ImportError()
120
+
121
+
93
122
  from .extensions import extend_module
94
123
  extend_module(quasardb)
quasardb/cluster.cpp CHANGED
@@ -13,7 +13,8 @@ cluster::cluster(const std::string & uri,
13
13
  const std::string & user_security_file,
14
14
  const std::string & cluster_public_key_file,
15
15
  std::chrono::milliseconds timeout,
16
- bool do_version_check)
16
+ bool do_version_check,
17
+ std::size_t client_max_parallelism)
17
18
  : _uri{uri}
18
19
  , _handle{make_handle_ptr()}
19
20
  , _json_loads{pybind11::module::import("json").attr("loads")}
@@ -31,6 +32,11 @@ cluster::cluster(const std::string & uri,
31
32
 
32
33
  options().set_timeout(timeout);
33
34
 
35
+ if (client_max_parallelism != 0)
36
+ {
37
+ options().set_client_max_parallelism(client_max_parallelism);
38
+ }
39
+
34
40
  // HACKS(leon): we need to ensure there is always one callback active
35
41
  // for qdb. Callbacks can be lost when the last active session
36
42
  // gets closed. As such, the most pragmatic place to 'check'
quasardb/cluster.hpp CHANGED
@@ -41,10 +41,11 @@
41
41
  #include "node.hpp"
42
42
  #include "options.hpp"
43
43
  #include "perf.hpp"
44
+ #include "properties.hpp"
44
45
  #include "query.hpp"
46
+ #include "reader.hpp"
45
47
  #include "string.hpp"
46
48
  #include "table.hpp"
47
- #include "table_reader.hpp"
48
49
  #include "tag.hpp"
49
50
  #include "timestamp.hpp"
50
51
  #include "utils.hpp"
@@ -72,7 +73,8 @@ public:
72
73
  const std::string & user_security_file = {},
73
74
  const std::string & cluster_public_key_file = {},
74
75
  std::chrono::milliseconds timeout = std::chrono::minutes{1},
75
- bool do_version_check = false);
76
+ bool do_version_check = false,
77
+ std::size_t client_max_parallelism = 0);
76
78
 
77
79
  public:
78
80
  void close();
@@ -239,6 +241,18 @@ public:
239
241
  return qdb::table{_handle, alias};
240
242
  }
241
243
 
244
+ // the reader_ptr is non-copyable
245
+ qdb::reader_ptr reader( //
246
+ std::vector<std::string> const & table_names, //
247
+ std::vector<std::string> const & column_names, //
248
+ std::size_t batch_size, //
249
+ std::vector<py::tuple> const & ranges) //
250
+ {
251
+ check_open();
252
+
253
+ return std::make_unique<qdb::reader>(_handle, table_names, column_names, batch_size, ranges);
254
+ }
255
+
242
256
  // the batch_inserter_ptr is non-copyable
243
257
  qdb::batch_inserter_ptr inserter(const std::vector<batch_column_info> & ci)
244
258
  {
@@ -270,6 +284,13 @@ public:
270
284
  return qdb::options{_handle};
271
285
  }
272
286
 
287
+ qdb::properties properties()
288
+ {
289
+ check_open();
290
+
291
+ return qdb::properties{_handle};
292
+ }
293
+
273
294
  qdb::perf perf()
274
295
  {
275
296
  check_open();
@@ -334,22 +355,30 @@ public:
334
355
  return py::cast(qdb::numpy_query(_handle, query_string));
335
356
  }
336
357
 
337
- std::shared_ptr<qdb::query_continuous> query_continuous_full(
338
- const std::string & query_string, std::chrono::milliseconds pace, const py::object & blobs)
358
+ std::shared_ptr<qdb::query_continuous> query_continuous(qdb_query_continuous_mode_type_t mode,
359
+ const std::string & query_string,
360
+ std::chrono::milliseconds pace,
361
+ const py::object & blobs)
339
362
  {
340
363
  check_open();
341
364
 
342
- return std::make_shared<qdb::query_continuous>(
343
- _handle, qdb_query_continuous_full, pace, query_string, blobs);
365
+ auto o = std::make_shared<qdb::query_continuous>(_handle, blobs);
366
+
367
+ o->run(mode, pace, query_string);
368
+
369
+ return o;
344
370
  }
345
371
 
346
- std::shared_ptr<qdb::query_continuous> query_continuous_new_values(
372
+ std::shared_ptr<qdb::query_continuous> query_continuous_full(
347
373
  const std::string & query_string, std::chrono::milliseconds pace, const py::object & blobs)
348
374
  {
349
- check_open();
375
+ return query_continuous(qdb_query_continuous_full, query_string, pace, blobs);
376
+ }
350
377
 
351
- return std::make_shared<qdb::query_continuous>(
352
- _handle, qdb_query_continuous_new_values_only, pace, query_string, blobs);
378
+ std::shared_ptr<qdb::query_continuous> query_continuous_new_values(
379
+ const std::string & query_string, std::chrono::milliseconds pace, const py::object & blobs)
380
+ {
381
+ return query_continuous(qdb_query_continuous_new_values_only, query_string, pace, blobs);
353
382
  }
354
383
 
355
384
  public:
@@ -484,68 +513,78 @@ static inline void register_cluster(Module & m)
484
513
 
485
514
  py::class_<qdb::cluster>(m, "Cluster",
486
515
  "Represents a connection to the QuasarDB cluster. ") //
487
- .def(
488
- py::init<const std::string &, const std::string &, const std::string &, const std::string &,
489
- const std::string &, const std::string &, std::chrono::milliseconds, bool>(), //
490
- py::arg("uri"), //
491
- py::arg("user_name") = std::string{}, //
492
- py::arg("user_private_key") = std::string{}, //
493
- py::arg("cluster_public_key") = std::string{}, //
494
- py::arg("user_security_file") = std::string{}, //
495
- py::arg("cluster_public_key_file") = std::string{}, //
496
- py::arg("timeout") = std::chrono::minutes{1}, //
497
- py::arg("do_version_check") = false) //
498
- .def("__enter__", &qdb::cluster::enter) //
499
- .def("__exit__", &qdb::cluster::exit) //
500
- .def("tidy_memory", &qdb::cluster::tidy_memory) //
501
- .def("get_memory_info", &qdb::cluster::get_memory_info) //
502
- .def("is_open", &qdb::cluster::is_open) //
503
- .def("uri", &qdb::cluster::uri) //
504
- .def("node", &qdb::cluster::node) //
505
- .def("options", &qdb::cluster::options) //
506
- .def("perf", &qdb::cluster::perf) //
507
- .def("node_status", &qdb::cluster::node_status) //
508
- .def("node_config", &qdb::cluster::node_config) //
509
- .def("node_topology", &qdb::cluster::node_topology) //
510
- .def("tag", &qdb::cluster::tag) //
511
- .def("blob", &qdb::cluster::blob) //
512
- .def("string", &qdb::cluster::string) //
513
- .def("integer", &qdb::cluster::integer) //
514
- .def("double", &qdb::cluster::double_) //
515
- .def("timestamp", &qdb::cluster::timestamp) //
516
- .def("ts", &qdb::cluster::table) //
517
- .def("table", &qdb::cluster::table) //
518
- .def("ts_batch", &qdb::cluster::inserter) //
519
- .def("inserter", &qdb::cluster::inserter) //
520
- .def("pinned_writer", &qdb::cluster::pinned_writer) //
521
- .def("writer", &qdb::cluster::writer) //
522
- .def("find", &qdb::cluster::find) //
523
- .def("query", &qdb::cluster::query, //
524
- py::arg("query"), //
525
- py::arg("blobs") = false) //
526
- .def("query_numpy", &qdb::cluster::query_numpy, //
527
- py::arg("query")) //
528
- .def("query_continuous_full", &qdb::cluster::query_continuous_full, //
529
- py::arg("query"), //
530
- py::arg("pace"), //
531
- py::arg("blobs") = false) //
532
- .def("query_continuous_new_values", &qdb::cluster::query_continuous_new_values, //
533
- py::arg("query"), //
534
- py::arg("pace"), //
535
- py::arg("blobs") = false) //
536
- .def("prefix_get", &qdb::cluster::prefix_get) //
537
- .def("prefix_count", &qdb::cluster::prefix_count) //
538
- .def("suffix_get", &qdb::cluster::suffix_get) //
539
- .def("suffix_count", &qdb::cluster::suffix_count) //
540
- .def("close", &qdb::cluster::close) //
541
- .def("purge_all", &qdb::cluster::purge_all) //
542
- .def("trim_all", &qdb::cluster::trim_all) //
543
- .def("purge_cache", &qdb::cluster::purge_cache) //
544
- .def("compact_full", &qdb::cluster::compact_full) //
545
- .def("compact_progress", &qdb::cluster::compact_progress) //
546
- .def("compact_abort", &qdb::cluster::compact_abort) //
547
- .def("wait_for_compaction", &qdb::cluster::wait_for_compaction) //
548
- .def("endpoints", &qdb::cluster::endpoints); //
516
+ .def(py::init<const std::string &, const std::string &, const std::string &,
517
+ const std::string &, const std::string &, const std::string &,
518
+ std::chrono::milliseconds, bool, std::size_t>(), //
519
+ py::arg("uri"), //
520
+ py::arg("user_name") = std::string{}, //
521
+ py::arg("user_private_key") = std::string{}, //
522
+ py::arg("cluster_public_key") = std::string{}, //
523
+ py::arg("user_security_file") = std::string{}, //
524
+ py::arg("cluster_public_key_file") = std::string{}, //
525
+ py::arg("timeout") = std::chrono::minutes{1}, //
526
+ py::arg("do_version_check") = false, //
527
+ py::arg("client_max_parallelism") = std::size_t{0} //
528
+ ) //
529
+ .def("__enter__", &qdb::cluster::enter) //
530
+ .def("__exit__", &qdb::cluster::exit) //
531
+ .def("tidy_memory", &qdb::cluster::tidy_memory) //
532
+ .def("get_memory_info", &qdb::cluster::get_memory_info) //
533
+ .def("is_open", &qdb::cluster::is_open) //
534
+ .def("uri", &qdb::cluster::uri) //
535
+ .def("node", &qdb::cluster::node) //
536
+ .def("options", &qdb::cluster::options) //
537
+ .def("properties", &qdb::cluster::properties) //
538
+ .def("perf", &qdb::cluster::perf) //
539
+ .def("node_status", &qdb::cluster::node_status) //
540
+ .def("node_config", &qdb::cluster::node_config) //
541
+ .def("node_topology", &qdb::cluster::node_topology) //
542
+ .def("tag", &qdb::cluster::tag) //
543
+ .def("blob", &qdb::cluster::blob) //
544
+ .def("string", &qdb::cluster::string) //
545
+ .def("integer", &qdb::cluster::integer) //
546
+ .def("double", &qdb::cluster::double_) //
547
+ .def("timestamp", &qdb::cluster::timestamp) //
548
+ .def("ts", &qdb::cluster::table) //
549
+ .def("table", &qdb::cluster::table) //
550
+ .def("ts_batch", &qdb::cluster::inserter) //
551
+ .def("inserter", &qdb::cluster::inserter) //
552
+ .def("reader", &qdb::cluster::reader, //
553
+ py::arg("table_names"), //
554
+ py::kw_only(), //
555
+ py::arg("column_names") = std::vector<std::string>{}, //
556
+ py::arg("batch_size") = std::size_t{0}, //
557
+ py::arg("ranges") = std::vector<py::tuple>{} //
558
+ ) //
559
+ .def("pinned_writer", &qdb::cluster::pinned_writer) //
560
+ .def("writer", &qdb::cluster::writer) //
561
+ .def("find", &qdb::cluster::find) //
562
+ .def("query", &qdb::cluster::query, //
563
+ py::arg("query"), //
564
+ py::arg("blobs") = false) //
565
+ .def("query_numpy", &qdb::cluster::query_numpy, //
566
+ py::arg("query")) //
567
+ .def("query_continuous_full", &qdb::cluster::query_continuous_full, //
568
+ py::arg("query"), //
569
+ py::arg("pace"), //
570
+ py::arg("blobs") = false) //
571
+ .def("query_continuous_new_values", &qdb::cluster::query_continuous_new_values, //
572
+ py::arg("query"), //
573
+ py::arg("pace"), //
574
+ py::arg("blobs") = false) //
575
+ .def("prefix_get", &qdb::cluster::prefix_get) //
576
+ .def("prefix_count", &qdb::cluster::prefix_count) //
577
+ .def("suffix_get", &qdb::cluster::suffix_get) //
578
+ .def("suffix_count", &qdb::cluster::suffix_count) //
579
+ .def("close", &qdb::cluster::close) //
580
+ .def("purge_all", &qdb::cluster::purge_all) //
581
+ .def("trim_all", &qdb::cluster::trim_all) //
582
+ .def("purge_cache", &qdb::cluster::purge_cache) //
583
+ .def("compact_full", &qdb::cluster::compact_full) //
584
+ .def("compact_progress", &qdb::cluster::compact_progress) //
585
+ .def("compact_abort", &qdb::cluster::compact_abort) //
586
+ .def("wait_for_compaction", &qdb::cluster::wait_for_compaction) //
587
+ .def("endpoints", &qdb::cluster::endpoints); //
549
588
  }
550
589
 
551
590
  } // namespace qdb
@@ -39,9 +39,9 @@ endif()
39
39
 
40
40
  if(NOT CMAKE_INSTALL_LOCAL_ONLY)
41
41
  # Include the install script for each subdirectory.
42
- include("/Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-12.0-x86_64-cpython-311/quasardb/date/cmake_install.cmake")
43
- include("/Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-12.0-x86_64-cpython-311/quasardb/pybind11/cmake_install.cmake")
44
- include("/Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-12.0-x86_64-cpython-311/quasardb/range-v3/cmake_install.cmake")
42
+ include("/Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-x86_64-cpython-311/quasardb/date/cmake_install.cmake")
43
+ include("/Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-x86_64-cpython-311/quasardb/pybind11/cmake_install.cmake")
44
+ include("/Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-x86_64-cpython-311/quasardb/range-v3/cmake_install.cmake")
45
45
 
46
46
  endif()
47
47