mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 14:34:19 +00:00
00b077ab14
* chore:Added ipaddr extension library to gitignore * fix:In a Linux environment, shared libraries in the current directory are not loaded, so add the current directory to the LD_LIBRARY_PATH environment variable. * fix: Since confrict primary key when running multiple sqlite tests, removed specific primary key in insert. * chore: Since avoid git modified targeting, copy the db file to new test db file. * fix: Since docker mysql 5.7 using yaSSL(It only supports TLSv1.1), avoid running when using rustls.
18 lines
482 B
Rust
18 lines
482 B
Rust
use sqlx::{Any, Sqlite};
|
|
use sqlx_test::new;
|
|
|
|
#[sqlx_macros::test]
|
|
async fn it_encodes_bool_with_any() -> anyhow::Result<()> {
|
|
sqlx::any::install_default_drivers();
|
|
let mut conn = new::<Any>().await?;
|
|
|
|
let res = sqlx::query("INSERT INTO accounts (name, is_active) VALUES (?, ?)")
|
|
.bind("Harrison Ford")
|
|
.bind(true)
|
|
.execute(&mut conn)
|
|
.await
|
|
.expect("failed to encode bool");
|
|
assert_eq!(res.rows_affected(), 1);
|
|
|
|
Ok(())
|
|
}
|