litesuits / android-lite-orm

LiteOrm is a fast, small, powerful ORM framework for Android. LiteOrm makes you do CRUD operarions on SQLite database with a sigle line of code efficiently.
http://litesuits.com?form=gorm
Apache License 2.0
1.49k stars 361 forks source link

save与insert的区别是什么? #39

Closed yihaimen closed 7 years ago

yihaimen commented 8 years ago

我理解的是前者会判断主键是否存在,若存在进行数据更新,不存在则进行数据插入;后者判断主键存在,则不作处理,返回错误。

litesuits commented 7 years ago

insert是插入。save是有则更新,无则插入