[objective-c]EGODatabase #4 データ取得

EGODatabase*db=[EGODatabase databaseWithPath:[NSHomeDirectory() stringByAppendingPathComponent:@"Documents/database.db"]];
NSString*sql=@"SELECT * FROM tableName WHERE no=1 ORDER BY id;"
EGODatabaseResult*result=[db executeQuery:sql];
if (result.errorCode) {//failed
    return;
}
NSMutableArray*list=[NSMutableArray arrayWithCapacity:[result count]];
for (EGODatabaseRow*row in result) {
    [list addObject:[row stringForColumn:@"name"]];
}

参考サイト
enormego/egodatabase · GitHub
https://github.com/enormego/egodatabase