wcdb
wcdb copied to clipboard
偶现的在调用isTableExists方法时,崩溃。
The language of WCDB
e.g. Objective-C, Swift or Java
Objective-C
The version of WCDB
e.g. v1.0.5
1.0.8.6
The platform of WCDB
e.g. iOS, macOS or Android
iOS
The installation of WCDB
e.g. Cocoapods, Carthage, Maven, AAR Package or Git clone
Cocoapods
What's the issue?
偶现的在调用isTableExists方法时,崩溃。
db的初始化:
NSString *dbPath = [NSString stringWithFormat:@"%@/user_%@_db.sqlite", [NMYFileManager appDataDocumentDir],self.currentId];
self.currentDB = [[WCTDatabase alloc] initWithPath:dbPath];
判断表是否存在的代码:
+ (NSString *)tableName {
return @"NMYSessionUserModel";
}
+ (BOOL)exsitTable {
return [NMYDBStorage.share.dataBase isTableExists:NMYSessionUserModel.tableName];
}
Please use WCDB 2.0 and see if there is still this problem.