OneLiteFeatherNET / feedback-fusion

Feedback-fusion is an rust application that allows to collect user feedback to improve services
https://discord.onelitefeather.net
MIT License
0 stars 0 forks source link

fix(deps): update rust crate rbdc-mysql to 4.5.5 - autoclosed #14

Closed renovate[bot] closed 6 months ago

renovate[bot] commented 9 months ago

Mend Renovate

This PR contains the following updates:

Package Type Update Change
rbdc-mysql (source) dependencies minor 4.4.19 -> 4.5.5

Release Notes

rbatis/rbatis (rbdc-mysql) ### [`v4.5.5`](https://togithub.com/rbatis/rbatis/releases/tag/v4.5.5) [Compare Source](https://togithub.com/rbatis/rbatis/compare/v4.5.4...v4.5.5) v4.5.5 - add DefaultPool `pub use rbdc_pool_mobc::MobcPool as DefaultPool;` ### [`v4.5.4`](https://togithub.com/rbatis/rbatis/releases/tag/v4.5.4) [Compare Source](https://togithub.com/rbatis/rbatis/compare/v4.5.3...v4.5.4) v4.5.4 - add sync method for rbatis create table if not exists, add column if not exists ```rust use rbatis::RBatis; use rbatis::table_sync::{SqliteTableMapper}; let rb = RBatis::new(); let conn = rb.acquire().await; pub async fn do_sync_table(rb: &RBatis){ let map = rbs::to_value!{ "id":"INT", "name":"TEXT", }; let _ = RBatis::sync(&rb,&SqliteTableMapper{},&map,"user").await; } ``` ```rust use rbatis::RBatis; use rbatis::table_sync::{SqliteTableMapper}; #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct User{ pub id:String, pub name: Option } let rb = RBatis::new(); let conn = rb.acquire().await; pub async fn do_sync_table(rb: &RBatis){ let table = User{id: "".to_string(), name: Some("".to_string())}; let _ = RBatis::sync(&rb,&SqliteTableMapper{},&table,"user").await; } ``` ```rust use rbatis::RBatis; use rbatis::table_sync::{MysqlTableMapper}; #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct User{ pub id:String, pub name: Option } let rb = RBatis::new(); let conn = rb.acquire().await; pub async fn do_sync_table_mysql(rb: &RBatis){ let table = User{id: "".to_string(), name: Some("VARCHAR(50)".to_string())}; let _ = RBatis::sync(&rb,&MysqlTableMapper{},&table,"user").await; } ``` ### [`v4.5.3`](https://togithub.com/rbatis/rbatis/releases/tag/v4.5.3) [Compare Source](https://togithub.com/rbatis/rbatis/compare/v4.5.2...v4.5.3) v4.5.3 - fix for [#​463](https://togithub.com/rbatis/rbatis/issues/463) ### [`v4.5.2`](https://togithub.com/rbatis/rbatis/releases/tag/v4.5.2) [Compare Source](https://togithub.com/rbatis/rbatis/compare/v4.5.1...v4.5.2) v4.5.2 - rbatis remove rbdc fetaures - only driver need add features = \["tls-rustls"] or features = \["tls-native-tls"] just like example ```toml rbs = { version = "4.5" } rbdc-sqlite = { version = "4.5", default-features = false, features = ["tls-native-tls"] } #rbdc-mysql={version="4.5", default-features = false, features = ["tls-native-tls"]} #rbdc-pg={version="4.5", default-features = false, features = ["tls-native-tls"]} #rbdc-mssql={version="4.5", default-features = false, features = ["tls-native-tls"]} rbatis = { version = "4.5"} #other deps serde = { version = "1", features = ["derive"] } tokio = { version = "1", features = ["full"] } log = "0.4" fast_log = "1.6" ``` ### [`v4.5.1`](https://togithub.com/rbatis/rbatis/releases/tag/v4.5.1) [Compare Source](https://togithub.com/rbatis/rbatis/compare/v4.5.0...v4.5.1) - add Pool Trait, you can design your any Pool! for example: ```rust #[derive(Debug)] pub struct MobcPool { pub manager:ConnManager, pub inner: mobc::Pool, } unsafe impl Sync for MobcPool {} unsafe impl Send for MobcPool {} #[async_trait] impl Pool for MobcPool { fn new(manager: ConnManager) -> Result where Self: Sized { Ok(Self { manager:manager.clone(), inner: mobc::Pool::new(manager) }) } async fn get(&self) -> Result, Error> { let v = self.inner.get().await.map_err(|e|Error::from(e.to_string()))?; Ok(Box::new(v)) } async fn get_timeout(&self, d: Duration) -> Result, Error> { let v = self.inner.get_timeout(d).await.map_err(|e|Error::from(e.to_string()))?; Ok(Box::new(v)) } async fn set_conn_max_lifetime(&self, max_lifetime: Option) { self.inner.set_conn_max_lifetime(max_lifetime).await; } async fn set_max_idle_conns(&self, n: u64) { self.inner.set_max_idle_conns(n).await; } async fn set_max_open_conns(&self, n: u64) { self.inner.set_max_open_conns(n).await; } fn driver_type(&self) -> &str { self.manager.driver_type() } } #[async_trait] impl mobc::Manager for ConnManager { type Connection = ConnectionBox; type Error = Error; async fn connect(&self) -> Result { self.connect().await } async fn check(&self, conn: Self::Connection) -> Result { self.check( conn).await } } impl Connection for mobc::Connection{ fn get_rows(&mut self, sql: &str, params: Vec) -> BoxFuture>, Error>> { self.conn.as_mut().unwrap().get_rows(sql,params) } fn exec(&mut self, sql: &str, params: Vec) -> BoxFuture> { self.conn.as_mut().unwrap().exec(sql,params) } fn ping(&mut self) -> BoxFuture> { self.conn.as_mut().unwrap().ping() } fn close(&mut self) -> BoxFuture> { self.conn.as_mut().unwrap().close() } } ``` - use MobcPool ```rust use rbatis::RBatis; use rbdc::pool::pool_mobc::MobcPool; use rbdc_sqlite::{SqliteConnectOptions, SqliteDriver}; let rb=RBatis::new(); let opts=SqliteConnectOptions::new(); let rbatis = rb.init_option::(SqliteDriver{},opts); ``` ### [`v4.5.0`](https://togithub.com/rbatis/rbatis/releases/tag/v4.5.0) [Compare Source](https://togithub.com/rbatis/rbatis/compare/v4.4.20...v4.5.0) v4.5.0 - add Pool Trait, you can design your any Pool! for example: ```rust #[derive(Debug)] pub struct MobcPool { pub manager:ConnManager, pub inner: mobc::Pool, } unsafe impl Sync for MobcPool {} unsafe impl Send for MobcPool {} #[async_trait] impl Pool for MobcPool { fn new(manager: ConnManager) -> Result where Self: Sized { Ok(Self { manager:manager.clone(), inner: mobc::Pool::new(manager) }) } async fn get(&self) -> Result, Error> { let v = self.inner.get().await.map_err(|e|Error::from(e.to_string()))?; Ok(Box::new(v)) } async fn get_timeout(&self, d: Duration) -> Result, Error> { let v = self.inner.get_timeout(d).await.map_err(|e|Error::from(e.to_string()))?; Ok(Box::new(v)) } async fn set_conn_max_lifetime(&self, max_lifetime: Option) { self.inner.set_conn_max_lifetime(max_lifetime).await; } async fn set_max_idle_conns(&self, n: u64) { self.inner.set_max_idle_conns(n).await; } async fn set_max_open_conns(&self, n: u64) { self.inner.set_max_open_conns(n).await; } fn driver_type(&self) -> &str { self.manager.driver_type() } } #[async_trait] impl mobc::Manager for ConnManager { type Connection = ConnectionBox; type Error = Error; async fn connect(&self) -> Result { self.connect().await } async fn check(&self, conn: Self::Connection) -> Result { self.check( conn).await } } impl Connection for mobc::Connection{ fn get_rows(&mut self, sql: &str, params: Vec) -> BoxFuture>, Error>> { self.conn.as_mut().unwrap().get_rows(sql,params) } fn exec(&mut self, sql: &str, params: Vec) -> BoxFuture> { self.conn.as_mut().unwrap().exec(sql,params) } fn ping(&mut self) -> BoxFuture> { self.conn.as_mut().unwrap().ping() } fn close(&mut self) -> BoxFuture> { self.conn.as_mut().unwrap().close() } } ``` - use MobcPool ```rust use rbatis::RBatis; use rbdc::pool::pool_mobc::MobcPool; use rbdc_sqlite::{SqliteConnectOptions, SqliteDriver}; let rb=RBatis::new(); let opts=SqliteConnectOptions::new(); let rbatis = rb.init_option::(SqliteDriver{},opts); ``` ### [`v4.4.20`](https://togithub.com/rbatis/rbatis/releases/tag/v4.4.20) [Compare Source](https://togithub.com/rbatis/rbatis/compare/v4.4.19...v4.4.20) v4.4.20 - fix `#[py_sql(r#"include_str!("example.py")"#)]` on debug_mode Reload not Not working ```rust #[py_sql(r#"include_str!("example.py")"#)] async fn py_select(rb: &dyn Executor, name: &str, ids: &[i32]) -> Result, Error> { impled!() } ```

Configuration

šŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

šŸš¦ Automerge: Disabled by config. Please merge this manually once you are satisfied.

ā™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

šŸ”• Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by Mend Renovate. View repository job log here.