Thanks to visit codestin.com
Credit goes to github.com

Skip to content

wcdbswift Date类型比较大小会出错,导致数据重复 #1304

@lvzhehappy111

Description

@lvzhehappy111

在where中用Date类型去比较大小,发现会出错,查询出现了之前的数据,导致数据重复
timestamp和lastId是Date类型
msgs = try db.getObjects(fromTable: "Message",where: MessageDB.Properties.conversationId == conversationId && MessageDB.Properties.timestamp < lastId!,orderBy: [MessageDB.Properties.timestamp.order(.descending)],limit: 5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions