5 ms·
There is probably more than these options that you want to serialize into the URI. For example the MySQL client can be configured with an encoding charset, or m
by zimbatm 13y ago
There is probably more than these options that you want to serialize into the URI. For example the MySQL client can be configured with an encoding charset, or maybe you want to specific the size of the connection pool ?
- ibotty 13y agoisn't that something that should go in the 'query', e.g.: db:mysql://user@host/db?encoding_charset=utf8
- zimbatm 13y agoI'm sure it will technically work but is it still really an URI ? URI is meant for resource identification. Here connection details are crammed into the 'query' to access a DB. It might be better to come up with another "one-line string" format that's better adapted for DB connection, is regular and more easily parsed.
- justtheory 13y agoWhat might such a thing look like? Part of the reason I like my proposal is because it's just a generic server URI, so deeply familiar to nearly all developers. And for that format, it's the GET query string that allows for additional parameters.