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

个人对JKDB数组,float double 封装 #48

Open
RobHuang92 opened this issue Mar 13, 2017 · 6 comments
Open

个人对JKDB数组,float double 封装 #48

RobHuang92 opened this issue Mar 13, 2017 · 6 comments

Comments

@RobHuang92
Copy link

RobHuang92 commented Mar 13, 2017

radish322.zip

用JKDB也有段时间,感谢JOKER的开源对初学者有很大的帮助。这个是我基于JKDB封装了一层。项目时间太赶,做的是相当相当的粗糙,本人数据库方面的只是也很薄弱(数据渣)。希望JOKER大大和广大爱好者能给一些意见、
1、基于 getPropertys 方法,增加获取数组类,存储为blob类型
2、save的方法增加对数组,和可变数组的 归档,转为data
3、findAll 和 findByCriteria 增加 对数组,int类型,float double类型的判断。
-------3、22------
感谢zeqinjie的提醒,修改 isEqualToString 为 hasPrefix

@zeqinjie
Copy link

zeqinjie commented Mar 15, 2017

发现 float 取出还是长整形。。isEqualToString 应该改成hasPrefix 才对 因为打印propertyType的值是Td,N,V_money
if ([propertyType isEqualToString:@"TF"] || [propertyType isEqualToString:@"Tf"] ||
[propertyType isEqualToString:@"TD"] || [propertyType isEqualToString:@"Td"]) {
//float double
[model setValue:[NSNumber numberWithDouble:[resultSet doubleForColumn:columeName]] forKey:columeName];
}
else{
//long long
[model setValue:[NSNumber numberWithLongLong:[resultSet longLongIntForColumn:columeName]] forKey:columeName];
}

@RobHuang92
Copy link
Author

@zeqinjie 有道理,我改下,把isEqualToString改成 hasPrefix。

@JLLJHD
Copy link

JLLJHD commented May 19, 2017

可变数组没办法存怎么解决啊

@Haley-Wong
Copy link
Owner

Haley-Wong commented May 20, 2017 via email

@RobHuang92
Copy link
Author

JKDB 大大不研究这块存储了吗。其实可以在完善下的。

@huangzhibiao
Copy link

github搜BGFMDB

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

5 participants