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/firehose.py CHANGED
@@ -6,15 +6,14 @@ import numpy as np
6
6
  FIREHOSE_TABLE = "$qdb.firehose"
7
7
  POLL_INTERVAL = 0.1
8
8
 
9
- logger = logging.getLogger('quasardb.firehose')
9
+ logger = logging.getLogger("quasardb.firehose")
10
10
 
11
11
 
12
12
  def _init():
13
13
  """
14
14
  Initialize our internal state.
15
15
  """
16
- return {'last': None,
17
- 'seen': set()}
16
+ return {"last": None, "seen": set()}
18
17
 
19
18
 
20
19
  def _get_transactions_since(conn, table_name, last):
@@ -24,10 +23,12 @@ def _get_transactions_since(conn, table_name, last):
24
23
  """
25
24
  if last is None:
26
25
  q = "SELECT $timestamp, transaction_id, begin, end FROM \"{}\" WHERE table = '{}' ORDER BY $timestamp".format(
27
- FIREHOSE_TABLE, table_name)
26
+ FIREHOSE_TABLE, table_name
27
+ )
28
28
  else:
29
29
  q = "SELECT $timestamp, transaction_id, begin, end FROM \"{}\" IN RANGE ({}, +1y) WHERE table = '{}' ORDER BY $timestamp".format(
30
- FIREHOSE_TABLE, last['$timestamp'], table_name)
30
+ FIREHOSE_TABLE, last["$timestamp"], table_name
31
+ )
31
32
 
32
33
  return conn.query(q)
33
34
 
@@ -36,8 +37,7 @@ def _get_transaction_data(conn, table_name, begin, end):
36
37
  """
37
38
  Gets all data from a certain table.
38
39
  """
39
- q = "SELECT * FROM \"{}\" IN RANGE ({}, {}) ".format(
40
- table_name, begin, end)
40
+ q = 'SELECT * FROM "{}" IN RANGE ({}, {}) '.format(table_name, begin, end)
41
41
  return conn.query(q)
42
42
 
43
43
 
@@ -50,33 +50,35 @@ def _get_next(conn, table_name, state):
50
50
  # 3. For each of the transactions, pull in all data
51
51
  # 4. Concatenate all this data (in order of quasardb transaction)
52
52
 
53
- txs = _get_transactions_since(conn, table_name, state['last'])
53
+ txs = _get_transactions_since(conn, table_name, state["last"])
54
54
 
55
55
  xs = list()
56
56
  for tx in txs:
57
- txid = tx['transaction_id']
57
+ txid = tx["transaction_id"]
58
58
 
59
- if state['last'] is not None and tx['$timestamp'] > state['last']['$timestamp']:
59
+ if state["last"] is not None and tx["$timestamp"] > state["last"]["$timestamp"]:
60
60
  # At this point we are guaranteed that the transaction we encounter is
61
61
  # 'new', will not conflict with any other transaction ids. It is thus
62
62
  # safe to reset the txid set.
63
- state['seen'] = set()
64
-
65
- if txid not in state['seen']:
66
- xs = xs + _get_transaction_data(conn,
67
- table_name,
68
- tx['begin'],
69
- # The firehose logs transaction `end` span as
70
- # end inclusive, while our bulk reader and/or query
71
- # language are end exclusive.
72
- tx['end'] + np.timedelta64(1, 'ns'))
63
+ state["seen"] = set()
64
+
65
+ if txid not in state["seen"]:
66
+ xs = xs + _get_transaction_data(
67
+ conn,
68
+ table_name,
69
+ tx["begin"],
70
+ # The firehose logs transaction `end` span as
71
+ # end inclusive, while our bulk reader and/or query
72
+ # language are end exclusive.
73
+ tx["end"] + np.timedelta64(1, "ns"),
74
+ )
73
75
 
74
76
  # Because it is possible that multiple firehose changes are stored with the
75
77
  # exact same $timestamp, we also keep track of the actually seen
76
78
  # transaction ids.
77
- state['seen'].add(txid)
79
+ state["seen"].add(txid)
78
80
 
79
- state['last'] = tx
81
+ state["last"] = tx
80
82
 
81
83
  return (state, xs)
82
84