use super::stats::ExportStats;
use crate::error::Result;
use dm_database_parser_sqllog::Sqllog;
pub trait Exporter {
fn initialize(&mut self) -> Result<()>;
fn export(&mut self, sqllog: &Sqllog) -> Result<()>;
fn export_one_normalized(&mut self, sqllog: &Sqllog, normalized: Option<&str>) -> Result<()> {
let _ = normalized;
self.export(sqllog)
}
fn export_one_preparsed(
&mut self,
sqllog: &Sqllog,
include_pm: bool,
normalized: Option<&str>,
) -> Result<()> {
let _ = include_pm;
self.export_one_normalized(sqllog, normalized)
}
fn finalize(&mut self) -> Result<()>;
fn stats_snapshot(&self) -> Option<ExportStats> {
None
}
}