Rbatis Versions Save

Rust Compile Time ORM robustness,async, pure Rust Dynamic SQL

v4.5.22

2 weeks ago

what changes?

  • break change Intercept set return type -> Result<bool, Error> to -> Result<Option<bool>, Error>
    /// if return None will be return result
    /// if return Some(true) will be run next intercept
    /// if return Some(false) will be break

v4.5.21

2 months ago

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

2 months ago

what changes?

  • fix #498
  • RBatisConnExecutor rb_task_id use new_snowflake_id()

v4.5.19

2 months ago

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

2 months ago

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

2 months ago

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

2 months ago

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

2 months ago

what changes?

  • fix impl_select_page macro issue of failed compilation of ownership parameters

v4.5.14

2 months ago

what changes?

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

v4.5.13

3 months ago

what changes?

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