To run the example project, clone the repo, and run pod install
from the Example directory first.
SCDB is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SCDB'
As long as three steps:
/*SCDB Example*/
Model *model = [[Model alloc] init];
model.name = @"石川";
model.age = 30;
NSArray *array;
//1. creat a table for this model
[SCdb CreateTableWithClass:[Model class]];
//2. insert oc object to table
[SCdb insertModes:@[model]];
//3. read oc object in table
array = [SCdb selectClass:[Model class] andProperty:@"name" andWhere:Nil];
for (Model *model in array) {
NSLog(@"[name:%@,heigit:%ld]",model.name,(long)model.age);
}
scshichuan, [email protected]
SCDB is available under the MIT license. See the LICENSE file for more info.