mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-26 11:31:37 +08:00
Remove obsolete doc section
`FromSql` / `ToSql` are now implemented for i64 and usize
This commit is contained in:
parent
32ee895b63
commit
3aeb5d7e08
@ -76,16 +76,6 @@ impl Error for FromSqlError {
|
|||||||
pub type FromSqlResult<T> = Result<T, FromSqlError>;
|
pub type FromSqlResult<T> = Result<T, FromSqlError>;
|
||||||
|
|
||||||
/// A trait for types that can be created from a SQLite value.
|
/// A trait for types that can be created from a SQLite value.
|
||||||
///
|
|
||||||
/// Note that `FromSql` and `ToSql` are defined for most integral types, but
|
|
||||||
/// not `u64` or `usize`. This is intentional; SQLite returns integers as
|
|
||||||
/// signed 64-bit values, which cannot fully represent the range of these
|
|
||||||
/// types. Rusqlite would have to
|
|
||||||
/// decide how to handle negative values: return an error or reinterpret as a
|
|
||||||
/// very large postive numbers, neither of which
|
|
||||||
/// is guaranteed to be correct for everyone. Callers can work around this by
|
|
||||||
/// fetching values as i64 and then doing the interpretation themselves or by
|
|
||||||
/// defining a newtype and implementing `FromSql`/`ToSql` for it.
|
|
||||||
pub trait FromSql: Sized {
|
pub trait FromSql: Sized {
|
||||||
/// Converts SQLite value into Rust value.
|
/// Converts SQLite value into Rust value.
|
||||||
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>;
|
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>;
|
||||||
|
Loading…
Reference in New Issue
Block a user