Not sure if interface is the right word for what I am trying to create. It's basically a front end to SQLite. I pass the command and the data to the plugin. The plugin then runs SQL commands on the database. But I am stuck at the planning stage.
I can't decide if it would be better to make a generic interface that handles all SQL and does no formating or cutting up of strings just gets variables with the data and the place they need to go in the database and then create all the processing of that data in the functions calling the database interface plugin. If I have a Items table and Mobs table am I just repeating code?
Or to create one huge plugin that can handle all types of data passed to it and decides what to do with the data. Am I just making this one plugin too complicated.
Or would I be better to create a plugin to handle each type of information to be stored containing all the SQLite stuff. Say an inventory plugin and a Mobs plugin each one opening and modifying database as needed.
How do you guys do it?
I can't decide if it would be better to make a generic interface that handles all SQL and does no formating or cutting up of strings just gets variables with the data and the place they need to go in the database and then create all the processing of that data in the functions calling the database interface plugin. If I have a Items table and Mobs table am I just repeating code?
Or to create one huge plugin that can handle all types of data passed to it and decides what to do with the data. Am I just making this one plugin too complicated.
Or would I be better to create a plugin to handle each type of information to be stored containing all the SQLite stuff. Say an inventory plugin and a Mobs plugin each one opening and modifying database as needed.
How do you guys do it?