Skip to main content

DatabasePlugin

Trait DatabasePlugin 

Source
pub trait DatabasePlugin: Send + Sync {
    // Provided methods
    fn pre_commit(&self, _ws: &WriteSet, _source: CommitSource) -> Result<()> { ... }
    fn post_commit(&self, _ws: &WriteSet, _source: CommitSource) { ... }
    fn on_open(&self) -> Result<()> { ... }
    fn on_close(&self) -> Result<()> { ... }
    fn on_ddl(&self, _change: &DdlChange) -> Result<()> { ... }
    fn on_query(&self, _sql: &str) -> Result<()> { ... }
    fn post_query(
        &self,
        _sql: &str,
        _duration: Duration,
        _outcome: &QueryOutcome,
    ) { ... }
    fn health(&self) -> PluginHealth { ... }
    fn describe(&self) -> Value { ... }
    fn on_sync_push(&self, _changeset: &mut ChangeSet) -> Result<()> { ... }
    fn on_sync_pull(&self, _changeset: &mut ChangeSet) -> Result<()> { ... }
}
Expand description

Lifecycle hooks for the database engine.

Provided Methods§

Source

fn pre_commit(&self, _ws: &WriteSet, _source: CommitSource) -> Result<()>

Source

fn post_commit(&self, _ws: &WriteSet, _source: CommitSource)

Source

fn on_open(&self) -> Result<()>

Source

fn on_close(&self) -> Result<()>

Source

fn on_ddl(&self, _change: &DdlChange) -> Result<()>

Source

fn on_query(&self, _sql: &str) -> Result<()>

Source

fn post_query(&self, _sql: &str, _duration: Duration, _outcome: &QueryOutcome)

Source

fn health(&self) -> PluginHealth

Source

fn describe(&self) -> Value

Source

fn on_sync_push(&self, _changeset: &mut ChangeSet) -> Result<()>

Source

fn on_sync_pull(&self, _changeset: &mut ChangeSet) -> Result<()>

Implementors§