sqlite3_ext/lib.rs
1#![cfg_attr(docsrs, feature(doc_cfg))]
2pub use connection::*;
3pub use extension::Extension;
4pub use globals::*;
5pub use iterator::*;
6pub use sqlite3_ext_macro::*;
7pub use transaction::*;
8pub use types::*;
9pub use value::*;
10
11mod connection;
12mod extension;
13pub mod ffi;
14pub mod function;
15mod globals;
16mod iterator;
17mod mutex;
18pub mod query;
19mod test_helpers;
20mod transaction;
21mod types;
22mod value;
23pub mod vtab;
24mod with_rusqlite;
25
26/// Indicate the risk level for a function or virtual table.
27///
28/// It is recommended that all functions and virtual table implementations set a risk level,
29/// but the default is [RiskLevel::Innocuous] if TRUSTED_SCHEMA=on and [RiskLevel::DirectOnly]
30/// otherwise.
31///
32/// See [this discussion](https://www.sqlite.org/src/doc/latest/doc/trusted-schema.md) for more
33/// details about the motivation and implications.
34#[derive(Debug, Eq, PartialEq, Copy, Clone)]
35pub enum RiskLevel {
36 /// An innocuous function or virtual table is one that can only read content from the
37 /// database file in which it resides, and can only alter the database in which it
38 /// resides.
39 Innocuous,
40 /// A direct-only function or virtual table has side-effects that go outside the
41 /// database file in which it lives, or return information from outside of the database
42 /// file.
43 DirectOnly,
44}