Description
Is your feature request related to a problem? Please describe.
I sometimes work on applications that need metadata of tables and columns. I use queries on information_schema
to get this information. I would love it if I could use the MySqlConnector.Core.TypeMapper
class so that I can map the results from information_schema.columns
to the MySqlConnector.MySqlDbType
enum, but I can't since that class is internal. Because of that, I have to write my own mapper, which is bad since MySqlConnector
already has a good one.
Describe the solution you'd like
Change the modifier of MySqlConnector.Core.TypeMapper
from internal sealed class
to public sealed class
.
Describe alternatives you've considered
I have considered the following options, which are all bad/inconvenient:
- Write my own mapper -> This is reinventing the wheel.
- Copy the code of
MySqlConnector.Core.TypeMapper
to my own class and use that one -> I need to check after every update ofMySqlConnector
to see if this class has changed and if I need to copy those changes. - Use reflection to call methods of
MySqlConnector.Core.TypeMapper.Instance
-> This is very fragile and could break with library updates. - Find alternative solutions -> I have not been able to find any.
Additional context
I don't think any context I can explain is relevant for this request. I only wonder if there is a reason for this class being internal. If not, I could maybe make a PR myself to change it.