-
-
Notifications
You must be signed in to change notification settings - Fork 386
Feature: Add connection strings handling for DB providers #3105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: general-devel
Are you sure you want to change the base?
Feature: Add connection strings handling for DB providers #3105
Conversation
Allows specifying complete connection strings for SQLite, MySQL, and Postgres, overriding individual host and credential properties when specified, to provide more flexible database configuration.
Allows override of default database connection parameters by providing explicit connection strings for SQLite, MySQL, and PostgreSQL, improving configuration flexibility and setup robustness. Includes refactoring path handling and directory creation for SQLite files.
|
@SakuraIsayeki can you provide example connection strings in the code somewhere e.g., as a comment so people know what they should look like? |
Thanks for pointing out this oversight. Luckily I came prepared to document the use ;) Example connection strings can be found over at this handy website named connectionstrings.com. For the providers implemented within TShock, here are the relevant example pages :
Should these be included in code comments, or in documentation on the wiki ? (or both, come to think of it :D) |
Provides links to example connection string formats for SQLite, MySQL, and Postgres to assist users in configuring database connections more effectively.
Not comfortable with links to things that will eventually die |
9 times out of 10, I'd fully agree with you on that one, @hakusaro. I'll stake my own responsibility on maintaining this one piece of docs, and eventually, should this website ever go down, I'll copy over most of it to our own wiki. Kurz : Could we let this one slide, on account of sheer stability ? |
Sorry if I’m being too forward, but I think it would be much better if everything was compiled into a proper wiki. For amateurs like us, it can be quite confusing to navigate the current setup. A wiki would make the guide clearer and more practical, especially if it includes examples and is designed to be accessible for all users, regardless of their experience level. |
Fully agree with you on this one. I do plan on adding some examples in the wiki, as well as provide the full extent possible by providing a link to more advanced docs over at https://connectionstrings.com/. This feature is, for all intents and purposes, something that's more inclined towards advanced users. Anyone wanting a turnkey solution can provide the usual host/db/user/passwd combo, whereas users needing/wanting to go an extra step with their DB (notably when dealing with SSL) will already have some basic graps on connection strings. Sure thing, I could also integrate some basic example within the code, but I sorta fail to see the benefits, as most devs dealing with databases also know what conn strings are. Open to suggestions as always, if you want it in code, i'll add it 😌 |
yes of course |
Implemented connection strings as an alternative configuration method for setting up and customizing database connections. If supplied, they override any other database config property for the active provider.