mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-03-15 06:20:50 +00:00
Adjust the documentation
This commit is contained in:
parent
d94275417a
commit
0572f80ed0
@ -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
|
||||
|
@ -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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user