mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-27 03:51:38 +08:00
Merge pull request #169 from jgallagher/deprecated
Use new Rust 1.9 attribute: #[deprecated(since = "...", note = "...")]
This commit is contained in:
commit
326d8999e8
@ -3,6 +3,8 @@
|
|||||||
* BREAKING CHANGE: The `FromSql` trait has been redesigned. It now requires a single, safe
|
* BREAKING CHANGE: The `FromSql` trait has been redesigned. It now requires a single, safe
|
||||||
method instead of the previous definition which required implementing one or two unsafe
|
method instead of the previous definition which required implementing one or two unsafe
|
||||||
methods.
|
methods.
|
||||||
|
* Added `#[deprecated(since = "...", note = "...")]` flags (new in Rust 1.9 for libraries) to
|
||||||
|
all deprecated APIs.
|
||||||
|
|
||||||
# Version 0.7.2 (2016-05-19)
|
# Version 0.7.2 (2016-05-19)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
environment:
|
environment:
|
||||||
TARGET: 1.8.0-x86_64-pc-windows-gnu
|
TARGET: 1.9.0-x86_64-pc-windows-gnu
|
||||||
MSYS2_BITS: 64
|
MSYS2_BITS: 64
|
||||||
install:
|
install:
|
||||||
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:TARGET}.exe"
|
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:TARGET}.exe"
|
||||||
|
@ -6,6 +6,7 @@ use libc::c_int;
|
|||||||
use {ffi, errmsg_to_string};
|
use {ffi, errmsg_to_string};
|
||||||
|
|
||||||
/// Old name for `Error`. `SqliteError` is deprecated.
|
/// Old name for `Error`. `SqliteError` is deprecated.
|
||||||
|
#[deprecated(since = "0.6.0", note = "Use Error instead")]
|
||||||
pub type SqliteError = Error;
|
pub type SqliteError = Error;
|
||||||
|
|
||||||
/// Enum listing possible errors from rusqlite.
|
/// Enum listing possible errors from rusqlite.
|
||||||
|
@ -103,6 +103,7 @@ mod raw_statement;
|
|||||||
const STATEMENT_CACHE_DEFAULT_CAPACITY: usize = 16;
|
const STATEMENT_CACHE_DEFAULT_CAPACITY: usize = 16;
|
||||||
|
|
||||||
/// Old name for `Result`. `SqliteResult` is deprecated.
|
/// Old name for `Result`. `SqliteResult` is deprecated.
|
||||||
|
#[deprecated(since = "0.6.0", note = "Use Result instead")]
|
||||||
pub type SqliteResult<T> = Result<T>;
|
pub type SqliteResult<T> = Result<T>;
|
||||||
|
|
||||||
/// A typedef of the result returned by many methods.
|
/// A typedef of the result returned by many methods.
|
||||||
@ -149,6 +150,7 @@ impl<'a> DatabaseName<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Old name for `Connection`. `SqliteConnection` is deprecated.
|
/// Old name for `Connection`. `SqliteConnection` is deprecated.
|
||||||
|
#[deprecated(since = "0.6.0", note = "Use Connection instead")]
|
||||||
pub type SqliteConnection = Connection;
|
pub type SqliteConnection = Connection;
|
||||||
|
|
||||||
/// A connection to a SQLite database.
|
/// A connection to a SQLite database.
|
||||||
@ -365,6 +367,7 @@ impl Connection {
|
|||||||
///
|
///
|
||||||
/// This method should be considered deprecated. Use `query_row` instead, which now
|
/// This method should be considered deprecated. Use `query_row` instead, which now
|
||||||
/// does exactly the same thing.
|
/// does exactly the same thing.
|
||||||
|
#[deprecated(since = "0.1.0", note = "Use query_row instead")]
|
||||||
pub fn query_row_safe<T, F>(&self, sql: &str, params: &[&ToSql], f: F) -> Result<T>
|
pub fn query_row_safe<T, F>(&self, sql: &str, params: &[&ToSql], f: F) -> Result<T>
|
||||||
where F: FnOnce(Row) -> T
|
where F: FnOnce(Row) -> T
|
||||||
{
|
{
|
||||||
@ -505,6 +508,7 @@ struct InnerConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Old name for `OpenFlags`. `SqliteOpenFlags` is deprecated.
|
/// Old name for `OpenFlags`. `SqliteOpenFlags` is deprecated.
|
||||||
|
#[deprecated(since = "0.6.0", note = "Use OpenFlags instead")]
|
||||||
pub type SqliteOpenFlags = OpenFlags;
|
pub type SqliteOpenFlags = OpenFlags;
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
@ -676,6 +680,7 @@ impl Drop for InnerConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Old name for `Statement`. `SqliteStatement` is deprecated.
|
/// Old name for `Statement`. `SqliteStatement` is deprecated.
|
||||||
|
#[deprecated(since = "0.6.0", note = "Use Statement instead")]
|
||||||
pub type SqliteStatement<'conn> = Statement<'conn>;
|
pub type SqliteStatement<'conn> = Statement<'conn>;
|
||||||
|
|
||||||
/// A prepared statement.
|
/// A prepared statement.
|
||||||
@ -965,6 +970,7 @@ impl<'stmt, T, E, F> Iterator for AndThenRows<'stmt, F>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Old name for `Rows`. `SqliteRows` is deprecated.
|
/// Old name for `Rows`. `SqliteRows` is deprecated.
|
||||||
|
#[deprecated(since = "0.6.0", note = "Use Rows instead")]
|
||||||
pub type SqliteRows<'stmt> = Rows<'stmt>;
|
pub type SqliteRows<'stmt> = Rows<'stmt>;
|
||||||
|
|
||||||
/// An handle for the resulting rows of a query.
|
/// An handle for the resulting rows of a query.
|
||||||
@ -1029,6 +1035,7 @@ impl<'stmt> Drop for Rows<'stmt> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Old name for `Row`. `SqliteRow` is deprecated.
|
/// Old name for `Row`. `SqliteRow` is deprecated.
|
||||||
|
#[deprecated(since = "0.6.0", note = "Use Row instead")]
|
||||||
pub type SqliteRow<'a, 'stmt> = Row<'a, 'stmt>;
|
pub type SqliteRow<'a, 'stmt> = Row<'a, 'stmt>;
|
||||||
|
|
||||||
/// A single result row of a query.
|
/// A single result row of a query.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
use {Result, Connection};
|
use {Result, Connection};
|
||||||
|
|
||||||
/// Old name for `LoadExtensionGuard`. `SqliteLoadExtensionGuard` is deprecated.
|
/// Old name for `LoadExtensionGuard`. `SqliteLoadExtensionGuard` is deprecated.
|
||||||
|
#[deprecated(since = "0.6.0", note = "Use LoadExtensionGuard instead")]
|
||||||
pub type SqliteLoadExtensionGuard<'conn> = LoadExtensionGuard<'conn>;
|
pub type SqliteLoadExtensionGuard<'conn> = LoadExtensionGuard<'conn>;
|
||||||
|
|
||||||
/// RAII guard temporarily enabling SQLite extensions to be loaded.
|
/// RAII guard temporarily enabling SQLite extensions to be loaded.
|
||||||
|
@ -2,6 +2,7 @@ use std::ops::Deref;
|
|||||||
use {Result, Connection};
|
use {Result, Connection};
|
||||||
|
|
||||||
/// Old name for `TransactionBehavior`. `SqliteTransactionBehavior` is deprecated.
|
/// Old name for `TransactionBehavior`. `SqliteTransactionBehavior` is deprecated.
|
||||||
|
#[deprecated(since = "0.6.0", note = "Use TransactionBehavior instead")]
|
||||||
pub type SqliteTransactionBehavior = TransactionBehavior;
|
pub type SqliteTransactionBehavior = TransactionBehavior;
|
||||||
|
|
||||||
/// Options for transaction behavior. See [BEGIN
|
/// Options for transaction behavior. See [BEGIN
|
||||||
@ -28,6 +29,7 @@ pub enum DropBehavior {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Old name for `Transaction`. `SqliteTransaction` is deprecated.
|
/// Old name for `Transaction`. `SqliteTransaction` is deprecated.
|
||||||
|
#[deprecated(since = "0.6.0", note = "Use Transaction instead")]
|
||||||
pub type SqliteTransaction<'conn> = Transaction<'conn>;
|
pub type SqliteTransaction<'conn> = Transaction<'conn>;
|
||||||
|
|
||||||
/// Represents a transaction on a database connection.
|
/// Represents a transaction on a database connection.
|
||||||
|
Loading…
Reference in New Issue
Block a user