Debian Codegraph @

src/any/mod.rs

raw symbols SCIP
1 //! **SEE DOCUMENTATION BEFORE USE**. Runtime-generic database driver.
2 #![doc = include_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/include_str!!("install_drivers_note.md")]
3
4 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::syncrust-analyzer cargo std https://github.com/rust-lang/rust/library/std sync/::Oncerust-analyzer cargo std https://github.com/rust-lang/rust/library/std sync/once/Once#;
5
6 pub use sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::anyrust-analyzer cargo sqlx-core 0.8.3 any/::driverrust-analyzer cargo sqlx-core 0.8.3 any/driver/::install_driversrust-analyzer cargo sqlx-core 0.8.3 any/driver/install_drivers().;
7
8 pub use sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::anyrust-analyzer cargo sqlx-core 0.8.3 any/::{
9 Anyrust-analyzer cargo sqlx-core 0.8.3 any/database/Any#, AnyArgumentsrust-analyzer cargo sqlx-core 0.8.3 any/arguments/AnyArguments#, AnyConnectOptionsrust-analyzer cargo sqlx-core 0.8.3 any/options/AnyConnectOptions#, AnyExecutorrust-analyzer cargo sqlx-core 0.8.3 any/AnyExecutor#, AnyPoolOptionsrust-analyzer cargo sqlx-core 0.8.3 any/AnyPoolOptions#, AnyQueryResultrust-analyzer cargo sqlx-core 0.8.3 any/query_result/AnyQueryResult#, AnyRowrust-analyzer cargo sqlx-core 0.8.3 any/row/AnyRow#,
10 AnyStatementrust-analyzer cargo sqlx-core 0.8.3 any/statement/AnyStatement#, AnyTransactionManagerrust-analyzer cargo sqlx-core 0.8.3 any/transaction/AnyTransactionManager#, AnyTypeInforust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfo#, AnyTypeInfoKindrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#, AnyValuerust-analyzer cargo sqlx-core 0.8.3 any/value/AnyValue#, AnyValueRefrust-analyzer cargo sqlx-core 0.8.3 any/value/AnyValueRef#,
11 };
12
13 #[allow(deprecated)]
14 pub use sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::anyrust-analyzer cargo sqlx-core 0.8.3 any/::AnyKindrust-analyzer cargo sqlx-core 0.8.3 any/kind/AnyKind#;
15
16 pub(craterust-analyzer cargo sqlx 0.8.3 crate/) mod reexportsrust-analyzer cargo sqlx 0.8.3 any/reexports/ {
17 /// **SEE DOCUMENTATION BEFORE USE**. Type alias for `Pool<Any>`.
18 #[doc = include_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/include_str!!("install_drivers_note.md")]
19 pub use sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::anyrust-analyzer cargo sqlx-core 0.8.3 any/::AnyPoolrust-analyzer cargo sqlx-core 0.8.3 any/AnyPool#;
20
21 /// **SEE DOCUMENTATION BEFORE USE**. Runtime-generic database connection.
22 #[doc = include_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/include_str!!("install_drivers_note.md")]
23 pub use sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::anyrust-analyzer cargo sqlx-core 0.8.3 any/::AnyConnectionrust-analyzer cargo sqlx-core 0.8.3 any/connection/AnyConnection#;
24 }
25
26 /// Install all currently compiled-in drivers for [`AnyConnection`] to use.
27 ///
28 /// May be called multiple times; only the first call will install drivers, subsequent calls
29 /// will have no effect.
30 ///
31 /// ### Panics
32 /// If [`install_drivers`] has already been called *not* through this function.
33 ///
34 /// [`AnyConnection`]: sqlx_core::any::AnyConnection
35 pub fn install_default_driversrust-analyzer cargo sqlx 0.8.3 any/install_default_drivers().() {
36 static ONCErust-analyzer cargo sqlx 0.8.3 any/ONCE.: Oncerust-analyzer cargo std https://github.com/rust-lang/rust/library/std sync/once/Once# = Oncerust-analyzer cargo std https://github.com/rust-lang/rust/library/std sync/once/Once#::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std sync/once/impl#[Once]new().();
37
38 ONCErust-analyzer cargo sqlx 0.8.3 any/ONCE..call_oncerust-analyzer cargo std https://github.com/rust-lang/rust/library/std sync/once/impl#[Once]call_once().(|| {
39 install_driversrust-analyzer cargo sqlx-core 0.8.3 any/driver/install_drivers().(&[
40 #[cfg(feature = "mysql")]
41 sqlx_mysqlrust-analyzer cargo sqlx-mysql 0.8.3 crate/::anyrust-analyzer cargo sqlx-mysql 0.8.3 any/::DRIVERrust-analyzer cargo sqlx-mysql 0.8.3 any/DRIVER.,
42 #[cfg(feature = "postgres")]
43 sqlx_postgresrust-analyzer cargo sqlx-postgres 0.8.3 crate/::anyrust-analyzer cargo sqlx-postgres 0.8.3 any/::DRIVERrust-analyzer cargo sqlx-postgres 0.8.3 any/DRIVER.,
44 #[cfg(feature = "_sqlite")]
45 sqlx_sqliterust-analyzer cargo sqlx-sqlite 0.8.3 crate/::anyrust-analyzer cargo sqlx-sqlite 0.8.3 any/::DRIVERrust-analyzer cargo sqlx-sqlite 0.8.3 any/DRIVER.,
46 ])
47 .expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]expect().("non-default drivers already installed")
48 });
49 }