Name

Connection

Synopsis

Class Name: java.sql.Connection
Superclass: None
Immediate Subclasses: None
Interfaces Implemented: None
Availability: JDK 1.1

Description

The Connection class is the JDBC representation of a database session. It provides an application with Statement objects (and its subclasses) for that session. It also handles the transaction management for those statements. By default, each statement is committed immediately upon execution. You can use the Connection object to turn off this Autocommit feature for the session. In that event, you must expressly send commits, or any statements executed will be lost.

Class Summary

public interface Connection { static public final int TRANSACTION_NONE; static public final int TRANSACTION_READ_UNCOMMITTED; static public final int TRANSACTION_READ_COMMITTED; static public final int TRANSACTION_REPEATABLE_READ; static public final int TRANSACTION_SERIALIZABLE; void clearWarnings() throws SQLException; void close() throws SQLException; void commit() throws SQLException; Statement createStatement() throws SQLException; Statement createStatement(int type, int concur) throws SQLException; boolean getAutoCommit() throws SQLException; String getCatalog() throws SQLException; Map getTypeMap() throws SQLException; DatabaseMetaData getMetaData() throws SQLException; int getTransactionIsolation() throws SQLException; SQLWarning getWarnings() throws SQLException; boolean isClosed() throws SQLException; boolean isReadOnly() throws SQLException; String ...

Get MySQL and mSQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.