177 stable releases
3.1.11 | Jul 7, 2022 |
---|---|
3.1.9 | May 18, 2022 |
3.1.6 | Mar 25, 2022 |
3.0.18 | Dec 9, 2021 |
0.0.3 | Jun 25, 2020 |
#2503 in Database interfaces
259 downloads per month
170KB
4.5K
SLoC
rbatis-core driver,based on mongodb/bson
support bigdecimal,json decode,async_std,tokio
use rbatis_core::db::{DBPool};
fn main() -> Result<(), rbatis_core::Error>{
async_std::task::block_on(
async move {
//Automatic judgment of database type
let pool = DBPool::new("mysql://root:123456@localhost:3306/test").await?;
let mut conn = pool.acquire().await?;
let count: u64 = conn.exec("SELECT count(1) FROM biz_activity;").await?.rows_affected;
println!("count: {}",count);
return Ok(());
}
)
}
lib.rs
:
Core of rbatis::core, the rust SQL toolkit. Not intended to be used directly.
Dependencies
~5–25MB
~419K SLoC