Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update rust crate rbatis to 4.5.21 - autoclosed #13

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 27, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
rbatis (source) dependencies minor 4.4.20 -> 4.5.21

Release Notes

rbatis/rbatis (rbatis)

v4.5.21

Compare Source

what changes?

  • html_sql,py_sql support break node
  • support update_by_column_skip, update_by_column_batch_skip for #​501
  • html_sql,py_sql the bind node will set value to arg.
  • rbs ValueMap use index_map crate

v4.5.20

Compare Source

what changes?

  • fix #​498
  • RBatisConnExecutor rb_task_id use new_snowflake_id()

v4.5.19

Compare Source

what Changes?

  • (new features) open debug_mode , will be show decoding invalid type Which field did the parsing fail. you can see error("invalid type: integer `1`, expected a string, key=`status`")
    for example:
#toml
rbatis = { version = "4.5", features = ["debug_mode"]}
/// table

#[derive(serde::Serialize, serde::Deserialize)]
pub struct Activity {
    pub status: Option<String>,
}
//log
[INFO] [rbatis] [608325834525440517] query <= len=1,rows=[{"status":1}]

called `Result::unwrap()` on an `Err` value: E("invalid type: integer `1`, expected a string, key = `status`")
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:645
   1: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\panicking.rs:72

v4.5.18

Compare Source

what change?

  • (bug) fix tx.done when commit() rollback() not set tx.done = true
  • (bug) fix table_sync column type override bug.
  • (clean) crud macro remove Clone、Debug trait request
  • (new features) sqlite driver support return JSON Object/JSON Array. (before version JSON objects and arrays is JSON string)

v4.5.17

Compare Source

what changes?

  • crud macro remove Clone、Debug trait request
  • fix table_sync column type override bug.
  • sqlite driver support return JSON Object/JSON Array. (before version JSON objects and arrays is JSON string)

v4.5.16

Compare Source

what changes?

  • fix table_sync column type override bug.

now you can use

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct Account {
    pub id: Option<u64>,
    pub name: Option<String>,
}

#[derive(Clone, serde::Serialize, serde::Deserialize)]
pub struct User {
    pub id: Option<u64>,
    //json support json object/array/null
    pub account1: Account,
    //json support json object/array/null
    pub account2: Vec<Account>,
}
async fn create_table(rb: &RBatis) {
    fast_log::LOGGER.set_level(LevelFilter::Off);
    defer!(||{
         fast_log::LOGGER.set_level(LevelFilter::Info);
    });
    // let table = User {
    //     id: Some(1),
    //     account1: Account {
    //         id: Some(1),
    //         name: Some("".to_string()),
    //     },
    //     account2: vec![Account {
    //         id: Some(1),
    //         name: Some("".to_string()),
    //     }],
    // };
    let table = to_value!{
        "id":"INTEGER PRIMARY KEY AUTOINCREMENT",
        "account1":"JSON",
        "account2":"JSON",
    };
    let conn = rb.acquire().await.unwrap();
    _ = table_sync::sync(&conn, &SqliteTableMapper {}, to_value!(&table), "user").await.unwrap();
}

v4.5.15

Compare Source

what changes?

  • fix impl_select_page macro issue of failed compilation of ownership parameters

v4.5.14

Compare Source

what changes?

  • support of #​490
  • crud macro Generate the 'snake-case' table name on compile-time

v4.5.13

Compare Source

what changes?

  • rbdc Connection trait add some translation methods
  • rbdc-mssql rewrite Connection trait translation methods
  • rbatis remove tx plugin

v4.5.12

Compare Source

v4.5.12

  • fix tx use intercept
  • add TxIntercept

v4.5.11

Compare Source

what changes?

  • Require rust compiler 1.75,maybe you need run rustup update
  • LogInterceptor remove replace_holder

v4.5.10

Compare Source

what changes?

  • deprecated sql mod
  • page,tx move to plugin
  • Require rust compiler 1.75,maybe you need run rustup update

v4.5.9

Compare Source

v4.5.8

Compare Source

v4.5.7

Compare Source

v4.5.7

what changes?
  • add new crates fast_pool
  • add new crates rbdc-pool-fast based on fast_pool
  • Pool Performance improvement
  • Require rust compiler 1.75,maybe you need run rustup update
// bench method pool.get().await.unwrap()
//windows:
//---- bench_pool stdout ----
//use Time: 4.0313ms ,each:40 ns/op
//use QPS: 24749412 QPS/s
//macos:
//---- bench_pool stdout ----
// use Time: 6.373708ms ,each:63 ns/op
// use QPS: 15683710 QPS/s

v4.5.6

Compare Source

v4.5.6

  • move IntoSql trait to rbatis-codegen
  • rbatis-codegen fix many bug
  • rbatis-codegen add impl_numeric_bitand! { op_bit_and_u64[u8 u16 u32 u64] -> u64 op_bit_and_i64[i8 i16 i32 i64 isize] -> i64 } and impl_numeric_bitor! { op_bit_or_u64[u8 u16 u32 u64] -> u64 op_bit_or_i64[i8 i16 i32 i64 isize] -> i64 }
  • add many test for html-sql
    just like
<select id="test_binary">
 `${id + 1},${id - 1},${id * 1},${id / 1},${id % 1},${id & 1},${id | 1},${id == 1},${id < 1},${id <= 1},${id != 1},${id >= 1},${id > 1},${id ^ 1},${b && true},${b || true}`
</select>

v4.5.5

Compare Source

v4.5.5

  • add DefaultPool
    pub use rbdc_pool_mobc::MobcPool as DefaultPool;

v4.5.4

Compare Source

v4.5.4

  • add sync method for rbatis
    create table if not exists, add column if not exists

    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;
    }
    use rbatis::RBatis;
    use rbatis::table_sync::{SqliteTableMapper};
    
    #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
    pub struct User{
      pub id:String,
      pub name: Option<String>
    }
    
     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;
    }
    use rbatis::RBatis;
    use rbatis::table_sync::{MysqlTableMapper};
    
    #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
    pub struct User{
      pub id:String,
      pub name: Option<String>
    }
    
     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

Compare Source

v4.5.3

v4.5.2

Compare Source

v4.5.2

  • rbatis remove rbdc fetaures
  • only driver need add features = ["tls-rustls"] or features = ["tls-native-tls"]

just like example

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

Compare Source

  • add Pool Trait, you can design your any Pool!
    for example:
#[derive(Debug)]
pub struct MobcPool {
    pub manager:ConnManager,
    pub inner: mobc::Pool<ConnManager>,
}

unsafe impl Sync for MobcPool {}
unsafe impl Send for MobcPool {}

#[async_trait]
impl Pool for MobcPool {
    fn new(manager: ConnManager) -> Result<Self,Error> where Self: Sized {
        Ok(Self {
            manager:manager.clone(),
            inner: mobc::Pool::new(manager)
        })
    }

    async fn get(&self) -> Result<Box<dyn Connection>, 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<Box<dyn Connection>, 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<Duration>) {
       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::Connection, Self::Error> {
        self.connect().await
    }

    async fn check(&self, conn: Self::Connection) -> Result<Self::Connection, Self::Error> {
        self.check( conn).await
    }
}

impl Connection for mobc::Connection<ConnManager>{
    fn get_rows(&mut self, sql: &str, params: Vec<Value>) -> BoxFuture<Result<Vec<Box<dyn Row>>, Error>> {
        self.conn.as_mut().unwrap().get_rows(sql,params)
    }

    fn exec(&mut self, sql: &str, params: Vec<Value>) -> BoxFuture<Result<ExecResult, Error>> {
        self.conn.as_mut().unwrap().exec(sql,params)
    }

    fn ping(&mut self) -> BoxFuture<Result<(), Error>> {
        self.conn.as_mut().unwrap().ping()
    }

    fn close(&mut self) -> BoxFuture<Result<(), Error>> {
        self.conn.as_mut().unwrap().close()
    }
}
  • use MobcPool
   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, SqliteConnectOptions, MobcPool>(SqliteDriver{},opts);
 

v4.5.0

Compare Source

v4.5.0

  • add Pool Trait, you can design your any Pool!
    for example:
#[derive(Debug)]
pub struct MobcPool {
    pub manager:ConnManager,
    pub inner: mobc::Pool<ConnManager>,
}

unsafe impl Sync for MobcPool {}
unsafe impl Send for MobcPool {}

#[async_trait]
impl Pool for MobcPool {
    fn new(manager: ConnManager) -> Result<Self,Error> where Self: Sized {
        Ok(Self {
            manager:manager.clone(),
            inner: mobc::Pool::new(manager)
        })
    }

    async fn get(&self) -> Result<Box<dyn Connection>, 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<Box<dyn Connection>, 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<Duration>) {
       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::Connection, Self::Error> {
        self.connect().await
    }

    async fn check(&self, conn: Self::Connection) -> Result<Self::Connection, Self::Error> {
        self.check( conn).await
    }
}

impl Connection for mobc::Connection<ConnManager>{
    fn get_rows(&mut self, sql: &str, params: Vec<Value>) -> BoxFuture<Result<Vec<Box<dyn Row>>, Error>> {
        self.conn.as_mut().unwrap().get_rows(sql,params)
    }

    fn exec(&mut self, sql: &str, params: Vec<Value>) -> BoxFuture<Result<ExecResult, Error>> {
        self.conn.as_mut().unwrap().exec(sql,params)
    }

    fn ping(&mut self) -> BoxFuture<Result<(), Error>> {
        self.conn.as_mut().unwrap().ping()
    }

    fn close(&mut self) -> BoxFuture<Result<(), Error>> {
        self.conn.as_mut().unwrap().close()
    }
}
  • use MobcPool
   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, SqliteConnectOptions, MobcPool>(SqliteDriver{},opts);
 

v4.4.21

Compare Source

v4.4.21

  • support get intercept
    for example:
   use std::sync::Arc;
    use async_trait::async_trait;
    use rbatis::RBatis;
    use rbatis::intercept::{Intercept};

    #[derive(Debug)]
    pub struct MockIntercept {
    }
    #[async_trait]
    impl Intercept for MockIntercept {
    }
let mut rb = RBatis::new();
rb.set_intercepts(vec![Arc::new(MockIntercept{})]);
let intercept = rb.get_intercept::<MockIntercept>();

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.


  • If you want to rebase/retry this PR, check this box

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

@renovate renovate bot changed the title Update Rust crate rbatis to 4.5.4 Update Rust crate rbatis to 4.5.5 Nov 29, 2023
@renovate renovate bot changed the title Update Rust crate rbatis to 4.5.5 Update Rust crate rbatis to 4.5.6 Nov 30, 2023
@renovate renovate bot changed the title Update Rust crate rbatis to 4.5.6 fix(deps): update rust crate rbatis to 4.5.6 Dec 19, 2023
@renovate renovate bot changed the title fix(deps): update rust crate rbatis to 4.5.6 fix(deps): update rust crate rbatis to 4.5.7 Dec 26, 2023
@renovate renovate bot changed the title fix(deps): update rust crate rbatis to 4.5.7 fix(deps): update rust crate rbatis to 4.5.8 Dec 30, 2023
@renovate renovate bot changed the title fix(deps): update rust crate rbatis to 4.5.8 fix(deps): update rust crate rbatis to 4.5.10 Dec 30, 2023
@renovate renovate bot changed the title fix(deps): update rust crate rbatis to 4.5.10 fix(deps): update rust crate rbatis to 4.5.11 Jan 7, 2024
@renovate renovate bot changed the title fix(deps): update rust crate rbatis to 4.5.11 fix(deps): update rust crate rbatis to 4.5.12 Jan 31, 2024
@renovate renovate bot changed the title fix(deps): update rust crate rbatis to 4.5.12 fix(deps): update rust crate rbatis to 4.5.13 Feb 1, 2024
@renovate renovate bot changed the title fix(deps): update rust crate rbatis to 4.5.13 fix(deps): update rust crate rbatis to 4.5.14 Feb 22, 2024
@renovate renovate bot changed the title fix(deps): update rust crate rbatis to 4.5.14 fix(deps): update rust crate rbatis to 4.5.15 Feb 26, 2024
@renovate renovate bot changed the title fix(deps): update rust crate rbatis to 4.5.15 fix(deps): update rust crate rbatis to 4.5.18 Mar 2, 2024
@renovate renovate bot force-pushed the renovate/rbatis-4.x branch 2 times, most recently from 3203bfc to d626f73 Compare March 7, 2024 19:52
@renovate renovate bot changed the title fix(deps): update rust crate rbatis to 4.5.18 fix(deps): update rust crate rbatis to 4.5.19 Mar 7, 2024
@renovate renovate bot changed the title fix(deps): update rust crate rbatis to 4.5.19 fix(deps): update rust crate rbatis to 4.5.20 Mar 14, 2024
@renovate renovate bot changed the title fix(deps): update rust crate rbatis to 4.5.20 fix(deps): update rust crate rbatis to 4.5.21 Mar 14, 2024
@renovate renovate bot changed the title fix(deps): update rust crate rbatis to 4.5.21 fix(deps): update rust crate rbatis to 4.5.21 - autoclosed Mar 17, 2024
@renovate renovate bot closed this Mar 17, 2024
@renovate renovate bot deleted the renovate/rbatis-4.x branch March 17, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants