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, wait
commit, isAutoCommit, prepare, query, rollback, setAutoCommit, update
protected 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 SQLDataType
tablename
- Name of the table to check forSQLException
- The query on the database failspublic void close()
close
in interface SQLDataType
close
in interface AutoCloseable
public Connection getConnection()
Connection
object for ease of use in exposing more
internal APIgetConnection
in interface SQLDataType
Connection
object in use by this SQLDataType
Copyright © 2015. All rights reserved.