APIdia Launch Partner
Top Fields Constructors Methods
net.ucanaccess.jdbc

public Class UcanaccessConnection

extends Object
implements Connection
Class Inheritance
All Implemented Interfaces
java.sql.Connection, java.lang.AutoCloseable, java.sql.Wrapper
Imports
io.github.spannm.jackcess.Database, .Table, net.ucanaccess.commands.CompositeCommand, .ICommand, .ICommand.CommandType, .ICursorCommand, .IFeedbackAction, net.ucanaccess.converters.LoadJet, .SQLConverter, net.ucanaccess.exception.UcanaccessRuntimeException, .UcanaccessSQLException, java.io.File, .IOException, java.lang.System.Logger, .System.Logger.Level, java.sql.*, java.util.*, java.util.concurrent.Executor

Field Summary

Modifier and TypeField and Description
private boolean
pack-priv static final String
private boolean
private Properties
private final Deque<ICommand>
private static final ThreadLocal<Context>
private UcanaccessStatement
private boolean
private Connection
private Object
private final System.Logger
private DBReference
private String
private final Map<Savepoint, String>
private Session
private String
private SQLWarning

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
abort(Executor executor)

Implements java.sql.Connection.abort.

Terminates an open connection.

public synchronized boolean
add(ICommand c4io)

public void
addFunctions(Class<?> clazz)

public void
pack-priv void
afterFlushIoHook()

Extension hook called towards end of flushIO().

private void
pack-priv void
public static synchronized void
clearCtx()

Removes the context of the current thread.

public void
clearWarnings()

Implements java.sql.Connection.clearWarnings.

Clears all warnings reported for this Connection object.

public void
close()

Implements java.sql.Connection.close.

Releases this Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released.

public void
commit()

Implements java.sql.Connection.commit.

Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object.

public Array
createArrayOf(String typeName, Object[] elements)

Implements java.sql.Connection.createArrayOf.

Factory method for creating Array objects.

public Blob
createBlob()

Implements java.sql.Connection.createBlob.

Constructs an object that implements the Blob interface.

public Blob
public Clob
createClob()

Implements java.sql.Connection.createClob.

Constructs an object that implements the Clob interface.

public NClob
createNClob()

Implements java.sql.Connection.createNClob.

Constructs an object that implements the NClob interface.

public SQLXML
createSQLXML()

Implements java.sql.Connection.createSQLXML.

Constructs an object that implements the SQLXML interface.

public UcanaccessStatement
createStatement()

Implements java.sql.Connection.createStatement.

Creates a Statement object for sending SQL statements to the database.

public UcanaccessStatement
createStatement(int resultSetType, int resultSetConcurrency)

Implements java.sql.Connection.createStatement.

Creates a Statement object that will generate ResultSet objects with the given type and concurrency.

public UcanaccessStatement
createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)

Implements java.sql.Connection.createStatement.

Creates a Statement object that will generate ResultSet objects with the given type, concurrency, and holdability.

public Struct
createStruct(String typeName, Object[] attributes)

Implements java.sql.Connection.createStruct.

Factory method for creating Struct objects.

private void
private void
public boolean
getAutoCommit()

Implements java.sql.Connection.getAutoCommit.

Retrieves the current auto-commit mode for this Connection object.

public String
getCatalog()

Implements java.sql.Connection.getCatalog.

Retrieves this Connection object's current catalog name.

public Properties
getClientInfo()

Implements java.sql.Connection.getClientInfo.

Returns a list containing the name and current value of each client info property supported by the driver.

public String
getClientInfo(String name)

Implements java.sql.Connection.getClientInfo.

Returns the value of the client info property specified by name.

public static synchronized UcanaccessConnection

Returns:

connection
getCtxConnection
()

Returns the current database connection or null from the context.

public static synchronized String
public Database
public int
getHoldability()

Implements java.sql.Connection.getHoldability.

Retrieves the current holdability of ResultSet objects created using this Connection object.

public Connection
pack-priv Object
public DatabaseMetaData
getMetaData()

Implements java.sql.Connection.getMetaData.

Retrieves a DatabaseMetaData object that contains metadata about the database to which this Connection object represents a connection.

public int
getNetworkTimeout()

Implements java.sql.Connection.getNetworkTimeout.

Retrieves the number of milliseconds the driver will wait for a database request to complete.

public String
getSchema()

Implements java.sql.Connection.getSchema.

Retrieves this Connection object's current schema name.

public int
getTransactionIsolation()

Implements java.sql.Connection.getTransactionIsolation.

Retrieves this Connection object's current transaction isolation level.

public Map<String, Class<?>>
getTypeMap()

Implements java.sql.Connection.getTypeMap.

Retrieves the Map object associated with this Connection object.

public String
public SQLWarning
getWarnings()

Implements java.sql.Connection.getWarnings.

Retrieves the first warning reported by calls on this Connection object.

public static synchronized boolean
public boolean
public boolean
isClosed()

Implements java.sql.Connection.isClosed.

Retrieves whether this Connection object has been closed.

public boolean
public boolean
isReadOnly()

Implements java.sql.Connection.isReadOnly.

Retrieves whether this Connection object is in read-only mode.

public boolean
public boolean
isValid(int timeout)

Implements java.sql.Connection.isValid.

Returns true if the connection has not been closed and is still valid.

public boolean
isWrapperFor(Class<?> arg0)

Implements java.sql.Wrapper.isWrapperFor.

Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.

pack-priv void
public String
nativeSQL(String sql)

Implements java.sql.Connection.nativeSQL.

Converts the given SQL statement into the system's native SQL grammar.

pack-priv void
pinAutoNumberTable(String tableName, Table table)

private NormalizedSQL
public CallableStatement
prepareCall(String sql)

Implements java.sql.Connection.prepareCall.

Creates a CallableStatement object for calling database stored procedures.

public CallableStatement
prepareCall(String sql, int resultSetType, int resultSetConcurrency)

Implements java.sql.Connection.prepareCall.

Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.

public CallableStatement
prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)

Implements java.sql.Connection.prepareCall.

Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.

public PreparedStatement
prepareStatement(String sql)

Implements java.sql.Connection.prepareStatement.

Creates a PreparedStatement object for sending parameterized SQL statements to the database.

public PreparedStatement
prepareStatement(String sql, int autoGeneratedKeys)

Implements java.sql.Connection.prepareStatement.

Creates a default PreparedStatement object that has the capability to retrieve auto-generated keys.

public PreparedStatement
prepareStatement(String sql, int resultSetType, int resultSetConcurrency)

Implements java.sql.Connection.prepareStatement.

Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency.

public PreparedStatement
prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)

Implements java.sql.Connection.prepareStatement.

Creates a PreparedStatement object that will generate ResultSet objects with the given type, concurrency, and holdability.

public PreparedStatement
prepareStatement(String sql, int[] columnIndexes)

Implements java.sql.Connection.prepareStatement.

Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array.

public PreparedStatement
prepareStatement(String sql, String[] columnNames)

Implements java.sql.Connection.prepareStatement.

Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array.

pack-priv String
public void
releaseSavepoint(Savepoint savepoint)

Implements java.sql.Connection.releaseSavepoint.

Removes the specified Savepoint and subsequent Savepoint objects from the current transaction.

public void
public static UcanaccessConnection

Returns:

connection, never null
requireCtxConnection
()

Returns the current database connection from the context.

public void
rollback()

Implements java.sql.Connection.rollback.

Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object.

public void
rollback(Savepoint savepoint)

Implements java.sql.Connection.rollback.

Undoes all changes made after the given Savepoint object was set.

public void
setAutoCommit(boolean autoCommit)

Implements java.sql.Connection.setAutoCommit.

Sets this connection's auto-commit mode to the given state.

public void
setCatalog(String catalog)

Implements java.sql.Connection.setCatalog.

Sets the given catalog name in order to select a subspace of this Connection object's database in which to work.

public void
setClientInfo(Properties properties)

Implements java.sql.Connection.setClientInfo.

Sets the value of the connection's client info properties.

public void
setClientInfo(String name, String value)

Implements java.sql.Connection.setClientInfo.

Sets the value of the client info property specified by name to the value specified by value.

public static synchronized void
public static synchronized void
pack-priv void
public void
setFeedbackState(boolean feedbackState)

public void
public void
setHoldability(int holdability)

Implements java.sql.Connection.setHoldability.

Changes the default holdability of ResultSet objects created using this Connection object to the given holdability.

public void
setNetworkTimeout(Executor executor, int milliseconds)

Implements java.sql.Connection.setNetworkTimeout.

Sets the maximum period a Connection or objects created from the Connection will wait for the database to reply to any one request.

public void
setReadOnly(boolean readOnly)

Implements java.sql.Connection.setReadOnly.

Puts this connection in read-only mode as a hint to the driver to enable database optimizations.

public Savepoint
setSavepoint()

Implements java.sql.Connection.setSavepoint.

Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it.

public Savepoint
setSavepoint(String name)

Implements java.sql.Connection.setSavepoint.

Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it.

public void
setSchema(String schema)

Implements java.sql.Connection.setSchema.

Sets the given schema name to access.

public void
setTransactionIsolation(int level)

Implements java.sql.Connection.setTransactionIsolation.

Attempts to change the transaction isolation level for this Connection object to the one given.

public void
setTypeMap(Map<String, Class<?>> map)

Implements java.sql.Connection.setTypeMap.

Installs the given TypeMap object as the type map for this Connection object.

public void
public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
public <T> T
unwrap(Class<T> arg0)

Implements java.sql.Wrapper.unwrap.

Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait