public class SQLite extends Object implements SQLDataType
| Modifier and Type | Field and Description |
|---|---|
protected Connection |
con
The
Connection object |
protected static byte |
connections
The number of connections in use by this data type
|
| Constructor and Description |
|---|
SQLite() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkTable(String tablename)
Checks if a table exists within the set database
|
void |
close()
Closes the SQLite connection.
|
Connection |
getConnection()
Returns the
Connection object for ease of use in exposing more
internal API |
Connection |
open(File folder,
String name)
Opens a connection to the SQLite database.
|
Connection |
open(org.bukkit.plugin.Plugin plugin)
Opens a connection to the SQLite database.
|
Connection |
open(org.bukkit.plugin.Plugin plugin,
String name)
Opens a connection to the SQLite database.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcommit, isAutoCommit, prepare, query, rollback, setAutoCommit, updateprotected static byte connections
protected Connection con
Connection objectpublic Connection open(org.bukkit.plugin.Plugin plugin) throws SQLException
plugin - The Plugin with the data folder to useSQLException - If the connection fails to openpublic Connection open(org.bukkit.plugin.Plugin plugin, String name) throws SQLException
plugin - The Plugin with the data folder to usename - The name of the database fileSQLException - If the connection fails to openpublic Connection open(File folder, String name) throws SQLException
folder - A File pointing to a data folder for the databasename - The name of the database fileSQLException - If the connection fails to openpublic boolean checkTable(String tablename) throws SQLException
checkTable in interface SQLDataTypetablename - Name of the table to check forSQLException - The query on the database failspublic void close()
close in interface SQLDataTypeclose in interface AutoCloseablepublic Connection getConnection()
Connection object for ease of use in exposing more
internal APIgetConnection in interface SQLDataTypeConnection object in use by this SQLDataTypeCopyright © 2015. All rights reserved.