Repository navigation
feat(database): support creating database configs from a URL - #2315
boydbloemsma wants to merge 2 commits into
Conversation
Benchmark ResultsComparison of Open to see the benchmark results
Generated by phpbench against commit 7c9fd7e |
aidan-casey
left a comment
There was a problem hiding this comment.
Hey, @boydbloemsma! Thanks for taking this on, I appreciate your work on this.
First, I would recommend we rename this to DatabaseConnectionString, which is the term typically used for this string.
Second (and this is technically a limitation of the existing implementation as well), we need to allow for query parameters within the DSN such as connect_timeout, keepalives, sslmode, etc.
Third, I'd like to see a test case with a Unix socket in the DSN added to this.
Finally, I'd suggest we make this a true value object with methods such as getHost, etc. I'm not sure we should perform the actual validation on the scheme within the VO vs. the config itself.
|
Agree with Aidan's feedback expect for the getters. Don't add getters but use public readable properties |
|
Thanks for the feedback guys! |
Fixes #2310