I wrote a class which handles all sorts of sqlite operations.
Now that all is working I rewrote it for mysql which is pretty much exactly the same except for the query.
Ofcourse this isn’t right. I want to be able to use a config variable to determine which database to use.
I’m not sure how. Do I use a parent class that redirects the function calls. Do I try to wrap this with decorator functions. Do I need to look into inheritance.
Whats a good approach here?
Thanks!