Skip to content

Commit c1ad2fc

Browse files
committed
relations test passing
1 parent e79903b commit c1ad2fc

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extension PostgreSQLDatabase: JoinSupporting { }
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import Async
2+
3+
extension PostgreSQLDatabase: ReferenceSupporting {
4+
/// See `ReferenceSupporting.enableReferences(on:)`
5+
public static func enableReferences(on connection: PostgreSQLConnection) -> Future<Void> {
6+
// enabled by default
7+
return .done
8+
}
9+
10+
/// See `ReferenceSupporting.disableReferences(on:)`
11+
public static func disableReferences(on connection: PostgreSQLConnection) -> Future<Void> {
12+
return Future(
13+
error: PostgreSQLError(identifier: "disableReferences", reason: "PostgreSQL does not support disabling foreign key checks.")
14+
)
15+
}
16+
}

Tests/FluentPostgreSQLTests/FluentPostgreSQLTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ class FluentPostgreSQLTests: XCTestCase {
2121
try benchmarker.benchmarkModels_withSchema()
2222
}
2323

24-
// func testRelations() throws {
25-
// try benchmarker.benchmarkRelations_withSchema().blockingAwait(timeout: .seconds(60))
26-
// }
24+
func testRelations() throws {
25+
try benchmarker.benchmarkRelations_withSchema()
26+
}
2727

2828
func testTimestampable() throws {
2929
try benchmarker.benchmarkTimestampable_withSchema()
@@ -44,7 +44,7 @@ class FluentPostgreSQLTests: XCTestCase {
4444
static let allTests = [
4545
("testSchema", testSchema),
4646
("testModels", testModels),
47-
// ("testRelations", testRelations),
47+
("testRelations", testRelations),
4848
("testTimestampable", testTimestampable),
4949
// ("testTransactions", testTransactions),
5050
("testChunking", testChunking),

0 commit comments

Comments
 (0)