时间:2021-07-01 10:21:17 帮助过:2人阅读
@try {
for (NSString *sql in self.sqlArray) {
[[DBManager sharedDBManager].database executeUpdate:sql];
}
}
@catch (NSException *exception) {
[[DBManager sharedDBManager].database rollback];
}
@finally {
[[DBManager sharedDBManager].database commit];
[self.sqlArray removeAllObjects];
[[NSNotificationCenter defaultCenter]postNotificationName:@"updatePlan" object:nil];
}
使用FMDB事务批量存入数据
标签: