rusqlite/
twizzler.rs

1#![cfg(target_os = "twizzler")]
2use crate::vtab::{update_module, update_module_with_tx};
3use crate::Connection;
4
5mod value;
6mod rowstore;
7
8mod transient_vtab;
9use transient_vtab::{TwzVTab as TransientVTab};
10
11mod persistent_vtab;
12use persistent_vtab::{TwzVTab as PersistentVTab};
13
14impl Connection {
15    /// Sets up the Twizzler virtual table module for this connection.
16        pub fn setup_twz_vtab(&self) {
17            let module = update_module::<TransientVTab>();
18            self.create_module("twz_transient_vtab", module, None)
19                .expect("Failed to create twz_transient_vtab module");
20
21            let module = update_module_with_tx::<PersistentVTab>();
22            self.create_module("twz_persistent_vtab", module, None)
23                .expect("Failed to create twz_persistent_vtab module");
24        }
25}
26