vapor / fluent-kit

Swift ORM (queries, models, and relations) for NoSQL and SQL databases
MIT License
217 stars 116 forks source link

Fix return type to non optional of Databases.database() #541

Closed sidepelican closed 9 months ago

sidepelican commented 1 year ago

Databases.database(...) is specified to return Database? but it never returns nil so this PR fixes the signature.

gwynne commented 9 months ago

I wish we could make this change, truly I do - this annoying inconsistency is the result of @tanner0101 not updating the API's return type when he changed the implementation all the way back in Fluent 4 beta 5. Unfortunately, changing this would break public API 🙁.