-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I found SQLite-StORM can't parser Bool value to right type, it convert to String type.
public class Team: SQLiteStORM {
var id: Int = 0
var activeState: Bool = false
override open func table() -> String {
return "team"
}
override public func to(_ this: StORMRow) {
id = this.data["id"] as? Int ?? 0
// notice
activeState = this.data["activeState"] as? Bool ?? false
}
}
Set breakpoint at activeState = this.data["activeState"] as? Int ?? 0, run lldb command
v this.data["activeState"]
Console print activeState="true", it's String type, then activeState always false.
Metadata
Metadata
Assignees
Labels
No labels