nitrictech / nitric

Nitric is a multi-language framework for cloud applications with infrastructure from code.
https://nitric.io
Apache License 2.0
861 stars 43 forks source link

feat: RDS Support #606

Closed tjholm closed 3 weeks ago

tjholm commented 2 months ago

WIP Proposal for SQL Database support as a nitric resource.

davemooreuws commented 2 months ago

@tjholm

Wondering if we need more than just the connection string for libraries that don't support it? Such as a DSN string with gorm etc. Perhaps add all the database connection variables so that the end user could format and build a string with them?

tjholm commented 2 months ago

@tjholm

Wondering if we need more than just the connection string for libraries that don't support it? Such as a DSN string with gorm etc. Perhaps add all the database connection variables so that the end user could format and build a string with them?

Its a possiblity, to address GORM as a specific use case, it looks like standard connection strings are also supported (it used pgx parsing under the hood: https://github.com/jackc/pgx/blob/60a01d044a5b3f65b9eea866954fdeea1e7d3f00/pgconn/config.go#L233-L248).

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 49.25%. Comparing base (5cd5cfe) to head (50891ea). Report is 1 commits behind head on main.

:exclamation: Current head 50891ea differs from pull request most recent head 79747a0. Consider uploading reports for the commit 79747a0 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #606 +/- ## ========================================== + Coverage 49.24% 49.25% +0.01% ========================================== Files 23 23 Lines 3229 3230 +1 ========================================== + Hits 1590 1591 +1 Misses 1535 1535 Partials 104 104 ``` | [Flag](https://app.codecov.io/gh/nitrictech/nitric/pull/606/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nitrictech) | Coverage Δ | | |---|---|---| | [aws](https://app.codecov.io/gh/nitrictech/nitric/pull/606/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nitrictech) | `43.75% <ø> (ø)` | | | [azure](https://app.codecov.io/gh/nitrictech/nitric/pull/606/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nitrictech) | `53.29% <ø> (ø)` | | | [core](https://app.codecov.io/gh/nitrictech/nitric/pull/606/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nitrictech) | `78.97% <100.00%> (+0.09%)` | :arrow_up: | | [gcp](https://app.codecov.io/gh/nitrictech/nitric/pull/606/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nitrictech) | `47.17% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nitrictech#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.