Added an InsertManager for quickly inserting to a table without writing a SQL Query

This commit is contained in:
2021-06-19 10:15:07 +02:00
parent fa5fb6f26e
commit 81e5fdecaa
2 changed files with 105 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
package de.gnmyt.SQLToolkit.drivers;
import de.gnmyt.SQLToolkit.api.SQLConsumer;
import de.gnmyt.SQLToolkit.manager.InsertManager;
import de.gnmyt.SQLToolkit.manager.ResultManager;
import de.gnmyt.SQLToolkit.manager.DataBaseSelection;
import de.gnmyt.SQLToolkit.manager.UpdateManager;
@@ -233,6 +234,23 @@ public class MySQLConnection {
return new DataBaseSelection(this);
}
/**
* Get the InsertManager for easier inserting to a table
* @return InsertManager
*/
public InsertManager insert() {
return new InsertManager(this);
}
/**
* Get the InsertManager for easier inserting to a table
* @param tableName The name of the table you want to insert a object
* @return InsertManager
*/
public InsertManager insertFrom(String tableName) {
return new InsertManager(this, tableName);
}
/**
* Connect with your MySQL server
* @return this class