quasardb 3.14.2.dev1__cp311-cp311-macosx_11_0_arm64.whl → 3.14.2.dev2__cp311-cp311-macosx_11_0_arm64.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 (57) hide show
  1. quasardb/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  2. quasardb/CMakeLists.txt +19 -12
  3. quasardb/Makefile +10 -10
  4. quasardb/__init__.py +33 -4
  5. quasardb/cluster.cpp +7 -1
  6. quasardb/cluster.hpp +111 -72
  7. quasardb/concepts.hpp +56 -12
  8. quasardb/continuous.cpp +84 -34
  9. quasardb/continuous.hpp +10 -7
  10. quasardb/convert/array.hpp +23 -6
  11. quasardb/convert/value.hpp +78 -7
  12. quasardb/date/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  13. quasardb/date/CMakeFiles/Export/a52b05f964b070ee926bcad51d3288af/dateTargets.cmake +12 -12
  14. quasardb/date/Makefile +10 -10
  15. quasardb/date/dateConfigVersion.cmake +9 -2
  16. quasardb/date/dateTargets.cmake +3 -7
  17. quasardb/detail/invoke.hpp +0 -0
  18. quasardb/detail/retry.cpp +30 -0
  19. quasardb/detail/retry.hpp +147 -0
  20. quasardb/detail/sleep.hpp +53 -0
  21. quasardb/{writer.cpp → detail/writer.cpp} +68 -162
  22. quasardb/detail/writer.hpp +550 -0
  23. quasardb/error.hpp +76 -1
  24. quasardb/libqdb_api.dylib +0 -0
  25. quasardb/masked_array.hpp +9 -2
  26. quasardb/module.cpp +20 -4
  27. quasardb/numpy/__init__.py +58 -10
  28. quasardb/object_tracker.hpp +2 -3
  29. quasardb/options.hpp +32 -3
  30. quasardb/pandas/__init__.py +59 -102
  31. quasardb/properties.cpp +41 -0
  32. quasardb/properties.hpp +85 -0
  33. quasardb/pybind11/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  34. quasardb/pybind11/Makefile +10 -10
  35. quasardb/quasardb.cpython-311-darwin.so +0 -0
  36. quasardb/range-v3/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  37. quasardb/range-v3/CMakeFiles/Export/d94ef200eca10a819b5858b33e808f5b/range-v3-targets.cmake +12 -12
  38. quasardb/range-v3/CMakeFiles/range.v3.headers.dir/DependInfo.cmake +6 -2
  39. quasardb/range-v3/CMakeFiles/range.v3.headers.dir/build.make +2 -2
  40. quasardb/range-v3/Makefile +10 -10
  41. quasardb/range-v3/cmake_install.cmake +12 -0
  42. quasardb/range-v3/range-v3-config-version.cmake +9 -2
  43. quasardb/range-v3/range-v3-config.cmake +3 -7
  44. quasardb/reader.cpp +282 -0
  45. quasardb/reader.hpp +256 -0
  46. quasardb/table.cpp +4 -36
  47. quasardb/table.hpp +69 -28
  48. quasardb/traits.hpp +23 -0
  49. quasardb/writer.hpp +245 -287
  50. {quasardb-3.14.2.dev1.dist-info → quasardb-3.14.2.dev2.dist-info}/METADATA +7 -7
  51. {quasardb-3.14.2.dev1.dist-info → quasardb-3.14.2.dev2.dist-info}/RECORD +54 -48
  52. {quasardb-3.14.2.dev1.dist-info → quasardb-3.14.2.dev2.dist-info}/WHEEL +1 -1
  53. quasardb/reader/ts_row.hpp +0 -281
  54. quasardb/reader/ts_value.hpp +0 -245
  55. quasardb/table_reader.hpp +0 -220
  56. {quasardb-3.14.2.dev1.dist-info → quasardb-3.14.2.dev2.dist-info}/LICENSE.md +0 -0
  57. {quasardb-3.14.2.dev1.dist-info → quasardb-3.14.2.dev2.dist-info}/top_level.txt +0 -0
@@ -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
@@ -67,7 +67,7 @@ CMAKE_BINARY_DIR = /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.m
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,37 +96,37 @@ 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
 
Binary file
@@ -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
  # Relative path conversion top directories.
5
5
  set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/Users/teamcity/buildAgent/work/938b0bdf6727d1ad/thirdparty")
@@ -3,11 +3,11 @@
3
3
  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
4
4
  message(FATAL_ERROR "CMake >= 2.8.0 required")
5
5
  endif()
6
- if(CMAKE_VERSION VERSION_LESS "2.8.3")
7
- message(FATAL_ERROR "CMake >= 2.8.3 required")
6
+ if(CMAKE_VERSION VERSION_LESS "3.0.0")
7
+ message(FATAL_ERROR "CMake >= 3.0.0 required")
8
8
  endif()
9
9
  cmake_policy(PUSH)
10
- cmake_policy(VERSION 2.8.3...3.22)
10
+ cmake_policy(VERSION 3.0.0...3.27)
11
11
  #----------------------------------------------------------------
12
12
  # Generated CMake target import file.
13
13
  #----------------------------------------------------------------
@@ -84,10 +84,6 @@ set_target_properties(range-v3 PROPERTIES
84
84
  INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
85
85
  )
86
86
 
87
- if(CMAKE_VERSION VERSION_LESS 3.0.0)
88
- message(FATAL_ERROR "This file relies on consumers using CMake 3.0.0 or greater.")
89
- endif()
90
-
91
87
  # Load information for each installed configuration.
92
88
  file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/range-v3-targets-*.cmake")
93
89
  foreach(_cmake_config_file IN LISTS _cmake_config_files)
@@ -101,9 +97,12 @@ set(_IMPORT_PREFIX)
101
97
 
102
98
  # Loop over all imported files and verify that they actually exist
103
99
  foreach(_cmake_target IN LISTS _cmake_import_check_targets)
104
- foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
105
- if(NOT EXISTS "${_cmake_file}")
106
- message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
100
+ if(CMAKE_VERSION VERSION_LESS "3.28"
101
+ OR NOT DEFINED _cmake_import_check_xcframework_for_${_cmake_target}
102
+ OR NOT IS_DIRECTORY "${_cmake_import_check_xcframework_for_${_cmake_target}}")
103
+ foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
104
+ if(NOT EXISTS "${_cmake_file}")
105
+ message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
107
106
  \"${_cmake_file}\"
108
107
  but this file does not exist. Possible reasons include:
109
108
  * The file was deleted, renamed, or moved to another location.
@@ -112,8 +111,9 @@ but this file does not exist. Possible reasons include:
112
111
  \"${CMAKE_CURRENT_LIST_FILE}\"
113
112
  but not all the files it references.
114
113
  ")
115
- endif()
116
- endforeach()
114
+ endif()
115
+ endforeach()
116
+ endif()
117
117
  unset(_cmake_file)
118
118
  unset("_cmake_import_check_files_for_${_cmake_target}")
119
119
  endforeach()
@@ -10,8 +10,12 @@ set(CMAKE_DEPENDS_LANGUAGES
10
10
  set(CMAKE_DEPENDS_DEPENDENCY_FILES
11
11
  )
12
12
 
13
- # Targets to which this target links.
14
- set(CMAKE_TARGET_LINKED_INFO_FILES
13
+ # Targets to which this target links which contain Fortran sources.
14
+ set(CMAKE_Fortran_TARGET_LINKED_INFO_FILES
15
+ )
16
+
17
+ # Targets to which this target links which contain Fortran sources.
18
+ set(CMAKE_Fortran_TARGET_FORWARD_LINKED_INFO_FILES
15
19
  )
16
20
 
17
21
  # Fortran module output directory.
@@ -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
  # Delete rule output on recipe failure.
5
5
  .DELETE_ON_ERROR:
@@ -78,6 +78,6 @@ range.v3.headers: /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.mac
78
78
  .PHONY : /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-arm64-cpython-311/quasardb/range-v3/CMakeFiles/range.v3.headers.dir/clean
79
79
 
80
80
  /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-arm64-cpython-311/quasardb/range-v3/CMakeFiles/range.v3.headers.dir/depend:
81
- cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-14.0-arm64-cpython-311 && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/quasardb /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/thirdparty/range-v3 /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-14.0-arm64-cpython-311 /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-arm64-cpython-311/quasardb/range-v3 /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-arm64-cpython-311/quasardb/range-v3/CMakeFiles/range.v3.headers.dir/DependInfo.cmake --color=$(COLOR)
81
+ cd /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-14.0-arm64-cpython-311 && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/quasardb /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/thirdparty/range-v3 /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.macosx-14.0-arm64-cpython-311 /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-arm64-cpython-311/quasardb/range-v3 /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-arm64-cpython-311/quasardb/range-v3/CMakeFiles/range.v3.headers.dir/DependInfo.cmake "--color=$(COLOR)"
82
82
  .PHONY : /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-arm64-cpython-311/quasardb/range-v3/CMakeFiles/range.v3.headers.dir/depend
83
83
 
@@ -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
@@ -67,7 +67,7 @@ CMAKE_BINARY_DIR = /Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/temp.m
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,37 +96,37 @@ 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
 
@@ -37,6 +37,18 @@ if(NOT DEFINED CMAKE_OBJDUMP)
37
37
  set(CMAKE_OBJDUMP "/usr/local/clang16/bin/llvm-objdump")
38
38
  endif()
39
39
 
40
+ if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
41
+ include("/Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-arm64-cpython-311/quasardb/range-v3/CMakeFiles/range-v3-concepts.dir/install-cxx-module-bmi-Release.cmake" OPTIONAL)
42
+ endif()
43
+
44
+ if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
45
+ include("/Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-arm64-cpython-311/quasardb/range-v3/CMakeFiles/range-v3-meta.dir/install-cxx-module-bmi-Release.cmake" OPTIONAL)
46
+ endif()
47
+
48
+ if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
49
+ include("/Users/teamcity/buildAgent/work/938b0bdf6727d1ad/build/lib.macosx-14.0-arm64-cpython-311/quasardb/range-v3/CMakeFiles/range-v3.dir/install-cxx-module-bmi-Release.cmake" OPTIONAL)
50
+ endif()
51
+
40
52
  if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
41
53
  if(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/cmake/range-v3/range-v3-targets.cmake")
42
54
  file(DIFFERENT _cmake_export_file_changed FILES
@@ -70,7 +70,14 @@ if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
70
70
  endif()
71
71
 
72
72
 
73
- # if the installed project requested no architecture check, don't perform the check
74
- if("FALSE")
73
+ # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
74
+ if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "" STREQUAL "")
75
75
  return()
76
76
  endif()
77
+
78
+ # check that the installed version has the same 32/64bit-ness as the one which is currently searching:
79
+ if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "")
80
+ math(EXPR installedBits " * 8")
81
+ set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
82
+ set(PACKAGE_VERSION_UNSUITABLE TRUE)
83
+ endif()
@@ -3,11 +3,11 @@
3
3
  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
4
4
  message(FATAL_ERROR "CMake >= 2.8.0 required")
5
5
  endif()
6
- if(CMAKE_VERSION VERSION_LESS "2.8.3")
7
- message(FATAL_ERROR "CMake >= 2.8.3 required")
6
+ if(CMAKE_VERSION VERSION_LESS "3.0.0")
7
+ message(FATAL_ERROR "CMake >= 3.0.0 required")
8
8
  endif()
9
9
  cmake_policy(PUSH)
10
- cmake_policy(VERSION 2.8.3...3.22)
10
+ cmake_policy(VERSION 3.0.0...3.27)
11
11
  #----------------------------------------------------------------
12
12
  # Generated CMake target import file.
13
13
  #----------------------------------------------------------------
@@ -15,10 +15,6 @@ cmake_policy(VERSION 2.8.3...3.22)
15
15
  # Commands may need to know the format version.
16
16
  set(CMAKE_IMPORT_FILE_VERSION 1)
17
17
 
18
- if(CMAKE_VERSION VERSION_LESS 3.0.0)
19
- message(FATAL_ERROR "This file relies on consumers using CMake 3.0.0 or greater.")
20
- endif()
21
-
22
18
  # Protect against multiple inclusion, which would fail when already imported targets are added once more.
23
19
  set(_cmake_targets_defined "")
24
20
  set(_cmake_targets_not_defined "")
quasardb/reader.cpp ADDED
@@ -0,0 +1,282 @@
1
+ #include "reader.hpp"
2
+ #include "error.hpp"
3
+ #include "table.hpp"
4
+ #include "traits.hpp"
5
+ #include "convert/array.hpp"
6
+ #include "convert/value.hpp"
7
+ #include "detail/qdb_resource.hpp"
8
+ #include <range/v3/view/counted.hpp>
9
+
10
+ namespace qdb
11
+ {
12
+
13
+ namespace detail
14
+ {
15
+
16
+ /* static */ py::dict reader_data::convert(qdb_bulk_reader_table_data_t const & data)
17
+ {
18
+ py::dict ret{};
19
+
20
+ // typedef struct
21
+ // {
22
+ // qdb_size_t row_count;
23
+ // qdb_size_t column_count;
24
+ // const qdb_timespec_t * timestamps;
25
+ // const qdb_exp_batch_push_column_t * columns;
26
+ // } qdb_exp_batch_push_table_data_t;
27
+
28
+ // Convert the timestamp index, which should never contain null values
29
+ // and thus is *not* a masked array.
30
+ auto timestamps = ranges::views::counted(data.timestamps, data.row_count);
31
+ auto columns = ranges::views::counted(data.columns, data.column_count);
32
+
33
+ py::array idx = convert::array<qdb_timespec_t, traits::datetime64_ns_dtype>(timestamps);
34
+ qdb::masked_array idx_ = qdb::masked_array::masked_none(idx);
35
+
36
+ ret[py::str("$timestamp")] = idx;
37
+
38
+ for (qdb_exp_batch_push_column_t const & column : columns)
39
+ {
40
+ // typedef struct // NOLINT(modernize-use-using)
41
+ // {
42
+ // char const * name;
43
+ // qdb_ts_column_type_t data_type;
44
+ // union
45
+ // {
46
+ // const qdb_timespec_t * timestamps;
47
+ // const qdb_string_t * strings;
48
+ // const qdb_blob_t * blobs;
49
+ // const qdb_int_t * ints;
50
+ // const double * doubles;
51
+ // } data;
52
+ // } qdb_exp_batch_push_column_t;
53
+
54
+ py::str column_name{column.name};
55
+
56
+ qdb::masked_array xs;
57
+ switch (column.data_type)
58
+ {
59
+ case qdb_ts_column_int64:
60
+ xs = convert::masked_array<qdb_int_t, traits::int64_dtype>(
61
+ ranges::views::counted(column.data.ints, data.row_count));
62
+ break;
63
+ case qdb_ts_column_double:
64
+ xs = convert::masked_array<double, traits::float64_dtype>(
65
+ ranges::views::counted(column.data.doubles, data.row_count));
66
+ break;
67
+ case qdb_ts_column_string:
68
+ xs = convert::masked_array<qdb_string_t, traits::unicode_dtype>(
69
+ ranges::views::counted(column.data.strings, data.row_count));
70
+ break;
71
+ case qdb_ts_column_blob:
72
+ xs = convert::masked_array<qdb_blob_t, traits::pyobject_dtype>(
73
+ ranges::views::counted(column.data.blobs, data.row_count));
74
+ break;
75
+ case qdb_ts_column_timestamp:
76
+ xs = convert::masked_array<qdb_timespec_t, traits::datetime64_ns_dtype>(
77
+ ranges::views::counted(column.data.timestamps, data.row_count));
78
+ break;
79
+
80
+ case qdb_ts_column_symbol:
81
+ // This should not happen, as "symbol" is just an internal representation, and symbols
82
+ // are exposed to the user as strings. If this actually happens, it indicates either
83
+ // a bug in the bulk reader *or* a memory corruption.
84
+ throw qdb::not_implemented_exception(
85
+ "Internal error: invalid data type: symbol column type returned from bulk reader");
86
+
87
+ case qdb_ts_column_uninitialized:
88
+ throw qdb::not_implemented_exception(
89
+ "Internal error: invalid data type: unintialized column "
90
+ "type returned from bulk reader");
91
+ };
92
+
93
+ ret[std::move(column_name)] = std::move(xs.cast(py::return_value_policy::move));
94
+ }
95
+
96
+ return ret;
97
+ }
98
+
99
+ reader_iterator & reader_iterator::operator++()
100
+ {
101
+ if (ptr_ == nullptr)
102
+ {
103
+ // This means this is either the first invocation, or we have
104
+ // previously exhausted all tables in the current "fetch" and
105
+ // should fetch next.
106
+ qdb_error_t err = qdb_bulk_reader_get_data(reader_, &ptr_, batch_size_);
107
+
108
+ if (err == qdb_e_iterator_end) [[unlikely]]
109
+ {
110
+ // We have reached the end -- reset all our internal state, and make us look
111
+ // like the "end" iterator.
112
+ handle_ = nullptr;
113
+ reader_ = nullptr;
114
+ batch_size_ = 0;
115
+ table_count_ = 0;
116
+ ptr_ = nullptr;
117
+ n_ = 0;
118
+ }
119
+ else
120
+ {
121
+ qdb::qdb_throw_if_error(*handle_, err);
122
+
123
+ // I like assertions
124
+ assert(handle_ != nullptr);
125
+ assert(reader_ != nullptr);
126
+ assert(table_count_ != 0);
127
+ assert(ptr_ != nullptr);
128
+
129
+ n_ = 0;
130
+ }
131
+ }
132
+ else
133
+ {
134
+ assert(ptr_ != nullptr);
135
+
136
+ if (++n_ == table_count_)
137
+ {
138
+ // We have exhausted our tables. What we will do is just "reset" our internal state
139
+ // to how it would be after the initial constructor, and recurse into this function,
140
+ // which should then just follow the regular flow above
141
+ qdb_release(*handle_, ptr_);
142
+
143
+ ptr_ = nullptr;
144
+ n_ = 0;
145
+
146
+ return this->operator++();
147
+ }
148
+
149
+ // At this point, we *must* have a valid state
150
+ assert(ptr_ != nullptr);
151
+ assert(n_ < table_count_);
152
+
153
+ } // if (ptr_ == nullptr)
154
+ return *this;
155
+ };
156
+
157
+ }; // namespace detail
158
+
159
+ qdb::reader const & reader::enter()
160
+ {
161
+ // Very small scope, because we don't need any of the allocated memory after this function is
162
+ // finished, so we will also release memory early.
163
+ qdb::object_tracker::scoped_repository object_tracker{};
164
+ qdb::object_tracker::scoped_capture capture{object_tracker};
165
+
166
+ std::vector<qdb_bulk_reader_table_t> tables{};
167
+ tables.reserve(table_names_.size());
168
+
169
+ //
170
+ // Convert columns if applicable
171
+ //
172
+ char const ** columns{nullptr};
173
+
174
+ // If column names were provided, set them. Otherwise, it defaults to "all columns".
175
+ if (column_names_.empty() == false)
176
+ {
177
+
178
+ // Note that this particular converter copies the string and it's tracked
179
+ // using the object tracker.
180
+ //
181
+ // Pre-allocate the data for the columns, make sure that the memory is tracked,
182
+ // so we don't have to worry about memory loss.
183
+ columns = object_tracker::alloc<char const *>(column_names_.size() * sizeof(char const *));
184
+
185
+ for (std::size_t i = 0; i < column_names_.size(); ++i)
186
+ {
187
+ // Because the scope of `column_names_` outlives this function / scope, we don't have
188
+ // to copy the string, but can just directly use the .c_str() and things will work out.
189
+ columns[i] = column_names_.at(i).c_str();
190
+ }
191
+ }
192
+
193
+ qdb_ts_range_t * ranges{nullptr};
194
+
195
+ if (ranges_.empty() == false)
196
+ {
197
+ // Pre-allocate the data for the columns, make sure that the memory is tracked,
198
+ // so we don't have to worry about memory loss.
199
+ ranges = object_tracker::alloc<qdb_ts_range_t>(ranges_.size() * sizeof(qdb_ts_range_t));
200
+
201
+ for (std::size_t i = 0; i < ranges_.size(); ++i)
202
+ {
203
+ // This convert::value does not allocate anything on the heap
204
+ ranges[i] = convert::value<py::tuple, qdb_ts_range_t>(ranges_.at(i));
205
+ }
206
+ }
207
+
208
+ // We either have columns and have the actual array set, *or* we do not have any customized
209
+ // columns at all.
210
+ // Same applies for ranges
211
+ assert((columns == nullptr) == (column_names_.empty() == true));
212
+ assert((ranges == nullptr) == (ranges_.empty() == true));
213
+
214
+ for (std::string const & table_name : table_names_)
215
+ {
216
+ tables.emplace_back(qdb_bulk_reader_table_t{
217
+ // because the scope of `table_name` outlives this function, we can just directly
218
+ // use .c_str() without any copies.
219
+ table_name.c_str(), //
220
+ columns, //
221
+ column_names_.size(), //
222
+ ranges, //
223
+ ranges_.size() //
224
+ });
225
+ }
226
+
227
+ qdb::qdb_throw_if_error(
228
+ *handle_, qdb_bulk_reader_fetch(*handle_, tables.data(), tables.size(), &reader_));
229
+
230
+ return *this;
231
+ }
232
+
233
+ void reader::close()
234
+ {
235
+ // Even though that from the API it looks like value, qdb_reader_handle_t is actually a pointer
236
+ // itself that needs to be released. This static assert checks for that.
237
+ static_assert(std::is_pointer<decltype(reader_)>());
238
+
239
+ if (reader_ != nullptr)
240
+ {
241
+ logger_.debug("closing reader");
242
+ qdb_release(*handle_, reader_);
243
+ reader_ = nullptr;
244
+ }
245
+
246
+ assert(reader_ == nullptr);
247
+ }
248
+
249
+ void register_reader(py::module_ & m)
250
+ {
251
+ namespace py = pybind11;
252
+
253
+ auto reader_c = py::class_<qdb::reader>{m, "Reader"};
254
+
255
+ // basic interface
256
+ reader_c
257
+ .def(py::init< //
258
+ qdb::handle_ptr, //
259
+ std::vector<std::string> const &, //
260
+ std::vector<std::string> const &, //
261
+ std::size_t, //
262
+ std::vector<py::tuple> const &>(), //
263
+ py::arg("conn"), //
264
+ py::arg("table_names"), //
265
+ py::kw_only(), //
266
+ py::arg("column_names") = std::vector<std::string>{}, //
267
+ py::arg("batch_size") = std::size_t{0}, //
268
+ py::arg("ranges") = std::vector<py::tuple>{} //
269
+ ) //
270
+ //
271
+ .def("get_batch_size", &qdb::reader::get_batch_size) //
272
+ //
273
+ .def("__enter__", &qdb::reader::enter) //
274
+ .def("__exit__", &qdb::reader::exit) //
275
+ .def( //
276
+ "__iter__", [](qdb::reader & r) { return py::make_iterator(r.begin(), r.end()); }, //
277
+ py::keep_alive<0, 1>());
278
+
279
+ //
280
+ }
281
+
282
+ } // namespace qdb