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

View File

@ -1,7 +1,4 @@
import de.gnmyt.sqltoolkit.drivers.MySQLConnection;
import de.gnmyt.sqltoolkit.types.LoginParam;
import java.util.Arrays;
public class LoginExample {
@ -14,19 +11,16 @@ public class LoginExample {
String database = "database";
// Then we need to create a connection
MySQLConnection connection = new MySQLConnection(hostname, username, password, database, // Here you need to provide your mysql server data
LoginParam.AUTO_RECONNECT); // You can set login parameters in the constructor
MySQLConnection connection = new MySQLConnection(hostname, username, password, database); // Here you need to provide your mysql server data
// You can now set the settings of the connection (before connecting)
connection.updateSettings()
.useSSL(true) // You can set for example the ssl property
.customProperty("example", ""); // You can also set a custom property
// You can also set the connection string manually (before connecting)
connection.updateConnectionString(LoginParam.AUTO_RECONNECT,
LoginParam.USE_SSL,
LoginParam.UTF8_ENCODING);
// Now you can connect to the database
connection.connect();
// If you want to you can list all login parameters
Arrays.stream(LoginParam.values()).forEach(System.out::println);
}
}