use sqlite::{Connection, OpenFlags}; pub fn init() -> sqlite::Result<()> { let conn = Connection::open_with_flags( "./data/data.db", OpenFlags::new() .with_create() .with_read_write() )?; conn.execute( "CREATE TABLE IF NOT EXISTS articles ( id INTEGER PRIMARY KEY, title TEXT NOT NULL, subTitle TEXT, content TEXT NOT NULL )", )?; Ok(()) }