mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-26 03:11:36 +08:00
commit
31767cf776
@ -1,3 +1,4 @@
|
||||
#![feature(extern_crate_item_prelude)]
|
||||
#![feature(test)]
|
||||
extern crate test;
|
||||
|
||||
|
@ -147,7 +147,7 @@ pub mod vtab;
|
||||
// Number of cached prepared statements we'll hold on to.
|
||||
const STATEMENT_CACHE_DEFAULT_CAPACITY: usize = 16;
|
||||
/// To be used when your statement has no [parameter](https://sqlite.org/lang_expr.html#varparam).
|
||||
pub const NO_PARAMS: &'static [&'static ToSql] = &[];
|
||||
pub const NO_PARAMS: &[&ToSql] = &[];
|
||||
|
||||
/// Old name for `Result`. `SqliteResult` is deprecated.
|
||||
#[deprecated(since = "0.6.0", note = "Use Result instead")]
|
||||
|
@ -367,12 +367,7 @@ impl<'conn> Statement<'conn> {
|
||||
P::Item: ToSql,
|
||||
{
|
||||
let mut rows = try!(self.query(params));
|
||||
let exists = {
|
||||
match rows.next() {
|
||||
Some(_) => true,
|
||||
None => false,
|
||||
}
|
||||
};
|
||||
let exists = rows.next().is_some();
|
||||
Ok(exists)
|
||||
}
|
||||
|
||||
|
@ -467,6 +467,8 @@ impl<'a> Values<'a> {
|
||||
Error::FromSqlConversionFailure(idx, value.data_type(), err)
|
||||
}
|
||||
FromSqlError::OutOfRange(i) => Error::IntegralValueOutOfRange(idx, i),
|
||||
#[cfg(feature = "i128_blob")]
|
||||
FromSqlError::InvalidI128Size(_) => Error::InvalidColumnType(idx, value.data_type()),
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user