mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-30 23:19:32 +00:00
Add a "sqlite-unbundled" feature that dynamically links to system libsqlite3.so library (#3507)
* Add a "sqlite-unbundled" feature that dynamically links to system libsqlite3.so library * update README abouot the newly-added `sqlite-unbundled` feature * Update README.md to make it clear with bulleted list Co-authored-by: Austin Bonander <austin.bonander@gmail.com> * more cfg feature updates Co-authored-by: Austin Bonander <austin.bonander@gmail.com> * update documentation in sqlx-sqlx/src/lib.rs too and also mention possible build time increasement. * cargo fmt * Add "sqlite-unbundled" feature to sqlx-cli * Add sqlite-unbundled to gituhb actions tests * cfg(feature = "sqlite") => cfg(any(feature = "sqlite", feature = "sqlite-unbundled")) * fix * CI: make sqlite-unbundled tests workaround required-features by duplicating the relevant test section * use an internal "_sqlite" feature to do the conditional compilation --------- Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
This commit is contained in:
@@ -41,7 +41,7 @@ pub fn install_default_drivers() {
|
||||
sqlx_mysql::any::DRIVER,
|
||||
#[cfg(feature = "postgres")]
|
||||
sqlx_postgres::any::DRIVER,
|
||||
#[cfg(feature = "sqlite")]
|
||||
#[cfg(feature = "_sqlite")]
|
||||
sqlx_sqlite::any::DRIVER,
|
||||
])
|
||||
.expect("non-default drivers already installed")
|
||||
|
||||
@@ -44,8 +44,8 @@ pub use sqlx_mysql::{self as mysql, MySql, MySqlConnection, MySqlExecutor, MySql
|
||||
#[doc(inline)]
|
||||
pub use sqlx_postgres::{self as postgres, PgConnection, PgExecutor, PgPool, Postgres};
|
||||
|
||||
#[cfg(feature = "sqlite")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "sqlite")))]
|
||||
#[cfg(feature = "_sqlite")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "_sqlite")))]
|
||||
#[doc(inline)]
|
||||
pub use sqlx_sqlite::{self as sqlite, Sqlite, SqliteConnection, SqliteExecutor, SqlitePool};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user