The table generator can now add fields by the TableField class
This commit is contained in:
parent
f83d806674
commit
50fc5d50d5
@ -2,6 +2,7 @@ package de.gnmyt.SQLToolkit.generator;
|
||||
|
||||
import de.gnmyt.SQLToolkit.drivers.MySQLConnection;
|
||||
import de.gnmyt.SQLToolkit.types.SQLType;
|
||||
import de.gnmyt.SQLToolkit.types.TableField;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -14,8 +15,6 @@ public class TableGenerator {
|
||||
|
||||
/**
|
||||
* Basic constructor for the TableGenerator
|
||||
*
|
||||
* @param updateManager Existing update de.gnmyt.SQLToolkit.manager
|
||||
* @param tableName Name of the table
|
||||
*/
|
||||
public TableGenerator(MySQLConnection connection, String tableName) {
|
||||
@ -68,6 +67,11 @@ public class TableGenerator {
|
||||
return addField(type, name, length, "");
|
||||
}
|
||||
|
||||
public TableGenerator addField(TableField field) {
|
||||
fields.add(field.generateSQLRow());
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a field to the Table
|
||||
* @param type The type of the field you want to add
|
||||
|
Reference in New Issue
Block a user