🛠️ 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 2be583685f - Show all commits

View File

@ -1,10 +1,7 @@
package de.gnmyt.SQLToolkit.storage;
import de.gnmyt.SQLToolkit.drivers.MySQLConnection;
import de.gnmyt.SQLToolkit.manager.DeletionManager;
import de.gnmyt.SQLToolkit.manager.InsertManager;
import de.gnmyt.SQLToolkit.manager.SelectionManager;
import de.gnmyt.SQLToolkit.manager.UpdateManager;
import de.gnmyt.SQLToolkit.manager.*;
import de.gnmyt.SQLToolkit.types.SQLType;
import de.gnmyt.SQLToolkit.types.TableField;
@ -102,6 +99,34 @@ public abstract class SQLTable {
custom(new TableField(name, type, length, allowNull, defaultValue).setExtra(extras));
}
/**
* Adds a table field to the table
*
* @param tableField The table field you want to add
*/
public void custom(TableField tableField) {
tableFields.add(tableField);
}
/**
* Adds a custom table field to the table
*
* @param name The name of the column
* @return the manager of the table field
*/
protected CustomTableFieldManager custom(String name) {
return new CustomTableFieldManager(this).name(name);
}
/**
* Adds a custom table field to the table
*
* @return the manager of the table field
*/
protected CustomTableFieldManager custom() {
return new CustomTableFieldManager(this);
}
/**
* Gets the database selection from the current the table
*
@ -138,15 +163,6 @@ public abstract class SQLTable {
return connection.deleteFrom(tableName());
}
/**
* Adds a table field to the table
*
* @param tableField The table field you want to add
*/
protected void custom(TableField tableField) {
tableFields.add(tableField);
}
/**
* Generates the table sql
*