Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改某个item后,再次用getAll item 方法 ,数据的顺序会变,感觉默认按照创建时间排序比较好。 #38

Open
lifengios opened this issue Mar 10, 2017 · 1 comment

Comments

@lifengios
Copy link

No description provided.

@lifengios lifengios changed the title 修改某个item后,再次用getAll item 方法 ,数据的顺序会变,是默认更新时间排序吗 修改某个item后,再次用getAll item 方法 ,数据的顺序会变,感觉默认按照创建时间排序比较好。 Mar 10, 2017
@songqingcool
Copy link

源代码里面put操作使用的是数据库replace操作,replace操作是如果有当前主键对应的记录,先删掉记录,再创建新记录,并不是update方式的数据库更新操作。所以你的数据顺序会变。update数据库操作又需要对应主键记录存在才会更新成功,否则update数据库操作执行成功了,但是数据库并不会增加一条记录。
ps:我个人是感觉这个开源库有点鸡肋,学学sql语句,自己用FMDB实现其实也挺容易的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants