Skip to main content

Sqlite3Metadata

Trait Sqlite3Metadata 

Source
pub unsafe trait Sqlite3Metadata: Sqlite3Api {
    // Required methods
    unsafe fn table_column_metadata(
        &self,
        db: NonNull<Self::Db>,
        db_name: Option<&str>,
        table: &str,
        column: &str,
    ) -> Result<ColumnMetadata>;
    unsafe fn column_decltype(
        &self,
        stmt: NonNull<Self::Stmt>,
        col: i32,
    ) -> Option<RawBytes>;
    unsafe fn column_name(
        &self,
        stmt: NonNull<Self::Stmt>,
        col: i32,
    ) -> Option<RawBytes>;
    unsafe fn column_table_name(
        &self,
        stmt: NonNull<Self::Stmt>,
        col: i32,
    ) -> Option<RawBytes>;
}
Expand description

Optional backend extension for metadata helpers.

§Safety

Implementations must ensure returned raw metadata pointers are valid for the documented SQLite lifetime and ownership rules.

Required Methods§

Source

unsafe fn table_column_metadata( &self, db: NonNull<Self::Db>, db_name: Option<&str>, table: &str, column: &str, ) -> Result<ColumnMetadata>

Query table/column metadata for the specified schema object.

Source

unsafe fn column_decltype( &self, stmt: NonNull<Self::Stmt>, col: i32, ) -> Option<RawBytes>

Return declared type text for output column col.

Source

unsafe fn column_name( &self, stmt: NonNull<Self::Stmt>, col: i32, ) -> Option<RawBytes>

Return output column name for col.

Source

unsafe fn column_table_name( &self, stmt: NonNull<Self::Stmt>, col: i32, ) -> Option<RawBytes>

Return source table name for output column col, when available.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§