Crate mysql_quick

source ·

Macros

  • 计数 ,返回 sql 语句,参数同 find 类似。
  • 通过id,删除数据 ,返回 sql 语句。
  • 查寻数据,返回sql
  • 获取一条数据,一定要记录传select的字段且不能为*
  • 新增数据 ,返回 sql 语句。 下面示例中,user 为表名,,name、num 为字段名,,后面为新增的值。
  • 批量新增数据 ,返回 sql 语句。 下面示例中,user 为表名,,name、num 为字段名,,后面为新增的值。
  • 1.通过id,更新数据 ,返回 sql 语句。
  • 1.单个条件,批量更新数据 ,返回 sql 语句。

Structs

Constants

Traits

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

Functions

  • 运行sql语句,返回最近一条语句的数据id,如果上没有,则返回0,用于set返回对应的id。 其他方法mydel、mysetmany、myupdate,则不用管这个id。
  • 事务执行
  • 事务执行
  • 运行sql语句,返回想要的结果

Derive Macros

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