pub struct SqliteConfig {
pub unsafe_load_extensions: Vec<String>,
}_unstable-docs only.Expand description
Configuration for the SQLite database driver.
Fieldsยง
ยงunsafe_load_extensions: Vec<String>Specify extensions to load, either by name or by path.
Paths should be relative to the workspace root.
See Loading an Extension in the SQLite manual for details.
The sqlite-load-extension feature must be enabled and SQLite must be built
without SQLITE_OMIT_LOAD_EXTENSION enabled.
ยงNote: Does Not Configure Runtime Extension Loading
Extensions to be loaded at runtime must be separately configured with
SqliteConnectOptions::extension() or SqliteConnectOptions::extension_with_entrypoint().
ยงSafety
This causes arbitrary DLLs on the filesystem to be loaded at execution time, which can easily result in undefined behavior, memory corruption, or exploitable vulnerabilities if misused.
It is not possible to provide a truly safe version of this API.
Use this field with care, and only load extensions that you trust.
ยงExample
Load the uuid and vsv extensions from sqlean.
sqlx.toml:
[common.drivers.sqlite]
unsafe-load-extensions = ["uuid", "vsv"]Trait Implementationsยง
Sourceยงimpl Debug for SqliteConfig
impl Debug for SqliteConfig
Sourceยงimpl Default for SqliteConfig
impl Default for SqliteConfig
Sourceยงfn default() -> SqliteConfig
fn default() -> SqliteConfig
Auto Trait Implementationsยง
impl Freeze for SqliteConfig
impl RefUnwindSafe for SqliteConfig
impl Send for SqliteConfig
impl Sync for SqliteConfig
impl Unpin for SqliteConfig
impl UnwindSafe for SqliteConfig
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
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> โ
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> โ
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