MantisBase v0.4.9
Loading...
Searching...
No Matches
realtime.h File Reference

Realtime database change detection for SQLite and PostgreSQL. More...

#include <condition_variable>
#include <functional>
#include <memory>
#include <mutex>
#include <string>
#include <thread>
#include "mantisbase/mantis.h"
#include "nlohmann/json.hpp"
Include dependency graph for realtime.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  mb::MbRealtimeDB
class  mb::MbRtDbWorker

Namespaces

namespace  soci
namespace  mb

Typedefs

using mb::RtCallback = std::function<void(const json &)>

Detailed Description

Realtime database change detection for SQLite and PostgreSQL.

Provides live change notifications for entity tables so that SSE (Server-Sent Events) and other consumers can broadcast insert, update, and delete events. Supported backends:

  • SQLite: Polling-based change detection.
  • PostgreSQL: LISTEN/NOTIFY with triggers.

Used in conjunction with sse.h to power the /api/v1/realtime SSE endpoint.

See also
sse.h