golistic / pxmysql

Go MySQL driver using X Protocol
MIT License
14 stars 0 forks source link

Move driver registration to sub-package #50

Closed geertjanvdk closed 1 year ago

geertjanvdk commented 1 year ago

We currently register the driver 'pxmysql' using an init() function. This is the standard way to do it, and users. However, we want users to be able to do it without registration, and allow users to explicitly register the driver rather than "implicit".

We already have github.com/golistic/pxmysql/mysql to register the "mysql" driver name. But this we would then move to new location where it can be used to register other names:

The init() function in driver.go will be removed.

This is a breaking change, but since we are still in the v0.9 release, we allow this breaking change.

We also understand that this different than other drivers, but it isn't THAT much different.