Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isAutoIncrement in WCDB.Swift #772

Open
wkmeow opened this issue Oct 27, 2020 · 2 comments
Open

isAutoIncrement in WCDB.Swift #772

wkmeow opened this issue Oct 27, 2020 · 2 comments
Labels

Comments

@wkmeow
Copy link

wkmeow commented Oct 27, 2020

The language of WCDB

e.g. Objective-C, Swift or Java

Swift

The version of WCDB

e.g. v1.0.5
WCDB.Swift

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?

Post the outputs or screenshots for errors.

Explain what you want by example or code in English.

when I set var isAutoIncrement: Bool { return true } for struct model , and debugPrint the lasetInserRowId is aways Option(0), dose it only support class model?

@wkmeow
Copy link
Author

wkmeow commented Oct 27, 2020

我给结构体Model 设置了自增属性,var isAutoIncrement: Bool { return true },以及var lastInsertedRowID: Int64 = 0,但是打印出来的内容,一直为Option(0),如果不定义后者的话,打印出来的是一串未定义的数字,比如(-9223372036854775808)

@Shin1122
Copy link

我给结构体Model 设置了自增属性,var isAutoIncrement: Bool { return true },以及var lastInsertedRowID: Int64 = 0,但是打印出来的内容,一直为Option(0),如果不定义后者的话,打印出来的是一串未定义的数字,比如(-9223372036854775808)

我刚开了个新项目,也是这问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants