Tencent / wcdb

WCDB is a cross-platform database framework developed by WeChat.
Other
10.83k stars 1.41k forks source link

插入一条数据后,怎么直接返回这条数据的本地数据库id,当前的- (BOOL)insertObject:(WCTObject *)object,返回bool类型的,而无法直接获取id。 #780

Closed ZhangXueFei closed 3 years ago

ZhangXueFei commented 3 years ago

The language of WCDB

e.g. Objective-C, Swift or Java

The version of WCDB

e.g. v1.0.5

The platform of WCDB

e.g. iOS, macOS or Android

The installation of WCDB

e.g. Cocoapods, Carthage, Maven, AAR Package or Git clone

What's the issue?

Post the outputs or screenshots for errors.

Explain what you want by example or code in English.

atomsongxiangwu commented 3 years ago

执行完插入操作之后,访问lastInsertedRowID就可以了