mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-29 04:24:21 +00:00
Failing test for #1357
This commit is contained in:
1 parent
c7ee12eff7
commit
81eb6b128f
1 file changed
+15
@@ -136,6 +136,21 @@ class QueryInterfaceRequestTests: GRDBTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
// Regression test for <https://github.com/groue/GRDB.swift/issues/1357>
|
||||
func testIssue1357() throws {
|
||||
let dbQueue = try makeDatabaseQueue()
|
||||
try dbQueue.inDatabase { db in
|
||||
let request = tableRequest
|
||||
.annotated(with: Column("name").forKey("alt"))
|
||||
.filter(Column("alt").detached)
|
||||
|
||||
XCTAssertEqual(try request.fetchCount(db), 0)
|
||||
XCTAssertEqual(lastSQLQuery, """
|
||||
SELECT COUNT(*) FROM (SELECT *, "name" AS "alt" FROM "readers" WHERE "alt")
|
||||
""")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Select
|
||||
|
||||
|
||||
Reference in new issue
Block a user