mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-03-15 06:20:50 +00:00
Adjust the example
This commit is contained in:
parent
acf1211eb4
commit
0390d179d5
@ -22,7 +22,7 @@ connection.process("SELECT * FROM `users`;", |pairs| {
|
||||
}).unwrap();
|
||||
|
||||
let mut statement = connection.prepare("SELECT * FROM `users`;").unwrap();
|
||||
while statement.step().unwrap() == sqlite::State::Row {
|
||||
while let sqlite::State::Row = statement.step().unwrap() {
|
||||
println!("id = {}", statement.read::<i64>(0).unwrap());
|
||||
println!("name = {}", statement.read::<String>(1).unwrap());
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
//! }).unwrap();
|
||||
//!
|
||||
//! let mut statement = connection.prepare("SELECT * FROM `users`;").unwrap();
|
||||
//! while statement.step().unwrap() == sqlite::State::Row {
|
||||
//! while let sqlite::State::Row = statement.step().unwrap() {
|
||||
//! println!("id = {}", statement.read::<i64>(0).unwrap());
|
||||
//! println!("name = {}", statement.read::<String>(1).unwrap());
|
||||
//! }
|
||||
|
Loading…
x
Reference in New Issue
Block a user