Closed danielmatzke closed 3 years ago
Note that the code works fine, when replacing the line
.select(distinct: self.table[*])
with explicit column names
.select(distinct: self.table[self.id], self.table[self.name], self.table[self.fileName],
self.table[self.latitude], self.table[self.longitude], self.table[self.recommendedMapZoomLevel],
self.table[self.countryId], self.table[self.regionId])
(where self.id
equals Expression<String>("id")
and so on)
does this still apply to 0.13.0? If yes, please reopen
Hello,
after upgrading a project to the latest version of Swift and SQLite.swift, several test cases in the app failed. Having a closer look into it I see identical code behaves different with different versions of SQLite, where the newer version throws an exception. I suspect that this problem is related to SQLite.swift itself. While I cannot publish the entire project, here are logs from the app before and after upgrading.
This test code is identical for both versions, however the behaviour is different:
Here is the output from the swift-2.3 version (a):
Here is the test output from the master version (b) ::
The exception is thrown when query3 is executed, which adds the part
.select(distinct: table[*])
. As far as I see it, the output of query2 is identical (except for GUIDs and column ordering). Therefore I suspect that this issue is related to the upgrade in SQLite.Build Information
Include the SQLite.swift version, commit or branch experiencing the issue. a) branch swift-2.3, commit 8b95a0c4a884f35e5102cd306f634680255473bb b) branch master, commit c052d4153b617d6f16d26ac5b924afe0a6dd5874
Mention Xcode and OS X versions affected. a) Xcode Version 8.2.1 (8C1002) b) Xcode Version 9.1 (9B55)
How do do you integrate SQLite.swift in your project? Carthage (MacOS target) OS: MacOS 10.13.1