Untitled
unknown
plain_text
5 months ago
349 B
11
Indexable
fn select_first<'a>() -> &'a str { let connection = sqlite::open("contacts").unwrap(); let mut record= ""; let query = "SELECT * FROM contacts WHERE id = 1;"; connection .iterate(query, |pairs| { for &(name,value) in pairs.iter() { record = value.unwrap(); } true }).unwrap(); record }
Editor is loading...
Leave a Comment