pub struct SqliteExporter { /* private fields */ }Expand description
SQLite 导出器 - 直接插入版本 (高性能)
Implementations§
Source§impl SqliteExporter
impl SqliteExporter
Sourcepub fn new(
database_url: String,
table_name: String,
overwrite: bool,
append: bool,
) -> Self
pub fn new( database_url: String, table_name: String, overwrite: bool, append: bool, ) -> Self
创建新的 SQLite 导出器
Sourcepub fn from_config(config: &SqliteExporter) -> Self
pub fn from_config(config: &SqliteExporter) -> Self
从配置创建 SQLite 导出器
Trait Implementations§
Source§impl Debug for SqliteExporter
impl Debug for SqliteExporter
Source§impl Drop for SqliteExporter
impl Drop for SqliteExporter
Source§impl Exporter for SqliteExporter
impl Exporter for SqliteExporter
Source§fn initialize(&mut self) -> Result<()>
fn initialize(&mut self) -> Result<()>
初始化导出器 (例如:创建文件、连接数据库、创建表等)
Source§fn export_batch(&mut self, sqllogs: &[&Sqllog<'_>]) -> Result<()>
fn export_batch(&mut self, sqllogs: &[&Sqllog<'_>]) -> Result<()>
批量导出多条日志记录 (默认实现:逐条调用 export)
Source§fn stats_snapshot(&self) -> Option<ExportStats>
fn stats_snapshot(&self) -> Option<ExportStats>
获取导出统计信息的快照
默认返回 None;具体导出器可覆盖此方法以提供统计信息
Auto Trait Implementations§
impl !Freeze for SqliteExporter
impl !RefUnwindSafe for SqliteExporter
impl Send for SqliteExporter
impl !Sync for SqliteExporter
impl Unpin for SqliteExporter
impl UnsafeUnpin for SqliteExporter
impl !UnwindSafe for SqliteExporter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more