mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-23 00:39:20 +08:00
Remove deprecated stuff
This commit is contained in:
parent
ebc3609a09
commit
2357acd79e
@ -6,10 +6,6 @@ use std::str;
|
||||
use types::Type;
|
||||
use {errmsg_to_string, ffi};
|
||||
|
||||
/// Old name for `Error`. `SqliteError` is deprecated.
|
||||
#[deprecated(since = "0.6.0", note = "Use Error instead")]
|
||||
pub type SqliteError = Error;
|
||||
|
||||
/// Enum listing possible errors from rusqlite.
|
||||
#[derive(Debug)]
|
||||
#[allow(enum_variant_names)]
|
||||
|
31
src/lib.rs
31
src/lib.rs
@ -98,12 +98,8 @@ pub use statement::Statement;
|
||||
pub use row::{AndThenRows, MappedRows, Row, RowIndex, Rows};
|
||||
|
||||
pub use transaction::{DropBehavior, Savepoint, Transaction, TransactionBehavior};
|
||||
#[allow(deprecated)]
|
||||
pub use transaction::{SqliteTransaction, SqliteTransactionBehavior};
|
||||
|
||||
pub use error::Error;
|
||||
#[allow(deprecated)]
|
||||
pub use error::SqliteError;
|
||||
pub use ffi::ErrorCode;
|
||||
|
||||
pub use cache::CachedStatement;
|
||||
@ -112,8 +108,7 @@ pub use version::*;
|
||||
#[cfg(feature = "hooks")]
|
||||
pub use hooks::*;
|
||||
#[cfg(feature = "load_extension")]
|
||||
#[allow(deprecated)]
|
||||
pub use load_extension_guard::{LoadExtensionGuard, SqliteLoadExtensionGuard};
|
||||
pub use load_extension_guard::LoadExtensionGuard;
|
||||
|
||||
#[cfg(feature = "backup")]
|
||||
pub mod backup;
|
||||
@ -149,10 +144,6 @@ 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] = &[];
|
||||
|
||||
/// Old name for `Result`. `SqliteResult` is deprecated.
|
||||
#[deprecated(since = "0.6.0", note = "Use Result instead")]
|
||||
pub type SqliteResult<T> = Result<T>;
|
||||
|
||||
/// A typedef of the result returned by many methods.
|
||||
pub type Result<T> = result::Result<T, Error>;
|
||||
|
||||
@ -197,10 +188,6 @@ impl<'a> DatabaseName<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Old name for `Connection`. `SqliteConnection` is deprecated.
|
||||
#[deprecated(since = "0.6.0", note = "Use Connection instead")]
|
||||
pub type SqliteConnection = Connection;
|
||||
|
||||
/// A connection to a SQLite database.
|
||||
pub struct Connection {
|
||||
db: RefCell<InnerConnection>,
|
||||
@ -631,10 +618,6 @@ struct InnerConnection {
|
||||
free_update_hook: Option<fn(*mut ::std::os::raw::c_void)>,
|
||||
}
|
||||
|
||||
/// Old name for `OpenFlags`. `SqliteOpenFlags` is deprecated.
|
||||
#[deprecated(since = "0.6.0", note = "Use OpenFlags instead")]
|
||||
pub type SqliteOpenFlags = OpenFlags;
|
||||
|
||||
bitflags! {
|
||||
#[doc = "Flags for opening SQLite database connections."]
|
||||
#[doc = "See [sqlite3_open_v2](http://www.sqlite.org/c3ref/open.html) for details."]
|
||||
@ -1070,18 +1053,6 @@ impl Drop for InnerConnection {
|
||||
}
|
||||
}
|
||||
|
||||
/// Old name for `Statement`. `SqliteStatement` is deprecated.
|
||||
#[deprecated(since = "0.6.0", note = "Use Statement instead")]
|
||||
pub type SqliteStatement<'conn> = Statement<'conn>;
|
||||
|
||||
/// Old name for `Rows`. `SqliteRows` is deprecated.
|
||||
#[deprecated(since = "0.6.0", note = "Use Rows instead")]
|
||||
pub type SqliteRows<'stmt> = Rows<'stmt>;
|
||||
|
||||
/// Old name for `Row`. `SqliteRow` is deprecated.
|
||||
#[deprecated(since = "0.6.0", note = "Use Row instead")]
|
||||
pub type SqliteRow<'a, 'stmt> = Row<'a, 'stmt>;
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
extern crate tempdir;
|
||||
|
@ -1,9 +1,5 @@
|
||||
use {Connection, Result};
|
||||
|
||||
/// Old name for `LoadExtensionGuard`. `SqliteLoadExtensionGuard` is deprecated.
|
||||
#[deprecated(since = "0.6.0", note = "Use LoadExtensionGuard instead")]
|
||||
pub type SqliteLoadExtensionGuard<'conn> = LoadExtensionGuard<'conn>;
|
||||
|
||||
/// RAII guard temporarily enabling SQLite extensions to be loaded.
|
||||
///
|
||||
/// ## Example
|
||||
|
@ -1,11 +1,6 @@
|
||||
use std::ops::Deref;
|
||||
use {Connection, Result};
|
||||
|
||||
/// Old name for `TransactionBehavior`. `SqliteTransactionBehavior` is
|
||||
/// deprecated.
|
||||
#[deprecated(since = "0.6.0", note = "Use TransactionBehavior instead")]
|
||||
pub type SqliteTransactionBehavior = TransactionBehavior;
|
||||
|
||||
/// Options for transaction behavior. See [BEGIN
|
||||
/// TRANSACTION](http://www.sqlite.org/lang_transaction.html) for details.
|
||||
#[derive(Copy, Clone)]
|
||||
@ -32,10 +27,6 @@ pub enum DropBehavior {
|
||||
Panic,
|
||||
}
|
||||
|
||||
/// Old name for `Transaction`. `SqliteTransaction` is deprecated.
|
||||
#[deprecated(since = "0.6.0", note = "Use Transaction instead")]
|
||||
pub type SqliteTransaction<'conn> = Transaction<'conn>;
|
||||
|
||||
/// Represents a transaction on a database connection.
|
||||
///
|
||||
/// ## Note
|
||||
|
Loading…
Reference in New Issue
Block a user