mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-23 00:39:20 +08:00
Rustfmt
This commit is contained in:
parent
4dbfdc85fe
commit
611c8e8b02
@ -68,8 +68,8 @@ pub struct Blob<'conn> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Connection {
|
impl Connection {
|
||||||
/// `feature = "blob"` Open a handle to the BLOB located in `row_id`, `column`,
|
/// `feature = "blob"` Open a handle to the BLOB located in `row_id`,
|
||||||
/// `table` in database `db`.
|
/// `column`, `table` in database `db`.
|
||||||
///
|
///
|
||||||
/// # Failure
|
/// # Failure
|
||||||
///
|
///
|
||||||
|
@ -19,8 +19,8 @@ use crate::{errmsg_to_string, str_to_cstring, Connection, DatabaseName, Result};
|
|||||||
|
|
||||||
// https://sqlite.org/session.html
|
// https://sqlite.org/session.html
|
||||||
|
|
||||||
/// `feature = "session"` An instance of this object is a session that can be used to record changes
|
/// `feature = "session"` An instance of this object is a session that can be
|
||||||
/// to a database.
|
/// used to record changes to a database.
|
||||||
pub struct Session<'conn> {
|
pub struct Session<'conn> {
|
||||||
phantom: PhantomData<&'conn ()>,
|
phantom: PhantomData<&'conn ()>,
|
||||||
s: *mut ffi::sqlite3_session,
|
s: *mut ffi::sqlite3_session,
|
||||||
@ -377,8 +377,8 @@ impl Drop for ChangesetIter<'_> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `feature = "session"` An item passed to a conflict-handler by `Connection::apply`,
|
/// `feature = "session"` An item passed to a conflict-handler by
|
||||||
/// or an item generated by `ChangesetIter::next`.
|
/// `Connection::apply`, or an item generated by `ChangesetIter::next`.
|
||||||
// TODO enum ? Delete, Insert, Update, ...
|
// TODO enum ? Delete, Insert, Update, ...
|
||||||
pub struct ChangesetItem {
|
pub struct ChangesetItem {
|
||||||
it: *mut ffi::sqlite3_changeset_iter,
|
it: *mut ffi::sqlite3_changeset_iter,
|
||||||
|
@ -757,8 +757,9 @@ impl Statement<'_> {
|
|||||||
ffi::SQLITE_TEXT => {
|
ffi::SQLITE_TEXT => {
|
||||||
let s = unsafe {
|
let s = unsafe {
|
||||||
// Quoting from "Using SQLite" book:
|
// Quoting from "Using SQLite" book:
|
||||||
// To avoid problems, an application should first extract the desired type using a sqlite3_column_xxx() function,
|
// To avoid problems, an application should first extract the desired type using
|
||||||
// and then call the appropriate sqlite3_column_bytes() function.
|
// a sqlite3_column_xxx() function, and then call the
|
||||||
|
// appropriate sqlite3_column_bytes() function.
|
||||||
let text = ffi::sqlite3_column_text(raw, col as c_int);
|
let text = ffi::sqlite3_column_text(raw, col as c_int);
|
||||||
let len = ffi::sqlite3_column_bytes(raw, col as c_int);
|
let len = ffi::sqlite3_column_bytes(raw, col as c_int);
|
||||||
assert!(
|
assert!(
|
||||||
|
@ -396,7 +396,8 @@ impl IndexConstraint<'_> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `feature = "vtab"` Information about what parameters to pass to `VTabCursor.filter`.
|
/// `feature = "vtab"` Information about what parameters to pass to
|
||||||
|
/// `VTabCursor.filter`.
|
||||||
pub struct IndexConstraintUsage<'a>(&'a mut ffi::sqlite3_index_constraint_usage);
|
pub struct IndexConstraintUsage<'a>(&'a mut ffi::sqlite3_index_constraint_usage);
|
||||||
|
|
||||||
impl IndexConstraintUsage<'_> {
|
impl IndexConstraintUsage<'_> {
|
||||||
@ -477,7 +478,8 @@ pub trait VTabCursor: Sized {
|
|||||||
fn rowid(&self) -> Result<i64>;
|
fn rowid(&self) -> Result<i64>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `feature = "vtab"` Context is used by `VTabCursor.column` to specify the cell value.
|
/// `feature = "vtab"` Context is used by `VTabCursor.column` to specify the
|
||||||
|
/// cell value.
|
||||||
pub struct Context(*mut ffi::sqlite3_context);
|
pub struct Context(*mut ffi::sqlite3_context);
|
||||||
|
|
||||||
impl Context {
|
impl Context {
|
||||||
|
Loading…
Reference in New Issue
Block a user