mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-04-25 00:32:14 +00:00
Move the columns method of Cursor
This commit is contained in:
parent
3119f63fec
commit
47e36dc392
@ -20,6 +20,12 @@ impl<'l> Cursor<'l> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Return the number of columns.
|
||||||
|
#[inline]
|
||||||
|
pub fn columns(&self) -> usize {
|
||||||
|
self.statement.columns()
|
||||||
|
}
|
||||||
|
|
||||||
/// Advance to the next row and read all columns.
|
/// Advance to the next row and read all columns.
|
||||||
pub fn next(&mut self) -> Result<Option<&[Value]>> {
|
pub fn next(&mut self) -> Result<Option<&[Value]>> {
|
||||||
match self.state {
|
match self.state {
|
||||||
@ -65,12 +71,6 @@ impl<'l> Cursor<'l> {
|
|||||||
Ok(Some(self.values.as_ref().unwrap()))
|
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.
|
/// Return the raw pointer.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn as_raw(&self) -> *mut ffi::sqlite3_stmt {
|
pub fn as_raw(&self) -> *mut ffi::sqlite3_stmt {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user