Group connection options into a single dictionary option #134
Replies: 4 comments 1 reply
-
I agree with your suggestions @Jorge-Rodriguez 👍 |
Beta Was this translation helpful? Give feedback.
-
Additional support of |
Beta Was this translation helpful? Give feedback.
-
About the I feel inclined to expose Then, when it comes to connection_options:
tls:
ca_cert: CA.pem
[...] |
Beta Was this translation helpful? Give feedback.
-
We have seen issues before that were not so much problems with the code but with the code semantics and the understandability of it. As it stands, our module options and the database connection options are at the same level, this causes some confusion as to what is the purpose of each option.
What I propose here is to group all connection options into a single dictionary type option instead, so that where we currently support something of the form:
We would, either instead or additionally, support something like:
In addition to this, I've noticed that the MySQLdb connector seems to always use an SSL connection if possible (ssl_mode: PREFERRED), even if there are no ssl options provided and therefore one would assume that no SSL connection would occur (which is the behaviour of the pymysql connector).
There is a flag in both connectors to explicitly disable an SSL connection. I suggest that we add an
use_tls
option to expose this flag to the end user.Beta Was this translation helpful? Give feedback.
All reactions