mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-29 06:31:11 +00:00
Rename cargo features in preparation for rustls support
This commit is contained in:
committed by
Ryan Leckey
parent
04f68632b4
commit
a161bcba05
11
src/lib.rs
11
src/lib.rs
@@ -1,5 +1,16 @@
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
|
||||
#[cfg(any(
|
||||
feature = "runtime-actix",
|
||||
feature = "runtime-async-std",
|
||||
feature = "runtime-tokio"
|
||||
))]
|
||||
compile_error!(
|
||||
"the features 'runtime-actix', 'runtime-async-std' and 'runtime-tokio' have been removed in
|
||||
favor of new features 'runtime-{rt}-{tls}' where rt is one of 'actix', 'async-std' and
|
||||
'tokio'."
|
||||
);
|
||||
|
||||
pub use sqlx_core::acquire::Acquire;
|
||||
pub use sqlx_core::arguments::{Arguments, IntoArguments};
|
||||
pub use sqlx_core::column::Column;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
///
|
||||
/// ```rust,ignore
|
||||
/// # use sqlx::Connect;
|
||||
/// # #[cfg(all(feature = "mysql", feature = "runtime-async-std"))]
|
||||
/// # #[cfg(all(feature = "mysql", feature = "_rt-async-std"))]
|
||||
/// # #[async_std::main]
|
||||
/// # async fn main() -> sqlx::Result<()>{
|
||||
/// # let db_url = dotenv::var("DATABASE_URL").expect("DATABASE_URL must be set");
|
||||
@@ -24,7 +24,7 @@
|
||||
/// # Ok(())
|
||||
/// # }
|
||||
/// #
|
||||
/// # #[cfg(any(not(feature = "mysql"), not(feature = "runtime-async-std")))]
|
||||
/// # #[cfg(any(not(feature = "mysql"), not(feature = "_rt-async-std")))]
|
||||
/// # fn main() {}
|
||||
/// ```
|
||||
///
|
||||
@@ -54,7 +54,7 @@
|
||||
///
|
||||
/// ```rust,ignore
|
||||
/// # use sqlx::Connect;
|
||||
/// # #[cfg(all(feature = "mysql", feature = "runtime-async-std"))]
|
||||
/// # #[cfg(all(feature = "mysql", feature = "_rt-async-std"))]
|
||||
/// # #[async_std::main]
|
||||
/// # async fn main() -> sqlx::Result<()>{
|
||||
/// # let db_url = dotenv::var("DATABASE_URL").expect("DATABASE_URL must be set");
|
||||
@@ -75,7 +75,7 @@
|
||||
/// # Ok(())
|
||||
/// # }
|
||||
/// #
|
||||
/// # #[cfg(any(not(feature = "mysql"), not(feature = "runtime-async-std")))]
|
||||
/// # #[cfg(any(not(feature = "mysql"), not(feature = "_rt-async-std")))]
|
||||
/// # fn main() {}
|
||||
/// ```
|
||||
///
|
||||
@@ -328,7 +328,7 @@ macro_rules! query_unchecked (
|
||||
/// `src/my_query.rs`:
|
||||
/// ```rust,ignore
|
||||
/// # use sqlx::Connect;
|
||||
/// # #[cfg(all(feature = "mysql", feature = "runtime-async-std"))]
|
||||
/// # #[cfg(all(feature = "mysql", feature = "_rt-async-std"))]
|
||||
/// # #[async_std::main]
|
||||
/// # async fn main() -> sqlx::Result<()>{
|
||||
/// # let db_url = dotenv::var("DATABASE_URL").expect("DATABASE_URL must be set");
|
||||
@@ -345,7 +345,7 @@ macro_rules! query_unchecked (
|
||||
/// # Ok(())
|
||||
/// # }
|
||||
/// #
|
||||
/// # #[cfg(any(not(feature = "mysql"), not(feature = "runtime-async-std")))]
|
||||
/// # #[cfg(any(not(feature = "mysql"), not(feature = "_rt-async-std")))]
|
||||
/// # fn main() {}
|
||||
/// ```
|
||||
#[macro_export]
|
||||
@@ -397,7 +397,7 @@ macro_rules! query_file_unchecked (
|
||||
/// string:
|
||||
/// ```rust,ignore
|
||||
/// # use sqlx::Connect;
|
||||
/// # #[cfg(all(feature = "mysql", feature = "runtime-async-std"))]
|
||||
/// # #[cfg(all(feature = "mysql", feature = "_rt-async-std"))]
|
||||
/// # #[async_std::main]
|
||||
/// # async fn main() -> sqlx::Result<()>{
|
||||
/// # let db_url = dotenv::var("DATABASE_URL").expect("DATABASE_URL must be set");
|
||||
@@ -425,7 +425,7 @@ macro_rules! query_file_unchecked (
|
||||
/// # Ok(())
|
||||
/// # }
|
||||
/// #
|
||||
/// # #[cfg(any(not(feature = "mysql"), not(feature = "runtime-async-std")))]
|
||||
/// # #[cfg(any(not(feature = "mysql"), not(feature = "_rt-async-std")))]
|
||||
/// # fn main() {}
|
||||
/// ```
|
||||
///
|
||||
@@ -526,7 +526,7 @@ macro_rules! query_as (
|
||||
///
|
||||
/// ```rust,ignore
|
||||
/// # use sqlx::Connect;
|
||||
/// # #[cfg(all(feature = "mysql", feature = "runtime-async-std"))]
|
||||
/// # #[cfg(all(feature = "mysql", feature = "_rt-async-std"))]
|
||||
/// # #[async_std::main]
|
||||
/// # async fn main() -> sqlx::Result<()>{
|
||||
/// # let db_url = dotenv::var("DATABASE_URL").expect("DATABASE_URL must be set");
|
||||
@@ -550,7 +550,7 @@ macro_rules! query_as (
|
||||
/// # Ok(())
|
||||
/// # }
|
||||
/// #
|
||||
/// # #[cfg(any(not(feature = "mysql"), not(feature = "runtime-async-std")))]
|
||||
/// # #[cfg(any(not(feature = "mysql"), not(feature = "_rt-async-std")))]
|
||||
/// # fn main() {}
|
||||
/// ```
|
||||
#[macro_export]
|
||||
|
||||
Reference in New Issue
Block a user