Skip to content

Commit 9cce39d

Browse files
committed
Document 'tableName'
1 parent bfca5f2 commit 9cce39d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Sources/Basics/SQLiteBackedCache.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ public final class SQLiteBackedCache<Value: Codable>: Closable {
2929
private let jsonEncoder: JSONEncoder
3030
private let jsonDecoder: JSONDecoder
3131

32+
/// Creates a SQLite-backed cache.
33+
///
34+
/// - Parameters:
35+
/// - tableName: The SQLite table name. Must follow SQLite naming rules (e.g., no spaces).
36+
/// - location: SQLite.Location
37+
/// - configuration: Optional. Configuration for the cache.
38+
/// - diagnosticsEngine: DiagnosticsEngine
3239
public init(tableName: String, location: SQLite.Location, configuration: SQLiteBackedCacheConfiguration = .init(), diagnosticsEngine: DiagnosticsEngine? = nil) {
3340
self.tableName = tableName
3441
self.location = location
@@ -44,6 +51,13 @@ public final class SQLiteBackedCache<Value: Codable>: Closable {
4451
self.jsonDecoder = JSONDecoder.makeWithDefaults()
4552
}
4653

54+
/// Creates a SQLite-backed cache.
55+
///
56+
/// - Parameters:
57+
/// - tableName: The SQLite table name. Must follow SQLite naming rules (e.g., no spaces).
58+
/// - path: The path of the SQLite database.
59+
/// - configuration: Optional. Configuration for the cache.
60+
/// - diagnosticsEngine: DiagnosticsEngine
4761
public convenience init(tableName: String, path: AbsolutePath, configuration: SQLiteBackedCacheConfiguration = .init(), diagnosticsEngine: DiagnosticsEngine? = nil) {
4862
self.init(tableName: tableName, location: .path(path), configuration: configuration, diagnosticsEngine: diagnosticsEngine)
4963
}

0 commit comments

Comments
 (0)