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.