Open bogcon opened 1 month ago
This update adds support for ConnectionAttributes
in the FormatDSN
method of the Config
struct within the MySQL driver. It enhances the functionality by allowing connection attributes to be included in the Data Source Name (DSN), improving database configuration options. Additionally, the AUTHORS
file has been updated to include a new contributor, and test coverage for the DSN parsing has been expanded.
Files | Change Summary |
---|---|
AUTHORS |
Added Bogdan Constantinescu as a contributor. |
dsn.go , dsn_test.go |
Enhanced FormatDSN to include ConnectionAttributes . Added new test cases to ensure proper handling of connection attributes and invalid formats. |
sequenceDiagram
participant User
participant Config
participant DSNBuilder
User->>Config: Create DSN with ConnectionAttributes
Config->>DSNBuilder: FormatDSN()
alt ConnectionAttributes present
DSNBuilder->>DSNBuilder: Append connectionAttributes to DSN
end
DSNBuilder->>User: Return formatted DSN
Objective | Addressed | Explanation |
---|---|---|
ConnectionAttributes included in FormatDSN (#1618) | ✅ | |
Maintain existing DSN format with attributes | ✅ |
🐰 In fields of code, where logic hops wide,
New attributes dance, with data as guide.
Contributors join, a new name to cheer,
Together we build, with each line sincere!
💻✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Description
Took into account
ConnectionAttributes
config, if set, inFormatDSN
Fixes https://github.com/go-sql-driver/mysql/issues/1618Checklist
Summary by CodeRabbit
New Features
Documentation
AUTHORS
file to acknowledge Bogdan Constantinescu as a contributor.