Adjust the documentation

This commit is contained in:
Ivan Ukhov 2015-07-04 09:21:38 -04:00
parent d94275417a
commit 0572f80ed0
2 changed files with 6 additions and 2 deletions

View File

@ -41,7 +41,8 @@ impl<'l> Connection<'l> {
/// Execute a query and process the resulting rows if any.
///
/// The callback is triggered for each row. If the callback returns `false`,
/// no more rows will be processed.
/// no more rows will be processed. For large queries and non-string data
/// types, prepared statement are highly preferable; see `prepare`.
#[inline]
pub fn process<F>(&self, sql: &str, callback: F) -> Result<()>
where F: FnMut(&[(&str, Option<&str>)]) -> bool

View File

@ -52,7 +52,10 @@ impl<'l> Statement<'l> {
Value::read(self, i)
}
/// Evaluate the statement.
/// Evaluate the statement one step at a time.
///
/// The function should be called multiple times until `State::Done` is
/// reached in order to evaluate the statement entirely.
pub fn step(&mut self) -> Result<State> {
match unsafe { ffi::sqlite3_step(self.raw.0) } {
ffi::SQLITE_DONE => Ok(State::Done),