pub trait CreateVTab<'vtab>: VTab<'vtab> {
const SHADOW_NAMES: &'static [&'static str] = _;
// Required methods
fn create(
db: &'vtab VTabConnection,
aux: &'vtab Self::Aux,
args: &[&str],
) -> Result<(String, Self)>;
fn destroy(self) -> DisconnectResult<Self>;
}Expand description
A non-eponymous virtual table that supports CREATE VIRTUAL TABLE.
Provided Associated Constants§
Sourceconst SHADOW_NAMES: &'static [&'static str] = _
const SHADOW_NAMES: &'static [&'static str] = _
List of shadow table names.
This can be set by a virtual table implementation to automatically implement the xShadowName method. For example, “data” appears in this slice, then SQLite will understand that “vtab_data” is a shadow table for a table named “vtab” created with this module.
Shadow tables are read-only if the database has SQLITE_DBCONFIG_DEFENSIVE set, and SQLite is version 3.26.0 or greater. For more information, see the SQLite documentation.
Required Methods§
Sourcefn create(
db: &'vtab VTabConnection,
aux: &'vtab Self::Aux,
args: &[&str],
) -> Result<(String, Self)>
fn create( db: &'vtab VTabConnection, aux: &'vtab Self::Aux, args: &[&str], ) -> Result<(String, Self)>
Corresponds to xCreate.
This method is invoked when a CREATE VIRTUAL TABLE statement is invoked on the module. Future connections to the created table will use VTab::connect instead.
This method has the same requirements as VTab::connect; see that method for more details.
Sourcefn destroy(self) -> DisconnectResult<Self>
fn destroy(self) -> DisconnectResult<Self>
Corresponds to xDestroy, when DROP TABLE is run on the virtual table. The virtual table implementation should destroy any underlying state that was created by Self::create.
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.