mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-04-21 23:22:14 +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.
|
/// Execute a query and process the resulting rows if any.
|
||||||
///
|
///
|
||||||
/// The callback is triggered for each row. If the callback returns `false`,
|
/// 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]
|
#[inline]
|
||||||
pub fn process<F>(&self, sql: &str, callback: F) -> Result<()>
|
pub fn process<F>(&self, sql: &str, callback: F) -> Result<()>
|
||||||
where F: FnMut(&[(&str, Option<&str>)]) -> bool
|
where F: FnMut(&[(&str, Option<&str>)]) -> bool
|
||||||
|
@ -52,7 +52,10 @@ impl<'l> Statement<'l> {
|
|||||||
Value::read(self, i)
|
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> {
|
pub fn step(&mut self) -> Result<State> {
|
||||||
match unsafe { ffi::sqlite3_step(self.raw.0) } {
|
match unsafe { ffi::sqlite3_step(self.raw.0) } {
|
||||||
ffi::SQLITE_DONE => Ok(State::Done),
|
ffi::SQLITE_DONE => Ok(State::Done),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user