Interface DBCore
- All Known Implementing Classes:
MySQLCore,SQLiteCore
public interface DBCore
- Author:
- phaed
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanvoidclose()Close connectiondefault booleanExecute a statementdefault voidexecuteUpdate(String query) default booleanexistsColumn(String table, String column) Check whether a column existsdefault booleanexistsTable(String table) Check whether a table existsdefault @Nullable ResultSetExecute a select statement
-
Field Details
-
plugin
-
log
-
-
Method Details
-
getConnection
Connection getConnection()- Returns:
- connection
-
checkConnection
default boolean checkConnection()- Returns:
- whether connection can be established
-
close
void close()Close connection -
select
Execute a select statement- Parameters:
query- the query- Returns:
- the result set or null if the query failed
-
execute
Execute a statement- Parameters:
query- the query- Returns:
- true if the statement was executed
-
existsTable
Check whether a table exists- Parameters:
table- the table- Returns:
- true if the table exists
-
existsColumn
Check whether a column exists- Parameters:
table- the tablecolumn- the column- Returns:
- true if the column exists
-
executeUpdate
-