RedDataBase
RedDataBase
Languages
- English
- German/Deutsch
What is this plugin
RedDataBase is a plugin which can't do anything ingame. It will only give you the chance to implement a DataBase easier. It has only one DataBase-file in his own directory. Therefor it is easier to backup your DataBase. To learn how you use it please read the following text.
Usage
How to create your Tables
Everything is also explaned in examples.
- Make a new objekt of the RedDataBase.class in RedDataBase.RedDataBase.class.
- Make as many objekts from Table.class in RedDataBase.Table.class as your plugin need.
- Configure your Table-objekts with addcolumn(name of the column,which type of data you want to have in it).
- The type of data can you configure with DataValue.class in RedDataBase.DataValue.class as you can see in the examples
How to insert data
- To insert data in your table you have to create a new Objekt of the Entry.class in RedDataBase.Entry.class.
- Configure the Entry by using the add<datatype>(name of column, data to put in) methods. (Make sure that all columns from the table are included by the Entry and in the right type)
- To insert your Entry in your table you use the add(table to insert in, entry which has to be inserted) from the RedDataBase.class.
How to read data
- Call the method get(table to get from) in the RedDataBase.class to get an ArrayList with all Entrys in your table.
- Get every Entry and get the data you want with the get<datatype>(name of column) from the Entrys.
How to drop your tables
There are two methods to drop your tables in RedDataBase.class:
- dropDB(table to drop) to drop your table and recreate it.
- onlyDropDB(table to drop) to drop your table. Note this won't recreate your table.
Appendix
I can release this plugin with authorization from the administration of Redstoneworld.
And please give me some feedback.
Comments