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.SQLExceptionpublic 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.SQLExceptionpublic int getBusyTimeout()
public void setBusyTimeout(int milliseconds)
throws java.sql.SQLException
milliseconds - The timeout value in milliseconds.java.sql.SQLExceptionpublic void finalize()
throws java.sql.SQLException
finalize in class java.lang.Objectjava.sql.SQLExceptionObject.finalize()public void close()
throws java.sql.SQLException
close in interface java.lang.AutoCloseableclose in interface Connectionjava.sql.SQLExceptionConnection.close()public boolean isClosed()
throws java.sql.SQLException
isClosed in interface Connectionjava.sql.SQLExceptionConnection.isClosed()public java.lang.String getCatalog()
throws java.sql.SQLException
getCatalog in interface Connectionjava.sql.SQLExceptionConnection.getCatalog()public void setCatalog(java.lang.String catalog)
throws java.sql.SQLException
setCatalog in interface Connectionjava.sql.SQLExceptionConnection.setCatalog(java.lang.String)public int getHoldability()
throws java.sql.SQLException
java.sql.SQLExceptionConnection.getHoldability()public void setHoldability(int h)
throws java.sql.SQLException
java.sql.SQLExceptionConnection.setHoldability(int)public int getTransactionIsolation()
getTransactionIsolation in interface ConnectionConnection.getTransactionIsolation()public void setTransactionIsolation(int level)
throws java.sql.SQLException
setTransactionIsolation in interface Connectionjava.sql.SQLExceptionConnection.setTransactionIsolation(int)protected void setTransactionMode(SQLiteConfig.TransactionMode mode)
mode - One of TransactionModepublic Hashtable getTypeMap() throws java.sql.SQLException
java.sql.SQLExceptionConnection.getTypeMap()public void setTypeMap(Hashtable map) throws java.sql.SQLException
java.sql.SQLExceptionConnection.setTypeMap(java.util.Map)public boolean isReadOnly()
throws java.sql.SQLException
isReadOnly in interface Connectionjava.sql.SQLExceptionConnection.isReadOnly()public void setReadOnly(boolean ro)
throws java.sql.SQLException
setReadOnly in interface Connectionjava.sql.SQLExceptionConnection.setReadOnly(boolean)public DatabaseMetaData getMetaData() throws java.sql.SQLException
getMetaData in interface Connectionjava.sql.SQLExceptionConnection.getMetaData()public java.lang.String nativeSQL(java.lang.String sql)
nativeSQL in interface ConnectionConnection.nativeSQL(java.lang.String)public void clearWarnings()
throws java.sql.SQLException
clearWarnings in interface Connectionjava.sql.SQLExceptionConnection.clearWarnings()public java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
getWarnings in interface Connectionjava.sql.SQLExceptionConnection.getWarnings()public boolean getAutoCommit()
throws java.sql.SQLException
getAutoCommit in interface Connectionjava.sql.SQLExceptionConnection.getAutoCommit()public void setAutoCommit(boolean ac)
throws java.sql.SQLException
setAutoCommit in interface Connectionjava.sql.SQLExceptionConnection.setAutoCommit(boolean)public void commit()
throws java.sql.SQLException
commit in interface Connectionjava.sql.SQLExceptionConnection.commit()public void rollback()
throws java.sql.SQLException
rollback in interface Connectionjava.sql.SQLExceptionConnection.rollback()public Statement createStatement() throws java.sql.SQLException
createStatement in interface Connectionjava.sql.SQLExceptionConnection.createStatement()public Statement createStatement(int rsType, int rsConcurr) throws java.sql.SQLException
createStatement in interface Connectionjava.sql.SQLExceptionConnection.createStatement(int, int)public Statement createStatement(int rst, int rsc, int rsh) throws java.sql.SQLException
java.sql.SQLExceptionConnection.createStatement(int, int, int)public PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
prepareStatement in interface Connectionjava.sql.SQLExceptionConnection.prepareStatement(java.lang.String)public PreparedStatement prepareStatement(java.lang.String sql, int autoC) throws java.sql.SQLException
java.sql.SQLExceptionConnection.prepareStatement(java.lang.String, int)public PreparedStatement prepareStatement(java.lang.String sql, int[] colInds) throws java.sql.SQLException
java.sql.SQLExceptionConnection.prepareStatement(java.lang.String, int[])public PreparedStatement prepareStatement(java.lang.String sql, java.lang.String[] colNames) throws java.sql.SQLException
java.sql.SQLExceptionConnection.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 Connectionjava.sql.SQLExceptionConnection.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.SQLExceptionConnection.prepareStatement(java.lang.String, int, int, int)