FMDB: Does calling a method to make a query in the

2019-09-14 16:54发布

I'm trying to remove some database records, and I have a wrapper class around my FMDB class. What I'm wondering, is if I can call this class method from the inDatabase block?

[_dbQueue inDatabase:^(FMDatabase *db) {
    // Do some magic here to get 1234
    [myObject deleteWithId:1234]; // This calls executeUpdate:@"DELETE..."
}];

标签: fmdb
1条回答
Animai°情兽
2楼-- · 2019-09-14 17:51

If you're using the latest FMDB, it should crash on you (if your other method is using inDatabase: as well). Recursive inDatabase: calls aren't advised.

查看更多
登录 后发表回答