VLink 2.0.0
A high-performance communication middleware
Loading...
Searching...
No Matches
database_writer.h File Reference

Concrete BagWriter implementation for the SQLite-backed VLink bag format. More...

#include <memory>
#include <string>
#include "./bag_writer.h"
Include dependency graph for database_writer.h:

Go to the source code of this file.

Classes

 Concrete SQLite-backed bag file recorder with transactional write caching. More...

Namespaces

Detailed Description

Concrete BagWriter implementation for the SQLite-backed VLink bag format.

DatabaseWriter records VLink messages to a SQLite .vdb file. It extends BagWriter with transactional write caching (WAL mode, batch commit), optional VACUUM optimisation on exit, and in-place schema embedding for Protobuf introspection.

Internally, messages are accumulated in a memory cache and committed in batches to reduce SQLite write overhead. Cache parameters are configurable via BagWriter::Config.

Usage
cfg.wal_mode = true;
auto writer = vlink::BagWriter::create("/data/recording.vdb", cfg);
// or explicitly:
auto writer = std::make_shared<vlink::DatabaseWriter>("/data/recording.vdb", cfg);
writer->async_run();
writer->push("dds://my/topic", "demo.proto.PointCloud", vlink::SchemaType::kProtobuf,
See also
BagWriter, McapWriter