🛠️ Code cleanup & added many new features #1

Merged
gnmyt merged 121 commits from features/code-cleanup into master 2021-09-02 13:34:00 +00:00
Showing only changes of commit 50fc5d50d5 - Show all commits

View File

@ -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