org.sqlite.core

## Class CoreConnection

- java.lang.Object
- - org.sqlite.core.CoreConnection

Direct Known Subclasses:
  JDBC3Connection

    public abstract class CoreConnection
    extends Object

### Field Summary

Fields
`protected boolean` `autoCommit`
`protected static Map<SQLiteConfig.TransactionMode,String>` `beginCommandMap`
`SQLiteConfig.DateClass` `dateClass`
`DateFormat` `dateFormat`
`long` `dateMultiplier`
`SQLiteConfig.DatePrecision` `datePrecision`
`protected DB` `db`
`protected CoreDatabaseMetaData` `meta`
`protected int` `openModeFlags`
`protected int` `transactionIsolation`
`protected SQLiteConfig.TransactionMode` `transactionMode`

### Constructor Summary

Constructors
`protected` `CoreConnection(String url, String fileName, Properties prop)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `checkCursor(int rst, int rsc, int rsh)` Checks whether the type, concurrency, and holdability settings for a `ResultSet` are supported by the SQLite interface.
`protected void` `checkOpen()` Whether an SQLite library interface to the database has been established.
`void` `close()`
`DB` `db()`
`void` `finalize()`
`int` `getBusyTimeout()`
`String` `getDriverVersion()`
`String` `libversion()`
`void` `setBusyTimeout(int milliseconds)` Sets the timeout value for the connection.
`protected void` `setTransactionMode(SQLiteConfig.TransactionMode mode)` Sets the mode that will be used to start transactions on this connection.
`String` `url()`

### Methods inherited from class java.lang.Object

`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### db

    protected DB db

#### meta

    protected CoreDatabaseMetaData meta

#### autoCommit

    protected boolean autoCommit

#### transactionIsolation

    protected int transactionIsolation

#### openModeFlags

    protected final int openModeFlags

#### transactionMode

    protected SQLiteConfig.TransactionMode transactionMode

#### beginCommandMap

    protected static final Map<SQLiteConfig.TransactionMode,String> beginCommandMap

#### dateClass

    public final SQLiteConfig.DateClass dateClass

#### datePrecision

    public final SQLiteConfig.DatePrecision datePrecision

#### dateMultiplier

    public final long dateMultiplier

#### dateFormat

    public final DateFormat dateFormat

### Constructor Detail

#### CoreConnection

    protected CoreConnection(String url,
                             String fileName,
                             Properties prop)
                      throws SQLException

Throws:
  `SQLException`

### Method Detail

#### getBusyTimeout

    public int getBusyTimeout()

Returns:
  The busy timeout value for the connection.
See Also:
  http://www.sqlite.org/c3ref/busy_timeout.html

#### setBusyTimeout

    public void setBusyTimeout(int milliseconds)
                        throws SQLException

Sets the timeout value for the connection. A timeout value less than or equal to zero turns off all busy handlers.

Parameters:
  `milliseconds` - The timeout value in milliseconds.
Throws:
  `SQLException`
See Also:
  http://www.sqlite.org/c3ref/busy_timeout.html

#### url

    public String url()

Returns:
  Where the database is located.

#### libversion

    public String libversion()
                      throws SQLException

Returns:
  Compile-time library version numbers.
Throws:
  `SQLException`
See Also:
  http://www.sqlite.org/c3ref/c_source_id.html

#### db

    public DB db()

Returns:
  The class interface to SQLite.

#### checkOpen

    protected void checkOpen()
                      throws SQLException

Whether an SQLite library interface to the database has been established.

Throws:
  `SQLException.`
  `SQLException`

#### checkCursor

    protected void checkCursor(int rst,
                               int rsc,
                               int rsh)
                        throws SQLException

Checks whether the type, concurrency, and holdability settings for a `ResultSet` are supported by the SQLite interface. Supported settings are:

- type: `ResultSet.TYPE_FORWARD_ONLY`
- concurrency: `ResultSet.CONCUR_READ_ONLY`)
- holdability: `ResultSet.CLOSE_CURSORS_AT_COMMIT`

Parameters:
  `rst` - the type setting.
  `rsc` - the concurrency setting.
  `rsh` - the holdability setting.
Throws:
  `SQLException`

#### setTransactionMode

    protected void setTransactionMode(SQLiteConfig.TransactionMode mode)

Sets the mode that will be used to start transactions on this connection.

Parameters:
  `mode` - One of `SQLiteConfig.TransactionMode`
See Also:
  http://www.sqlite.org/lang_transaction.html

#### getDriverVersion

    public String getDriverVersion()

Returns:
  One of "native" or "unloaded".

#### finalize

    public void finalize()
                  throws SQLException

Overrides:
  `finalize` in class `Object`
Throws:
  `SQLException`
See Also:
  `Object.finalize()`

#### close

    public void close()
               throws SQLException

Throws:
  `SQLException`
See Also:
  `Connection.close()`