lbug 0.12.3-dev.3 → 0.12.3-dev.5
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.
- package/lbug-source/CMakeLists.txt +1 -1
- package/lbug-source/src/include/storage/storage_version_info.h +1 -7
- package/lbug-source/src/main/query_result/materialized_query_result.cpp +2 -2
- package/lbug-source/test/api/api_test.cpp +18 -0
- package/package.json +1 -1
- package/prebuilt/lbugjs-darwin-arm64.node +0 -0
- package/prebuilt/lbugjs-linux-arm64.node +0 -0
- package/prebuilt/lbugjs-linux-x64.node +0 -0
- package/prebuilt/lbugjs-win32-x64.node +0 -0
|
@@ -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.
|
|
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 (
|
|
83
|
-
|
|
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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|