Skip to content

Commit c4cf9ef

Browse files
committed
document UnidocDatabase.package(named:with:) and realm(named:with:)
1 parent 005c259 commit c4cf9ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/UnidocQueries/UnidocDatabase (ext).swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import UnidocRecords
55

66
extension UnidocDatabase
77
{
8+
/// Load the metadata for a package by name. The returned package might have a different
9+
/// canonical name than the one provided.
810
public
911
func package(named symbol:Symbol.Package,
1012
with session:Mongo.Session) async throws -> Unidoc.PackageMetadata?
@@ -13,6 +15,8 @@ extension UnidocDatabase
1315
query: Unidoc.AliasResolutionQuery<PackageAliases, Packages>.init(symbol: symbol),
1416
with: session)
1517
}
18+
/// Load the metadata for a realm by name. The returned realm might have a different
19+
/// canonical name than the one provided.
1620
public
1721
func realm(named symbol:String,
1822
with session:Mongo.Session) async throws -> Unidoc.RealmMetadata?

0 commit comments

Comments
 (0)