lbug 0.12.3-dev.3 → 0.12.3-dev.4

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.
@@ -1,6 +1,6 @@
1
1
  cmake_minimum_required(VERSION 3.15)
2
2
 
3
- project(Lbug VERSION 0.12.3.3 LANGUAGES CXX C)
3
+ project(Lbug VERSION 0.12.3.4 LANGUAGES CXX C)
4
4
 
5
5
  option(SINGLE_THREADED "Single-threaded mode" FALSE)
6
6
  if(SINGLE_THREADED)
@@ -13,13 +13,7 @@ using storage_version_t = uint64_t;
13
13
 
14
14
  struct StorageVersionInfo {
15
15
  static std::unordered_map<std::string, storage_version_t> getStorageVersionInfo() {
16
- return {{"0.11.1", 39}, {"0.11.0", 39}, {"0.10.0", 38}, {"0.9.0", 37}, {"0.8.0", 36},
17
- {"0.7.1.1", 35}, {"0.7.0", 34}, {"0.6.0.6", 33}, {"0.6.0.5", 32}, {"0.6.0.2", 31},
18
- {"0.6.0.1", 31}, {"0.6.0", 28}, {"0.5.0", 28}, {"0.4.2", 27}, {"0.4.1", 27},
19
- {"0.4.0", 27}, {"0.3.2", 26}, {"0.3.1", 26}, {"0.3.0", 26}, {"0.2.1", 25},
20
- {"0.2.0", 25}, {"0.1.0", 24}, {"0.0.12.3", 24}, {"0.0.12.2", 24}, {"0.0.12.1", 24},
21
- {"0.0.12", 23}, {"0.0.11", 23}, {"0.0.10", 23}, {"0.0.9", 23}, {"0.0.8", 17},
22
- {"0.0.7", 15}, {"0.0.6", 9}, {"0.0.5", 8}, {"0.0.4", 7}, {"0.0.3", 1}};
16
+ return {{"0.12.0", 40}, {"0.12.2", 40}};
23
17
  }
24
18
 
25
19
  static LBUG_API storage_version_t getStorageVersion();
@@ -79,8 +79,8 @@ std::string MaterializedQueryResult::toString() const {
79
79
  result += "\n";
80
80
  auto tuple_ = FlatTuple(this->columnTypes);
81
81
  auto iterator_ = FactorizedTableIterator(*table);
82
- while (iterator->hasNext()) {
83
- iterator->getNext(tuple_);
82
+ while (iterator_.hasNext()) {
83
+ iterator_.getNext(tuple_);
84
84
  result += tuple_.toString();
85
85
  }
86
86
  return result;
@@ -488,6 +488,24 @@ TEST_F(ApiTest, CloseDatabaseBeforeQueryResultWithMultipleStatements) {
488
488
  inMemoryDatabase.reset();
489
489
  }
490
490
 
491
+ TEST_F(ApiTest, ToStringDoesNotModifyIterator) {
492
+ auto result = conn->query("MATCH (p:person) RETURN p.ID ORDER BY p.ID");
493
+ ASSERT_TRUE(result->isSuccess());
494
+ ASSERT_TRUE(result->hasNext()); // Iterator should be at the beginning
495
+ auto str = result->toString(); // This should not modify the iterator
496
+ ASSERT_TRUE(result->hasNext()); // Iterator should still be at the beginning
497
+ // Now iterate through the results
498
+ std::vector<int64_t> ids;
499
+ while (result->hasNext()) {
500
+ auto tuple = result->getNext();
501
+ ids.push_back(tuple->getValue(0)->getValue<int64_t>());
502
+ }
503
+ ASSERT_EQ(ids.size(), 8u); // Assuming 8 persons in the test data
504
+ ASSERT_EQ(ids[0], 0);
505
+ ASSERT_EQ(ids[1], 2);
506
+ // etc., but just check the count for now
507
+ }
508
+
491
509
  TEST_F(ApiTest, EmptyDBFile) {
492
510
  if (inMemMode) {
493
511
  GTEST_SKIP();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lbug",
3
- "version": "0.12.3-dev.3",
3
+ "version": "0.12.3-dev.4",
4
4
  "description": "An in-process property graph database management system built for query speed and scalability.",
5
5
  "main": "index.js",
6
6
  "module": "./index.mjs",
Binary file
Binary file
Binary file
Binary file