pub struct NativeReader { /* private fields */ }Expand description
原生 SQLite 读取器
Implementations§
Source§impl NativeReader
impl NativeReader
pub fn new(path: impl Into<String>) -> Self
Sourcepub async fn get_schemas(&self) -> Result<Vec<TableSchema>, DsError>
pub async fn get_schemas(&self) -> Result<Vec<TableSchema>, DsError>
获取数据库中所有表的 Schema
Sourcepub async fn scan_table_by_name(
&self,
table_name: &str,
) -> Result<Vec<Row>, DsError>
pub async fn scan_table_by_name( &self, table_name: &str, ) -> Result<Vec<Row>, DsError>
根据表名执行全表扫描
Sourcepub async fn verify_header(&self) -> Result<(), DsError>
pub async fn verify_header(&self) -> Result<(), DsError>
验证文件头
Sourcepub async fn clear_cache(&self)
pub async fn clear_cache(&self)
清除页面缓存
Sourcepub async fn get_header(&self) -> Result<SqliteHeader, DsError>
pub async fn get_header(&self) -> Result<SqliteHeader, DsError>
获取 SQLite 文件头信息
Auto Trait Implementations§
impl !Freeze for NativeReader
impl !RefUnwindSafe for NativeReader
impl Send for NativeReader
impl Sync for NativeReader
impl Unpin for NativeReader
impl !UnwindSafe for NativeReader
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