🛠️ Code cleanup & added many new features #1
@ -2,6 +2,7 @@ package de.gnmyt.SQLToolkit.generator;
|
|||||||
|
|
||||||
import de.gnmyt.SQLToolkit.drivers.MySQLConnection;
|
import de.gnmyt.SQLToolkit.drivers.MySQLConnection;
|
||||||
import de.gnmyt.SQLToolkit.types.SQLType;
|
import de.gnmyt.SQLToolkit.types.SQLType;
|
||||||
|
import de.gnmyt.SQLToolkit.types.TableField;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -14,8 +15,6 @@ public class TableGenerator {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Basic constructor for the TableGenerator
|
* Basic constructor for the TableGenerator
|
||||||
*
|
|
||||||
* @param updateManager Existing update de.gnmyt.SQLToolkit.manager
|
|
||||||
* @param tableName Name of the table
|
* @param tableName Name of the table
|
||||||
*/
|
*/
|
||||||
public TableGenerator(MySQLConnection connection, String tableName) {
|
public TableGenerator(MySQLConnection connection, String tableName) {
|
||||||
@ -68,6 +67,11 @@ public class TableGenerator {
|
|||||||
return addField(type, name, length, "");
|
return addField(type, name, length, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TableGenerator addField(TableField field) {
|
||||||
|
fields.add(field.generateSQLRow());
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a field to the Table
|
* Add a field to the Table
|
||||||
* @param type The type of the field you want to add
|
* @param type The type of the field you want to add
|
||||||
|
Reference in New Issue
Block a user