SCDB
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
Installation
SCDB is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SCDB'
Start
As long as three steps:
1.Create table
2.Insert models
3.Read object
/*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);
}
If you want see the API run,downlod this poriect and run 'Tests'
Author
scshichuan, [email protected]
License
SCDB is available under the MIT license. See the LICENSE file for more info.