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

View File

@ -1,6 +1,9 @@
package de.gnmyt.SQLToolkit.storage;
import de.gnmyt.SQLToolkit.drivers.MySQLConnection;
import de.gnmyt.SQLToolkit.manager.DataBaseSelection;
import de.gnmyt.SQLToolkit.manager.InsertManager;
import de.gnmyt.SQLToolkit.manager.UpdateManager;
import de.gnmyt.SQLToolkit.types.SQLType;
import de.gnmyt.SQLToolkit.types.TableField;
@ -113,6 +116,30 @@ public abstract class SQLTable {
custom(new TableField(name, type, length, allowNull, defaultValue).setExtra(extras));
}
/**
* Gets the database selection from the current the table
* @return the database selection
*/
public DataBaseSelection select() {
return connection.selectFrom(tableName());
}
/**
* Gets the update manager of the current table
* @return the update manager
*/
public UpdateManager update() {
return connection.updateTable(tableName());
}
/**
* Gets the insert manager of the current table
* @return the insert manager
*/
public InsertManager insert() {
return connection.insertTo(tableName());
}
/**
* Adds a table field to the table
*