github rbatis/rbatis v1.8.62

latest releases: v4.5.36, v4.5.34, v4.5.33...
3 years ago

v1.8.62

  • fix use package error, use 'std::fmt::*' replace 'serde::fmt'
  • fix Postgres TIMESTAMPTZ to decode into rust chrono::DateTime<Utc>
  • add save_by_wrapper
  • support use 'table_name' format arg to change table's name for *by_wrapper method
    for example:
    #[async_std::test]
    pub async fn test_intercept() {
        fast_log::init_log("requests.log", 1000, log::Level::Info, None, true);
        let rb = Rbatis::new();
        rb.link("mysql://root:123456@localhost:3306/test").await.unwrap();
        let mut w = rb.new_wrapper()
            .eq("id", "1")
            .check().unwrap();
        w.formats.insert("table_name".to_string(),"new_table".to_string());
        let r: Result<Option<BizActivity>, Error> = rb.fetch_by_wrapper("", &w).await;
    }                          
 SELECT id,name,pc_link,h5_link,pc_banner_img,h5_banner_img,sort,status,remark,create_time,version,delete_flag FROM new_table WHERE id = ?

Don't miss a new rbatis release

NewReleases is sending notifications on new releases.