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

将 String 和 Number 接口都合并到 Object 中 #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

xserver
Copy link

@xserver xserver commented Oct 24, 2014

1、在表中添加 type 字段记录类型;
2、putObject 判断类型,都抽象为 String 入库;
3、取出时,判断type,转换为相应类型;

将 String 和 Number 接口都合并到 Object 中。
1、在表中添加 type 字段记录类型;
2、putObject 判断类型,都抽象为 String 入库;
3、取出时,判断type,转换为相应类型
@tangqiaoboy
Copy link
Member

@xserver 抱歉回复晚了,你的这个pull request我当时看了后很犹豫,所以一直没有想好是否应该merge过来。,我认为你的这种写法是有一些好处的。如果是新应用这么写还是不错的。但主要的问题是,你的这个存储方案改了存储逻辑,那么会造成历史数据无法读取,而我们的线上应用都依赖了这个库,如果我接受这个pull request,我需要另外写相关的数据转换逻辑。否则用户的历史数据都丢了,这是不可接受的。

所以我可能现在无法merge你的请求。非常抱歉。。。。

另外提个小意见,不要的代码可以直接删掉,不用注释掉,注释掉还是挺不干净的。

@xserver
Copy link
Author

xserver commented Nov 6, 2014

@tangqiaoboy 的确如此,Good Luck.

刚玩 Git ,貌似有历史对比功能,删掉的确比较好。Cool. thank you.

@boydc2014
Copy link

支持合并的建议,现在的接口putObject和putString等不是一个level的,可以做一个release版本保存现有状态,新版用合并后的接口

@sgxiang
Copy link

sgxiang commented Jan 8, 2015

@xserver @tangqiaoboy @boydc2014 我在swift版中在保留数据库结构的情况下对string和number接口进行了整合,可以看一下:
https://github.com/sgxiang/YTKKeyValueStore_Swift

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

Successfully merging this pull request may close these issues.

None yet

4 participants