public class SQLiteConnection extends java.lang.Object implements Connection
Modifier and Type | Field and Description |
---|---|
SQLiteConfig.DateClass |
dateClass |
SQLiteConfig.DateFormat |
dateFormat |
long |
dateMultiplier |
SQLiteConfig.DatePrecision |
datePrecision |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
Constructor and Description |
---|
SQLiteConnection(java.lang.String url,
java.lang.String fileName)
Constructor to create a connection to a database at the given location.
|
SQLiteConnection(java.lang.String url,
java.lang.String fileName,
Hashtable prop)
Constructor to create a pre-configured connection to a database at the
given location.
|
Modifier and Type | Method and Description |
---|---|
void |
clearWarnings() |
void |
close() |
void |
commit() |
Statement |
createStatement() |
Statement |
createStatement(int rsType,
int rsConcurr) |
Statement |
createStatement(int rst,
int rsc,
int rsh) |
void |
finalize() |
boolean |
getAutoCommit() |
int |
getBusyTimeout() |
java.lang.String |
getCatalog() |
int |
getHoldability() |
DatabaseMetaData |
getMetaData() |
int |
getTransactionIsolation() |
Hashtable |
getTypeMap() |
java.sql.SQLWarning |
getWarnings() |
boolean |
isClosed() |
boolean |
isReadOnly() |
java.lang.String |
nativeSQL(java.lang.String sql) |
PreparedStatement |
prepareStatement(java.lang.String sql) |
PreparedStatement |
prepareStatement(java.lang.String sql,
int autoC) |
PreparedStatement |
prepareStatement(java.lang.String sql,
int[] colInds) |
PreparedStatement |
prepareStatement(java.lang.String sql,
int rst,
int rsc) |
PreparedStatement |
prepareStatement(java.lang.String sql,
int rst,
int rsc,
int rsh) |
PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] colNames) |
void |
rollback() |
void |
setAutoCommit(boolean ac) |
void |
setBusyTimeout(int milliseconds)
Sets the timeout value for the connection.
|
void |
setCatalog(java.lang.String catalog) |
void |
setHoldability(int h) |
void |
setReadOnly(boolean ro) |
void |
setTransactionIsolation(int level) |
protected void |
setTransactionMode(SQLiteConfig.TransactionMode mode)
Sets the mode that will be used to start transactions on this connection.
|
void |
setTypeMap(Hashtable map) |
public final SQLiteConfig.DateClass dateClass
public final SQLiteConfig.DatePrecision datePrecision
public final long dateMultiplier
public final SQLiteConfig.DateFormat dateFormat
public SQLiteConnection(java.lang.String url, java.lang.String fileName) throws java.sql.SQLException
url
- The location of the database.fileName
- The database.java.sql.SQLException
public SQLiteConnection(java.lang.String url, java.lang.String fileName, Hashtable prop) throws java.sql.SQLException
url
- The location of the database file.fileName
- The database.prop
- The configurations to apply.java.sql.SQLException
public int getBusyTimeout()
public void setBusyTimeout(int milliseconds) throws java.sql.SQLException
milliseconds
- The timeout value in milliseconds.java.sql.SQLException
public void finalize() throws java.sql.SQLException
finalize
in class java.lang.Object
java.sql.SQLException
Object.finalize()
public void close() throws java.sql.SQLException
close
in interface java.lang.AutoCloseable
close
in interface Connection
java.sql.SQLException
Connection.close()
public boolean isClosed() throws java.sql.SQLException
isClosed
in interface Connection
java.sql.SQLException
Connection.isClosed()
public java.lang.String getCatalog() throws java.sql.SQLException
getCatalog
in interface Connection
java.sql.SQLException
Connection.getCatalog()
public void setCatalog(java.lang.String catalog) throws java.sql.SQLException
setCatalog
in interface Connection
java.sql.SQLException
Connection.setCatalog(java.lang.String)
public int getHoldability() throws java.sql.SQLException
java.sql.SQLException
Connection.getHoldability()
public void setHoldability(int h) throws java.sql.SQLException
java.sql.SQLException
Connection.setHoldability(int)
public int getTransactionIsolation()
getTransactionIsolation
in interface Connection
Connection.getTransactionIsolation()
public void setTransactionIsolation(int level) throws java.sql.SQLException
setTransactionIsolation
in interface Connection
java.sql.SQLException
Connection.setTransactionIsolation(int)
protected void setTransactionMode(SQLiteConfig.TransactionMode mode)
mode
- One of TransactionMode
public Hashtable getTypeMap() throws java.sql.SQLException
java.sql.SQLException
Connection.getTypeMap()
public void setTypeMap(Hashtable map) throws java.sql.SQLException
java.sql.SQLException
Connection.setTypeMap(java.util.Map)
public boolean isReadOnly() throws java.sql.SQLException
isReadOnly
in interface Connection
java.sql.SQLException
Connection.isReadOnly()
public void setReadOnly(boolean ro) throws java.sql.SQLException
setReadOnly
in interface Connection
java.sql.SQLException
Connection.setReadOnly(boolean)
public DatabaseMetaData getMetaData() throws java.sql.SQLException
getMetaData
in interface Connection
java.sql.SQLException
Connection.getMetaData()
public java.lang.String nativeSQL(java.lang.String sql)
nativeSQL
in interface Connection
Connection.nativeSQL(java.lang.String)
public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface Connection
java.sql.SQLException
Connection.clearWarnings()
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface Connection
java.sql.SQLException
Connection.getWarnings()
public boolean getAutoCommit() throws java.sql.SQLException
getAutoCommit
in interface Connection
java.sql.SQLException
Connection.getAutoCommit()
public void setAutoCommit(boolean ac) throws java.sql.SQLException
setAutoCommit
in interface Connection
java.sql.SQLException
Connection.setAutoCommit(boolean)
public void commit() throws java.sql.SQLException
commit
in interface Connection
java.sql.SQLException
Connection.commit()
public void rollback() throws java.sql.SQLException
rollback
in interface Connection
java.sql.SQLException
Connection.rollback()
public Statement createStatement() throws java.sql.SQLException
createStatement
in interface Connection
java.sql.SQLException
Connection.createStatement()
public Statement createStatement(int rsType, int rsConcurr) throws java.sql.SQLException
createStatement
in interface Connection
java.sql.SQLException
Connection.createStatement(int, int)
public Statement createStatement(int rst, int rsc, int rsh) throws java.sql.SQLException
java.sql.SQLException
Connection.createStatement(int, int, int)
public PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
prepareStatement
in interface Connection
java.sql.SQLException
Connection.prepareStatement(java.lang.String)
public PreparedStatement prepareStatement(java.lang.String sql, int autoC) throws java.sql.SQLException
java.sql.SQLException
Connection.prepareStatement(java.lang.String, int)
public PreparedStatement prepareStatement(java.lang.String sql, int[] colInds) throws java.sql.SQLException
java.sql.SQLException
Connection.prepareStatement(java.lang.String, int[])
public PreparedStatement prepareStatement(java.lang.String sql, java.lang.String[] colNames) throws java.sql.SQLException
java.sql.SQLException
Connection.prepareStatement(java.lang.String, java.lang.String[])
public PreparedStatement prepareStatement(java.lang.String sql, int rst, int rsc) throws java.sql.SQLException
prepareStatement
in interface Connection
java.sql.SQLException
Connection.prepareStatement(java.lang.String, int, int)
public PreparedStatement prepareStatement(java.lang.String sql, int rst, int rsc, int rsh) throws java.sql.SQLException
java.sql.SQLException
Connection.prepareStatement(java.lang.String, int, int, int)