mirror of
https://github.com/isar/rusqlite.git
synced 2025-01-19 22:10:50 +08:00
Fix CSVTab::next method.
This commit is contained in:
parent
ed5637f513
commit
3fbeccdf55
@ -146,12 +146,19 @@ impl VTabCursor<CSVTab> for CSVTabCursor {
|
|||||||
self.next()
|
self.next()
|
||||||
}
|
}
|
||||||
fn next(&mut self) -> Result<()> {
|
fn next(&mut self) -> Result<()> {
|
||||||
|
{
|
||||||
let vtab = self.vtab();
|
let vtab = self.vtab();
|
||||||
if vtab.reader.done() {
|
if vtab.reader.done() {
|
||||||
return Err(Error::ModuleError(format!("eof")));
|
return Err(Error::ModuleError(format!("eof")));
|
||||||
}
|
}
|
||||||
unimplemented!();
|
|
||||||
// self.row_number = self.row_number + 1;
|
vtab.cols.clear();
|
||||||
|
while let Some(col) = vtab.reader.next_str().into_iter_result() {
|
||||||
|
vtab.cols.push(String::from(try!(col)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
self.row_number = self.row_number + 1;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
fn eof(&self) -> bool {
|
fn eof(&self) -> bool {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user