Module database

Source
Expand description

§Database Module

This module provides an abstraction for listening to database changes across multiple database types. It supports PostgreSQL, MongoDB, MySQL, and SQLite through a unified interface.

§Supported Databases

  • PostgreSQL: Uses LISTEN/NOTIFY for real-time notifications.
  • MongoDB: Uses Change Streams to track document updates.
  • MySQL: Planned to support in future.
  • SQLite: Planned support in future.

Modules§

mongodb
MongoDB Document Listener
mysql
postgres
PostgreSQL Table Listener
sqlite

Structs§

DBListener
Core struct that manages database listeners.

Enums§

DBConfig
Configuration options for different database types.
EventType
Represents the type of database events that can be monitored.

Traits§

DBListenerTrait
Trait defining a generic database listener.