Crate mysql_quick

Source

Macros§

mycount
计数 ,返回 sql 语句,参数同 find 类似。
mydel
1.通过id,删除数据,返回 sql 语句。
mydelmany
批量删除数据,返回 sql 语句
myfind
查寻数据,返回 sql 语句
myget
获取一条数据,返回 sql 语句
myset
新增数据 ,返回 sql 语句。
mysetmany
批量新增数据 ,返回 sql 语句。
myupdate
1.通过id,更新数据 ,返回 sql 语句。
myupdatemany
批量更新数据 ,返回 sql 语句。

Structs§

MysqlQuick
MysqlQuickCount
PooledConn
Pooled mysql connection.
Regex
A compiled regular expression for searching Unicode haystacks.
Sql
Sql(String),会将 String 识别为 sql 语句,而不是参数值
Transaction
TxOpts
MySql transaction options.

Enums§

Value
Represents any valid JSON value.

Constants§

MY_EXCLUSIVE_LOCK
悲观锁,用于抢单什么的
MY_SHARED_LOCK
常用的 mysql 锁类型。直接加在 sql 语句后面

Traits§

AsStatement
Something, that eventually is a Statement in the context of a T: Queryable.
BatchQuery
Helper trait for batch statement execution.
BinQuery
MySql prepared statement query.
ColumnIndex
Things that may be used as an index of a row column.
FromRow
Trait to convert Row into a tuple of FromValue implementors up to arity 12.
FromValue
Implement this trait to convert a value to some type.
Protocol
Trait for protocol markers crate::Binary and crate::Text.
Queryable
Queryable object.
TextQuery
MySql text query.
ToValue
WithParams
Helper, that constructs QueryWithParams.

Functions§

from_str
Deserialize an instance of type T from a string of JSON text.
my_run_drop
运行sql语句,返回最近一条语句的数据 id,如果上没有,则返回0 用于:myset、mydel、mysetmany、myupdate、myupdatemany
my_run_tran_drop
事务执行
my_run_tran_vec
事务执行
my_run_vec
运行sql语句,返回结果列表
to_string
Serialize the given data structure as a String of JSON.

Derive Macros§

FromRow
Derives FromRow. See mysql_common crate-level docs for more info.
FromValue
Derives FromValue. See mysql_common crate-level docs for more info.