Skip to content

Commit 325cf48

Browse files
committed
public NoopConnection
1 parent c642439 commit 325cf48

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

Sources/Otter/Connection.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@ public protocol Connection: Sendable {
2323
}
2424

2525
/// A no operation database connection that does nothing.
26-
struct NoopConnection: Connection {
27-
func observe(subscriber: any DatabaseSubscriber) {}
28-
func cancel(subscriber: any DatabaseSubscriber) {}
26+
public struct NoopConnection: Connection {
27+
public init() {}
2928

30-
func begin<Output>(
29+
public func observe(subscriber: any DatabaseSubscriber) {}
30+
31+
public func cancel(subscriber: any DatabaseSubscriber) {}
32+
33+
public func begin<Output>(
3134
_ kind: Transaction.Kind,
3235
execute: @Sendable (borrowing Transaction) throws -> Output
3336
) async throws -> Output {

0 commit comments

Comments
 (0)