Package org.sqlite.jdbc3
Class JDBC3Connection
- java.lang.Object
-
- org.sqlite.SQLiteConnection
-
- org.sqlite.jdbc3.JDBC3Connection
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.sql.Connection
,java.sql.Wrapper
- Direct Known Subclasses:
JDBC4Connection
public abstract class JDBC3Connection extends SQLiteConnection
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JDBC3Connection(java.lang.String url, java.lang.String fileName, java.util.Properties prop)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
clearWarnings()
java.sql.Statement
createStatement()
java.sql.Statement
createStatement(int rsType, int rsConcurr)
abstract java.sql.Statement
createStatement(int rst, int rsc, int rsh)
java.sql.Struct
createStruct(java.lang.String t, java.lang.Object[] attr)
java.lang.String
getCatalog()
int
getHoldability()
java.util.Map<java.lang.String,java.lang.Class<?>>
getTypeMap()
java.sql.SQLWarning
getWarnings()
boolean
isReadOnly()
java.lang.String
nativeSQL(java.lang.String sql)
java.sql.CallableStatement
prepareCall(java.lang.String sql)
java.sql.CallableStatement
prepareCall(java.lang.String sql, int rst, int rsc)
java.sql.CallableStatement
prepareCall(java.lang.String sql, int rst, int rsc, int rsh)
java.sql.PreparedStatement
prepareStatement(java.lang.String sql)
java.sql.PreparedStatement
prepareStatement(java.lang.String sql, int autoC)
java.sql.PreparedStatement
prepareStatement(java.lang.String sql, int[] colInds)
java.sql.PreparedStatement
prepareStatement(java.lang.String sql, int rst, int rsc)
abstract java.sql.PreparedStatement
prepareStatement(java.lang.String sql, int rst, int rsc, int rsh)
java.sql.PreparedStatement
prepareStatement(java.lang.String sql, java.lang.String[] colNames)
void
releaseSavepoint(java.sql.Savepoint savepoint)
void
rollback(java.sql.Savepoint savepoint)
void
setCatalog(java.lang.String catalog)
void
setHoldability(int h)
void
setReadOnly(boolean ro)
java.sql.Savepoint
setSavepoint()
java.sql.Savepoint
setSavepoint(java.lang.String name)
void
setTypeMap(java.util.Map map)
void
tryEnforceTransactionMode()
This will try to enforce the transaction mode if SQLiteConfig#isExplicitReadOnly is true and auto commit is disabled.-
Methods inherited from class org.sqlite.SQLiteConnection
abort, addCommitListener, addUpdateListener, checkCursor, checkOpen, close, commit, extractPragmasFromFilename, getAutoCommit, getBusyTimeout, getConnectionConfig, getCurrentTransactionMode, getDatabase, getLimit, getMetaData, getNetworkTimeout, getSchema, getSQLiteDatabaseMetaData, getTransactionIsolation, getUrl, isClosed, isFirstStatementExecuted, libversion, removeCommitListener, removeUpdateListener, rollback, setAutoCommit, setBusyTimeout, setCurrentTransactionMode, setFirstStatementExecuted, setLimit, setNetworkTimeout, setSchema, setTransactionIsolation, setTransactionMode, transactionPrefix
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
tryEnforceTransactionMode
public void tryEnforceTransactionMode() throws java.sql.SQLException
This will try to enforce the transaction mode if SQLiteConfig#isExplicitReadOnly is true and auto commit is disabled.- If this connection is read only, the PRAGMA query_only will be set
- If this connection is not read only:
- if no statement has been executed, PRAGMA query_only will be set to false, and an IMMEDIATE transaction will be started
- if a statement has already been executed, an exception is thrown
- Throws:
java.sql.SQLException
- if a statement has already been executed on this connection, then the transaction cannot be upgraded to write
-
getCatalog
public java.lang.String getCatalog() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.getCatalog()
-
setCatalog
public void setCatalog(java.lang.String catalog) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.setCatalog(java.lang.String)
-
getHoldability
public int getHoldability() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.getHoldability()
-
setHoldability
public void setHoldability(int h) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.setHoldability(int)
-
getTypeMap
public java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.getTypeMap()
-
setTypeMap
public void setTypeMap(java.util.Map map) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.setTypeMap(java.util.Map)
-
isReadOnly
public boolean isReadOnly()
- See Also:
Connection.isReadOnly()
-
setReadOnly
public void setReadOnly(boolean ro) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.setReadOnly(boolean)
-
nativeSQL
public java.lang.String nativeSQL(java.lang.String sql)
- See Also:
Connection.nativeSQL(java.lang.String)
-
clearWarnings
public void clearWarnings() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.clearWarnings()
-
getWarnings
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.getWarnings()
-
createStatement
public java.sql.Statement createStatement() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.createStatement()
-
createStatement
public java.sql.Statement createStatement(int rsType, int rsConcurr) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.createStatement(int, int)
-
createStatement
public abstract java.sql.Statement createStatement(int rst, int rsc, int rsh) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.createStatement(int, int, int)
-
prepareCall
public java.sql.CallableStatement prepareCall(java.lang.String sql) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.prepareCall(java.lang.String)
-
prepareCall
public java.sql.CallableStatement prepareCall(java.lang.String sql, int rst, int rsc) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.prepareCall(java.lang.String, int, int)
-
prepareCall
public java.sql.CallableStatement prepareCall(java.lang.String sql, int rst, int rsc, int rsh) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.prepareCall(java.lang.String, int, int, int)
-
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.prepareStatement(java.lang.String)
-
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int autoC) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.prepareStatement(java.lang.String, int)
-
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int[] colInds) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.prepareStatement(java.lang.String, int[])
-
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, java.lang.String[] colNames) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.prepareStatement(java.lang.String, java.lang.String[])
-
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int rst, int rsc) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.prepareStatement(java.lang.String, int, int)
-
prepareStatement
public abstract java.sql.PreparedStatement prepareStatement(java.lang.String sql, int rst, int rsc, int rsh) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.prepareStatement(java.lang.String, int, int, int)
-
setSavepoint
public java.sql.Savepoint setSavepoint() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.setSavepoint()
-
setSavepoint
public java.sql.Savepoint setSavepoint(java.lang.String name) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.setSavepoint(java.lang.String)
-
releaseSavepoint
public void releaseSavepoint(java.sql.Savepoint savepoint) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.releaseSavepoint(java.sql.Savepoint)
-
rollback
public void rollback(java.sql.Savepoint savepoint) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Connection.rollback(java.sql.Savepoint)
-
createStruct
public java.sql.Struct createStruct(java.lang.String t, java.lang.Object[] attr) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
-