美文网首页
MyBatis的Mapper接口以及Example的实例函数及详

MyBatis的Mapper接口以及Example的实例函数及详

作者: 喵喵不吃鱼哦 | 来源:发表于2020-09-15 20:27 被阅读0次

方法 功能说明
int countByExample(UserExample example) thorws SQLException 按条件计数
int deleteByPrimaryKey(Integer id) thorws SQLException 按主键删除
int deleteByExample(UserExample example) thorws SQLException 按条件查询
String/Integer insert(User record) thorws SQLException 插入数据(返回值为ID)
User selectByPrimaryKey(Integer id) thorws SQLException 按主键查询
ListselectByExample(UserExample example) thorws SQLException 按条件查询
ListselectByExampleWithBLOGs(UserExample example) thorws SQLException 按条件查询(包括BLOB字段)。只有当数据表中的字段类型有为二进制的才会产生。
int updateByPrimaryKey(User record) thorws SQLException 按主键更新
int updateByPrimaryKeySelective(User record) thorws SQLException 按主键更新值不为null的字段
int updateByExample(User record, UserExample example) thorws SQLException 按条件更新
int updateByExampleSelective(User record, UserExample example) thorws SQLException 按条件更新值不为null的字段
————————————————
版权声明:本文为CSDN博主「biandous」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/biandous/article/details/65630783

相关文章

网友评论

      本文标题:MyBatis的Mapper接口以及Example的实例函数及详

      本文链接:https://www.haomeiwen.com/subject/jpzlghtx.html