wcdb icon indicating copy to clipboard operation
wcdb copied to clipboard

偶现的在调用isTableExists方法时,崩溃。

Open JabberYQ opened this issue 3 years ago • 1 comments

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方法时,崩溃。

WechatIMG57786

JabberYQ avatar Oct 28 '21 08:10 JabberYQ

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];
}

JabberYQ avatar Oct 28 '21 08:10 JabberYQ

Please use WCDB 2.0 and see if there is still this problem.

Qiuwen-chen avatar Apr 26 '23 07:04 Qiuwen-chen