Move the columns method of Cursor

This commit is contained in:
Ivan Ukhov 2017-08-24 10:25:34 +02:00
parent 3119f63fec
commit 47e36dc392

View File

@ -20,6 +20,12 @@ impl<'l> Cursor<'l> {
Ok(())
}
/// Return the number of columns.
#[inline]
pub fn columns(&self) -> usize {
self.statement.columns()
}
/// Advance to the next row and read all columns.
pub fn next(&mut self) -> Result<Option<&[Value]>> {
match self.state {
@ -65,12 +71,6 @@ impl<'l> Cursor<'l> {
Ok(Some(self.values.as_ref().unwrap()))
}
/// Return the number of columns.
#[inline]
pub fn columns(&self) -> usize {
self.statement.columns()
}
/// Return the raw pointer.
#[inline]
pub fn as_raw(&self) -> *mut ffi::sqlite3_stmt {