#![cfg(feature = "with-rusqlite")] #![allow(unused)] mod support; pub type Result = core::result::Result; pub type Error = Box; // For early dev. use modql::field::Fields; use modql::{SqliteFromValue, SqliteToValue}; use rusqlite::Connection; /// Simple enum with From/To SqliteValue #[derive(SqliteFromValue, SqliteToValue)] pub enum DItemKind { Md, Pdf, Unknown, } /// Simple tuple struct with From/To SqliteValue #[derive(SqliteFromValue, SqliteToValue)] pub struct SimpleId(i64); #[derive(Debug, Clone, Fields)] pub struct Agent { pub id: i64, pub name: Option, pub level: Option, pub module_id: Option, } #[test] fn test_rust_sqlite_derives() -> Result<()> { // -- Setup & Fixtures let kind = DItemKind::Md; let sid = SimpleId(123); // For now just making sure it compiles above. // Later can do the exec in sqlite and check Ok(()) }