Package net.craftions.api.database
Class MySQL
- java.lang.Object
-
- net.craftions.api.database.MySQL
-
public class MySQL extends Object
This class is used for MySQL Database connections. Original: https://github.com/MCTzOCK/JavaMySQL
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close connection and disconnect from database.ResultSetexecuteQuery()voidexecuteUpdate()Execute Update with the given sql string.StringgetAdditionalConnectionParameters()StringgetConnectionString()StringgetDatabase()StringgetHost()StringgetPassword()StringgetPort()StringgetSql()StringgetUsername()
-
-
-
Method Detail
-
executeQuery
public ResultSet executeQuery()
- Returns:
- The result of the query or null.
-
executeUpdate
public void executeUpdate()
Execute Update with the given sql string.
-
close
public void close()
Close connection and disconnect from database. Attention! ResultSets can't be used after this method is called.
-
getConnectionString
public String getConnectionString()
- Returns:
- Connection URL to database.
-
getSql
public String getSql()
- Returns:
- The given sql string.
-
getHost
public String getHost()
- Returns:
- The given host string.
-
getPort
public String getPort()
- Returns:
- The given port string.
-
getDatabase
public String getDatabase()
- Returns:
- The given database string.
-
getUsername
public String getUsername()
- Returns:
- The given username string.
-
getPassword
public String getPassword()
- Returns:
- The given password string.
-
getAdditionalConnectionParameters
public String getAdditionalConnectionParameters()
- Returns:
- The given addition parameters string.
-
-