Skip to content

Commit 3916750

Browse files
visheshjzhou77
authored andcommitted
Make protocols public
The methods implemented by protocols are not public otherwise.
1 parent 703e5fd commit 3916750

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Sources/FoundationDB/FoundationdDB.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/// and transaction retry logic. Implementations handle the underlying database
2525
/// connection and resource management.
2626
/// Database interface for FoundationDB operations
27-
protocol DatabaseProtocol {
27+
public protocol DatabaseProtocol {
2828
associatedtype Transaction: TransactionProtocol
2929

3030
/// Creates a new transaction for database operations.
@@ -52,7 +52,7 @@ protocol DatabaseProtocol {
5252
/// a FoundationDB transaction, including reads, writes, atomic operations,
5353
/// and transaction management.
5454
/// Transaction interface for FoundationDB operations
55-
protocol TransactionProtocol: Sendable {
55+
public protocol TransactionProtocol: Sendable {
5656
/// Retrieves a value for the given key.
5757
///
5858
/// - Parameters:

Sources/FoundationDB/Transaction.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,9 @@ public final class FDBTransaction: TransactionProtocol, @unchecked Sendable {
230230
}
231231
}
232232

233-
func getRangeNative(
233+
public func getRangeNative(
234234
beginSelector: FDB.KeySelector, endSelector: FDB.KeySelector, limit: Int = 0,
235-
snapshot: Bool
235+
snapshot: Bool = false
236236
) async throws -> ResultRange {
237237
let future = beginSelector.key.withUnsafeBytes { beginKeyBytes in
238238
endSelector.key.withUnsafeBytes { endKeyBytes in
@@ -262,8 +262,8 @@ public final class FDBTransaction: TransactionProtocol, @unchecked Sendable {
262262
}
263263

264264

265-
func getRangeNative(
266-
beginKey: FDB.Bytes, endKey: FDB.Bytes, limit: Int = 0, snapshot: Bool
265+
public func getRangeNative(
266+
beginKey: FDB.Bytes, endKey: FDB.Bytes, limit: Int = 0, snapshot: Bool = false
267267
) async throws -> ResultRange {
268268
let future = beginKey.withUnsafeBytes { beginKeyBytes in
269269
endKey.withUnsafeBytes { endKeyBytes in

0 commit comments

Comments
 (0)