mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-30 06:01:36 +08:00
Manual fixes for rustfmt overly long lines.
This commit is contained in:
parent
71aa41c27a
commit
c4417bee0e
@ -235,7 +235,10 @@ impl<'conn> Drop for Blob<'conn> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// BLOB of length N that is filled with zeroes.
|
/// BLOB of length N that is filled with zeroes.
|
||||||
/// Zeroblobs are intended to serve as placeholders for BLOBs whose content is later written using incremental BLOB I/O routines.
|
///
|
||||||
|
/// Zeroblobs are intended to serve as placeholders for BLOBs whose content is later written using
|
||||||
|
/// incremental BLOB I/O routines.
|
||||||
|
///
|
||||||
/// A negative value for the zeroblob results in a zero-length BLOB.
|
/// A negative value for the zeroblob results in a zero-length BLOB.
|
||||||
#[derive(Copy,Clone)]
|
#[derive(Copy,Clone)]
|
||||||
pub struct ZeroBlob(pub i32);
|
pub struct ZeroBlob(pub i32);
|
||||||
|
@ -111,7 +111,8 @@ impl<'a> ToResult for &'a str {
|
|||||||
length as c_int,
|
length as c_int,
|
||||||
ffi::SQLITE_TRANSIENT())
|
ffi::SQLITE_TRANSIENT())
|
||||||
}
|
}
|
||||||
Err(_) => ffi::sqlite3_result_error_code(ctx, ffi::SQLITE_MISUSE), // TODO sqlite3_result_error
|
// TODO sqlite3_result_error
|
||||||
|
Err(_) => ffi::sqlite3_result_error_code(ctx, ffi::SQLITE_MISUSE),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -710,7 +711,8 @@ mod test {
|
|||||||
|
|
||||||
assert_eq!(true, result.unwrap());
|
assert_eq!(true, result.unwrap());
|
||||||
|
|
||||||
let result: Result<i64> = db.query_row("SELECT COUNT(*) FROM foo WHERE regexp('l.s[aeiouy]', x) == 1",
|
let result: Result<i64> =
|
||||||
|
db.query_row("SELECT COUNT(*) FROM foo WHERE regexp('l.s[aeiouy]', x) == 1",
|
||||||
&[],
|
&[],
|
||||||
|r| r.get(0));
|
|r| r.get(0));
|
||||||
|
|
||||||
@ -760,7 +762,8 @@ mod test {
|
|||||||
|
|
||||||
assert_eq!(true, result.unwrap());
|
assert_eq!(true, result.unwrap());
|
||||||
|
|
||||||
let result: Result<i64> = db.query_row("SELECT COUNT(*) FROM foo WHERE regexp('l.s[aeiouy]', x) == 1",
|
let result: Result<i64> =
|
||||||
|
db.query_row("SELECT COUNT(*) FROM foo WHERE regexp('l.s[aeiouy]', x) == 1",
|
||||||
&[],
|
&[],
|
||||||
|r| r.get(0));
|
|r| r.get(0));
|
||||||
|
|
||||||
|
@ -319,7 +319,9 @@ impl Connection {
|
|||||||
/// ```rust,no_run
|
/// ```rust,no_run
|
||||||
/// # use rusqlite::{Result,Connection};
|
/// # use rusqlite::{Result,Connection};
|
||||||
/// fn preferred_locale(conn: &Connection) -> Result<String> {
|
/// fn preferred_locale(conn: &Connection) -> Result<String> {
|
||||||
/// conn.query_row_and_then("SELECT value FROM preferences WHERE name='locale'", &[], |row| {
|
/// conn.query_row_and_then("SELECT value FROM preferences WHERE name='locale'",
|
||||||
|
/// &[],
|
||||||
|
/// |row| {
|
||||||
/// row.get_checked(0)
|
/// row.get_checked(0)
|
||||||
/// })
|
/// })
|
||||||
/// }
|
/// }
|
||||||
@ -709,9 +711,12 @@ impl<'conn> Statement<'conn> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the column index in the result set for a given column name.
|
/// Returns the column index in the result set for a given column name.
|
||||||
/// If there is no AS clause then the name of the column is unspecified and may change from one release of SQLite to the next.
|
///
|
||||||
|
/// If there is no AS clause then the name of the column is unspecified and may change from one
|
||||||
|
/// release of SQLite to the next.
|
||||||
///
|
///
|
||||||
/// # Failure
|
/// # Failure
|
||||||
|
///
|
||||||
/// Will return an `Error::InvalidColumnName` when there is no column with the specified `name`.
|
/// Will return an `Error::InvalidColumnName` when there is no column with the specified `name`.
|
||||||
pub fn column_index(&self, name: &str) -> Result<i32> {
|
pub fn column_index(&self, name: &str) -> Result<i32> {
|
||||||
let bytes = name.as_bytes();
|
let bytes = name.as_bytes();
|
||||||
|
@ -59,7 +59,8 @@ pub fn log(err_code: c_int, msg: &str) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Connection {
|
impl Connection {
|
||||||
/// Register or clear a callback function that can be used for tracing the execution of SQL statements.
|
/// Register or clear a callback function that can be used for tracing the execution of SQL
|
||||||
|
/// statements.
|
||||||
///
|
///
|
||||||
/// Prepared statement placeholders are replaced/logged with their assigned values.
|
/// Prepared statement placeholders are replaced/logged with their assigned values.
|
||||||
/// There can only be a single tracer defined for each database connection.
|
/// There can only be a single tracer defined for each database connection.
|
||||||
@ -83,7 +84,8 @@ impl Connection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Register or clear a callback function that can be used for profiling the execution of SQL statements.
|
/// Register or clear a callback function that can be used for profiling the execution of SQL
|
||||||
|
/// statements.
|
||||||
///
|
///
|
||||||
/// There can only be a single profiler defined for each database connection.
|
/// There can only be a single profiler defined for each database connection.
|
||||||
/// Setting a new profiler clears the old one.
|
/// Setting a new profiler clears the old one.
|
||||||
|
Loading…
Reference in New Issue
Block a user