mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-04-11 10:36:04 +00:00
Require not start if nothing to bind
This commit is contained in:
parent
26626fdeeb
commit
b2e735b627
@ -26,8 +26,13 @@ impl<'l> Iterator<'l> {
|
|||||||
/// Read the next row.
|
/// Read the next row.
|
||||||
pub fn next(&mut self) -> Result<Option<&[Value]>> {
|
pub fn next(&mut self) -> Result<Option<&[Value]>> {
|
||||||
match self.state {
|
match self.state {
|
||||||
Some(State::Row) => {},
|
Some(State::Done) => return Ok(None),
|
||||||
_ => return Ok(None),
|
None => {
|
||||||
|
try!(self.statement.reset());
|
||||||
|
self.state = Some(try!(self.statement.step()));
|
||||||
|
return self.next();
|
||||||
|
},
|
||||||
|
_ => {},
|
||||||
}
|
}
|
||||||
let values = match self.values.take() {
|
let values = match self.values.take() {
|
||||||
Some(mut values) => {
|
Some(mut values) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user