Merge pull request #178 from gwenn/varparam-usage

Fix issue #177
This commit is contained in:
John Gallagher 2016-12-30 23:38:50 -05:00 committed by GitHub
commit d1ad61dc41
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ fn main() {
data: None data: None
}; };
conn.execute("INSERT INTO person (name, time_created, data) conn.execute("INSERT INTO person (name, time_created, data)
VALUES ($1, $2, $3)", VALUES (?1, ?2, ?3)",
&[&me.name, &me.time_created, &me.data]).unwrap(); &[&me.name, &me.time_created, &me.data]).unwrap();
let mut stmt = conn.prepare("SELECT id, name, time_created, data FROM person").unwrap(); let mut stmt = conn.prepare("SELECT id, name, time_created, data FROM person").unwrap();

View File

@ -32,7 +32,7 @@
//! data: None //! data: None
//! }; //! };
//! conn.execute("INSERT INTO person (name, time_created, data) //! conn.execute("INSERT INTO person (name, time_created, data)
//! VALUES ($1, $2, $3)", //! VALUES (?1, ?2, ?3)",
//! &[&me.name, &me.time_created, &me.data]).unwrap(); //! &[&me.name, &me.time_created, &me.data]).unwrap();
//! //!
//! let mut stmt = conn.prepare("SELECT id, name, time_created, data FROM person").unwrap(); //! let mut stmt = conn.prepare("SELECT id, name, time_created, data FROM person").unwrap();