From 86f3ce2f3e232a6e65bf25789ede2ba04f1efdb2 Mon Sep 17 00:00:00 2001
From: mathias <germannewsmaker@gmail.com>
Date: Fri, 27 Aug 2021 14:14:51 +0200
Subject: [PATCH] Updated the LoginExample

---
 src/examples/java/LoginExample.java | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/src/examples/java/LoginExample.java b/src/examples/java/LoginExample.java
index 930bb18..e8051a4 100644
--- a/src/examples/java/LoginExample.java
+++ b/src/examples/java/LoginExample.java
@@ -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);
     }
 
 }