RBBusKit 1.1.10

RBBusKit 1.1.10

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最后发布2017年1月

zhikuiyu 维护。



 
依赖
FMDB~> 2.6
YYKit>= 0
 

RBBusKit 1.1.10

  • 作者
  • zhikuiyu

示例

要运行示例项目,请克隆仓库,然后在示例目录中首先运行 pod install

要求

安装

RBBusKit 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中:

pod "RBBusKit"

作者

zhikuiyu, [email protected]

许可证

RBBusKit 以 MIT 许可证提供。有关更多信息,请参阅 LICENSE 文件。

保存数据

NSMutableArray * array = [NSMutableArray new];

for(int i = 0 ; i < 1000; i ++){
RB1 * rb = [[RB1 alloc] init];
rb.aaa = i + 1000;
rb.aaaa = 10000 - i * i ;
rb.fdas = 100000 - i  ;
rb.teaa = [NSString stringWithFormat:@"teaa  %d",i];
rb.i = i ;
rb.image = [UIImage imageNamed:@"1"];
rb.data = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"11" ofType:@"p12"]]];
rb.adta = [NSDate dateWithTimeIntervalSinceNow:i % 100];
rb.f = i * i;
[array addObject:rb];
//        [rb save];
}

[RB1 save:array Param:nil];

for(int i = 0 ; i < 1000; i ++){
RB1 * rb = [array objectAtIndex:i];
NSLog(@"%@",[rb primaryValue]);
}

*/

条件查询数据


RB1 * rb1 = [[RB1 alloc] init];

RBDBParamHelper * helper = [[RBDBParamHelper alloc] initModleClass:[RB1 class]];
helper.comple(HKey(rb1.aaa)).lessThan(@(1100))
.AND().comple(HKey(rb1.aaaa)).greaterThan(@(8400))
.AND().comple(HKey(rb1.teaa)).prefix(@"teaa  1");

helper.sort(HKey(rb1.aaaa),DESC);

helper.count(5);


[RB1 selectParam:helper :^(NSArray * array) {

NSLog(@"%@",array);
}];
*/



/* 全部查询
[RB1 selectAll:^(NSArray * array) {
NSLog(@"%@",array);

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{

RB1 * rb = [array objectAtIndex:0];
rb.aaa = 0 ;
rb.aba = @(3);
rb.taa = @"111111111111111";
[rb update];
});
}];
*/