We are excited to announce the release of ReductStore Client SDK for C++ v1.3.0! This release includes support for the ReductStore API v1.3.0 with labels and content type.
Since ReductStore v1.3.0, you can attach labels to data when writing and querying. Labels are key-value pairs that can be used to classify and categorize data. For example, you might use labels to store metadata about a record, such as its md5 sum or class.
auto [bucket, err] = client->CreateBucket(kBucketName);
IBucket::Time ts = IBucket::Time() + std::chrono::microseconds(123109210);
std::string blob = "some blob of data";
bucket->Write("entry",
IBucket::WriteOptions{
.timestamp = ts,
.labels = IBucket::LableMap({"label1", "value3"}),
},
[&blob](auto rec) { rec->WriteAll(blob);
});
This labels can be used to filter the results of a query:
auto err = bucket->Query("entry", ts, ts + us(3),
IBucket::QueryOptions{.include = IBucket::LabelMap({"label1", "value1"})},
[&all_data](auto record) {
std::cout << record->ReadAll() << std::endl;
}
);
You can now specify the content type of the data you are writing to the ReductStore database. This could be useful for example when you are writing a file to the database and want to store the file extension as the content type or keep information about the image format.
bucket->Write("entry", I
Bucket::WriteOptions{
.content_type = "image/png",
},
[&blob](auto rec) { rec->WriteAll(image_as_blob); }
);
Read more about labels and content type in the ReductStore documentation.
I hope you find this release useful. If you have any questions or feedback, don’t hesitate to reach out in Discord or by opening a discussion on GitHub.
Thanks for using ReductStore!
#News #Sdks #TutorialsReductStore vs. MinIO & InfluxDB on LTE Network: Who Really Wins the Speed Race?
#Comparison #IotReductStore 1.6.0 has been released with new license and client SDK for Rust
#NewsHow to Choose the Right MQTT Data Storage for Your Next Project
#Advice #DatabaseReductStore v1.5.0 has been released
#NewsTutorials (15) Computer-vision (3) Sdks (11) News (19) Cli (5) Iot (3) Comparisons (1) Edge-computing (1) Advice (1) Database (1) Comparison (1)