Quadcap Embeddable Database

com.quadcap.sql.UpdateIndex Class Reference

Inheritance diagram for com.quadcap.sql.UpdateIndex:

com.quadcap.sql.StatementContext List of all members.

Detailed Description

StatementContext which manages index update operations generated by a statement, defers those operations so consistency can be checked, and at the end of the statement's execution, performs all of the updates.

Author:
Stan Bailes

Definition at line 64 of file UpdateIndex.java.

Public Member Functions

 UpdateIndex (Session session, Constraint constraint) throws IOException
void addEntry (byte[] key, byte[] old, long rowId) throws IOException, SQLException
void finish (boolean abort) throws SQLException, IOException
 Called at statement end (not necessarily a transaction end) or if the statement aborts.

int priority ()
 At statement end, statement contexts are finished in priority order, lowest number first.


Package Attributes

Session session
Constraint constraint
Btree index
Btree temp


Constructor & Destructor Documentation

com.quadcap.sql.UpdateIndex.UpdateIndex Session  session,
Constraint  constraint
throws IOException
 

Definition at line 70 of file UpdateIndex.java.

References com.quadcap.sql.UpdateIndex.constraint, com.quadcap.sql.Session.getDatabase(), com.quadcap.sql.Constraint.getIndex(), com.quadcap.sql.Session.makeTempTree(), and com.quadcap.sql.UpdateIndex.session.


Member Function Documentation

void com.quadcap.sql.UpdateIndex.addEntry byte[]  key,
byte[]  old,
long  rowId
throws IOException, SQLException
 

Definition at line 79 of file UpdateIndex.java.

References com.quadcap.sql.UpdateIndex.addEntry(), com.quadcap.sql.index.Btree.get(), com.quadcap.sql.index.Btree.set(), and com.quadcap.sql.UpdateIndex.temp.

Referenced by com.quadcap.sql.UpdateIndex.addEntry(), com.quadcap.sql.IndexConstraint.applyUpdate(), and com.quadcap.sql.ImportedKeyConstraint.checkUpdate().

void com.quadcap.sql.UpdateIndex.finish boolean  abort  )  throws SQLException, IOException
 

Called at statement end (not necessarily a transaction end) or if the statement aborts.

Implements com.quadcap.sql.StatementContext.

Definition at line 91 of file UpdateIndex.java.

References com.quadcap.sql.index.BCursor.beforeFirst(), com.quadcap.sql.UpdateIndex.constraint, com.quadcap.sql.Session.doStep(), com.quadcap.sql.UpdateIndex.finish(), com.quadcap.sql.index.Btree.free(), com.quadcap.sql.index.Btree.get(), com.quadcap.sql.index.Btree.getCursor(), com.quadcap.sql.Session.getDatabase(), com.quadcap.sql.index.BCursor.getKey(), com.quadcap.sql.index.BCursor.getValBuf(), com.quadcap.sql.index.BCursor.getValLen(), com.quadcap.sql.UpdateIndex.index, com.quadcap.sql.index.BCursor.next(), com.quadcap.sql.index.BCursor.release(), com.quadcap.sql.UpdateIndex.session, and com.quadcap.sql.UpdateIndex.temp.

Referenced by com.quadcap.sql.UpdateIndex.finish().

int com.quadcap.sql.UpdateIndex.priority  ) 
 

At statement end, statement contexts are finished in priority order, lowest number first.

Implements com.quadcap.sql.StatementContext.

Definition at line 138 of file UpdateIndex.java.


Member Data Documentation

Constraint com.quadcap.sql.UpdateIndex.constraint [package]
 

Definition at line 66 of file UpdateIndex.java.

Referenced by com.quadcap.sql.UpdateIndex.finish(), and com.quadcap.sql.UpdateIndex.UpdateIndex().

Btree com.quadcap.sql.UpdateIndex.index [package]
 

Definition at line 67 of file UpdateIndex.java.

Referenced by com.quadcap.sql.UpdateIndex.finish().

Session com.quadcap.sql.UpdateIndex.session [package]
 

Definition at line 65 of file UpdateIndex.java.

Referenced by com.quadcap.sql.UpdateIndex.finish(), and com.quadcap.sql.UpdateIndex.UpdateIndex().

Btree com.quadcap.sql.UpdateIndex.temp [package]
 

Definition at line 68 of file UpdateIndex.java.

Referenced by com.quadcap.sql.UpdateIndex.addEntry(), and com.quadcap.sql.UpdateIndex.finish().