Crate mybatis Copy item path Source pub extern crate mybatis_macro ;
pub extern crate mybatis_sql ;
pub use crate::mybatis::AsSqlTag ;
pub use mybatis_core as core;
convert db decode Types and traits for decoding values from the database. error Errorand Result types. executor intercept log logic_delete mybatis object_id ObjectId page plus results snowflake types value wrapper push_index sql_index to_bson_macro Bool Mybatis Bool
for example:
let b = Bool::from(true);
let b = Bool::from(“true”);
let b = Bool::from(1); Bytes Mybatis Bytes DateNative Rust type Postgres type(s)
chrono::NaiveDate DATE DateTimeNative Mybatis DateTime DateTimeUtc Mybatis DateTime Utc DateUtc Decimal Mybatis Decimal Json Json TimeNative TimeLocal
Rust type Postgres type(s)
chrono::NaiveTime TIME TimeUtc Timestamp Mybatis Timestamp
Rust type Postgres type(s)
time::PrimitiveDateTime TIMESTAMP
time::OffsetDateTime TIMESTAMPTZ TimestampZ Mybatis Timestamp
Rust type Postgres type(s)
time::OffsetDateTime TIMESTAMPTZ Uuid Uuid DriverType Error A generic error that represents all the ways a method can fail inside of mybatis::core. BINARY_SUBTYPE_JSON Add AsProxy convert Value to Value AsSql BitAnd BitOr BitXor Div Format From Mul Not OpsIndex OpsIndexMut PartialEq PartialOrd Rem StmtConvert the stmt replace str convert Sub as_timestamp Result A specialized Result
type for mybatis::core. Value proxy rbson::Document struct,support Deserializer, Serializer
use Cow Optimize unnecessary clones
This structure has a certain amount of computing power expr html mybatis_html html sql create macro,this macro use RB.py_fetch and RB.py_exec
for example: mybatis_plus Mybatis Plus,You can define functionality using the following properties
#[mybatis_plus]
#[mybatis_plus(table_name:“biz_activity”)]
#[mybatis_plus(table_name:“biz_activity” | table_columns:“id,name,version,delete_flag” | formats_pg:“id:{}::uuid,name:{}::string”)]
pub struct BizActivity {
pub id: Option,
pub name: Option,
pub version: Option,
pub delete_flag: Option,
} mybatis_sql auto create sql macro,this macro use Mybatis.fetch_prepare and Mybatis.exec_prepare
for example:
pub static Mybatis:Lazy = Lazy::new(||Mybatis::new());
#[mybatis_sql(Mybatis, “select * from biz_activity where id = ?”)]
async fn select(name: &str) -> BizActivity {} py support py_sql fn convert py_sql py sql create macro,this macro use RB.py_fetch and RB.py_exec MybatisPlus