| java.lang.Object com.quadcap.sql.Connection
Connection | public class Connection implements TransactionObserver(Code) | | Analagous (and mapped onto) a JDBC Connection , this class
maintains state and locks on behalf of a single session.
author: Stan Bailes |
autoCommit | boolean autoCommit(Code) | | |
isClosed | boolean isClosed(Code) | | |
lastInsertId | long lastInsertId(Code) | | |
nextSession | int nextSession(Code) | | |
readOnly | boolean readOnly(Code) | | |
transAborted | boolean transAborted(Code) | | |
writeLog | boolean writeLog(Code) | | |
Connection | public Connection(Database db, String auth, String passwd) throws SQLException(Code) | | Construct a new connection for the specified database with the specified
authorization
Parameters: db - the database Parameters: user - the authorization id Parameters: passwd - the password exception: SQLException - thrown if bad authorization |
close | final public void close() throws SQLException, IOException(Code) | | Close this connection. Close all statement sessions and end the
transaction.
|
closeSessions | final void closeSessions()(Code) | | Close all the sessions in the table
|
countDots | final static int countDots(String name)(Code) | | Return the number of '.' delimiters in this identifier,
skipping over any occurrences of '.' within delimted
identifiers (i.e., literal strings surrounded by double
quotes.)
|
endStatement | void endStatement(Session session, boolean abort) throws IOException, SQLException(Code) | | At statement end, if autoCommit is TRUE, we commit (or rollback)
the transaction
|
endTransaction | final public void endTransaction() throws IOException, SQLException(Code) | | Commit the current transaction
PRE: cursors closed, statements finished.
POST: transaction commit/rollback, locks released
|
finishContexts | final void finishContexts() throws SQLException, IOException(Code) | | Each context object represents some state retained on behalf
of a constraint. The 'finish()' method of the context is used
to perform any constraint-specific processing at the end of
a statement/transaction.
|
getAutoCommit | final public boolean getAutoCommit()(Code) | | Public accessor for the 'autoCommit' flag.
|
getDatabase | final public Database getDatabase()(Code) | | Accessor for my database
|
getLastInsertId | long getLastInsertId()(Code) | | |
getRandom | Random getRandom()(Code) | | Accessor for my 'Random' object
|
getTempFile | final BlockFile getTempFile(boolean holdRef) throws IOException(Code) | | The BLOB code (InsertBlob) needs access to the temp file.
|
getTransaction | final public Transaction getTransaction()(Code) | | Return the current transaction
|
getTransactionId | final public long getTransactionId()(Code) | | Return the current transaction id as a long.
|
inRecovery | final boolean inRecovery() throws IOException(Code) | | Access to 'recovery' flag
|
isClosed | public boolean isClosed()(Code) | | Return true if this compare is closed
|
isReadOnly | public boolean isReadOnly()(Code) | | Return true if this connection is read-only
|
releaseLocks | final void releaseLocks()(Code) | | At transaction end, release our cached locks.
PRECONDITION: connLock monitor entered
|
removeSession | final public void removeSession(Session session)(Code) | | |
resolveColname | final String resolveColname(String name, Tuple cursorTuple)(Code) | | Return a fully qualified column name.
Column: .
resolveName | final String resolveName(String name)(Code) | | Given a SQL ID, attempt to generate a fully qualified name by
prepending the current schema name.
|
rollbackTransaction | final public void rollbackTransaction() throws IOException, SQLException(Code) | | Roll back this transaction. Toss the pending lists (and statement
contexts, right? XXX), close any cursors and get the database to
undo anything we've actually done to the database.
|
setAutoCommit | final public void setAutoCommit(boolean b)(Code) | | Public setter for the 'autoCommit' flag.
|
setLastInsertId | void setLastInsertId(long id)(Code) | | |
|
|
|