Implement a database layer
Closed this issue · 1 comments
Right now Archon talks directly to a MySQL instance through the go-sql-driver package. This is going to be fine for most cases, but it'd be cool to abstract that logic out into its own package so that, should the need arise, alternative database backends could be implemented. For example it would be great to support Postgres or to have an implementation that is compatible with the Tethealla database, either for continued usage or for a dual-write migration.
This would probably entail adding a new database package and a configuration setting for the DB backend (defaulting to MySQL). A top-level interface could be added and encapsulate the logic and selection of the implementation we want to use, with method calls accepting and returning the various structs used to pass around player data.