Skip to content

Commit e668ece

Browse files
Fix of missing _sqlite in cargo.toml
1 parent 5e529a9 commit e668ece

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

sqlx-cli/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ rustls = ["sqlx/runtime-tokio-rustls"]
5353
native-tls = ["sqlx/runtime-tokio-native-tls"]
5454

5555
# databases
56+
_sqlite = []
57+
5658
mysql = ["sqlx/mysql"]
5759
postgres = ["sqlx/postgres"]
58-
sqlite = ["sqlx/sqlite"]
59-
sqlite-unbundled = ["sqlx/sqlite-unbundled"]
60+
sqlite = ["_sqlite", "sqlx/sqlite"]
61+
sqlite-unbundled = ["_sqlite", "sqlx/sqlite-unbundled"]
6062

6163
# workaround for musl + openssl issues
6264
openssl-vendored = ["openssl/vendored"]

sqlx-cli/src/database.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub async fn create(connect_opts: &ConnectOpts) -> anyhow::Result<()> {
1313
let exists = crate::retry_connect_errors(connect_opts, Any::database_exists).await?;
1414

1515
if !exists {
16-
#[cfg(any(feature = "sqlite", feature = "sqlite-unbundled"))]
16+
#[cfg(feature = "_sqlite")]
1717
sqlx::sqlite::CREATE_DB_WAL.store(
1818
connect_opts.sqlite_create_db_wal,
1919
std::sync::atomic::Ordering::Release,

sqlx-cli/src/opt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ pub struct ConnectOpts {
262262
/// However, if your application sets a `journal_mode` on `SqliteConnectOptions` to something
263263
/// other than `Wal`, then it will have to take the database file out of WAL mode on connecting,
264264
/// which requires an exclusive lock and may return a `database is locked` (`SQLITE_BUSY`) error.
265-
#[cfg(any(feature = "sqlite", feature = "sqlite-unbundled"))]
265+
#[cfg(feature = "_sqlite")]
266266
#[clap(long, action = clap::ArgAction::Set, default_value = "true")]
267267
pub sqlite_create_db_wal: bool,
268268
}

0 commit comments

Comments
 (0)