Quadcap Embeddable Database

com.quadcap.sql.index.BCursor Interface Reference

Inheritance diagram for com.quadcap.sql.index.BCursor:

com.quadcap.sql.index.BtreeCursor List of all members.

Detailed Description

BCursor.

Author:
Stan Bailes

Definition at line 48 of file BCursor.java.

Public Member Functions

boolean seek (byte[] key, int len) throws IOException
 Seek to (before) the specified key.


Package Functions

boolean seek (byte[] buf) throws IOException
 Seek to (before) the specified key.

void beforeFirst () throws IOException
 Position cursor before the first record.

void afterLast () throws IOException
 Position the cursor after the last record.

boolean absolute (int x) throws IOException
 Move to the specified record; one-based.

boolean next () throws IOException
 Move past the next record and return true the cursor is now pointed at a valid record.

boolean prev () throws IOException
 Move before the previous record and return true the cursor is now pointed at a valid record.

int getKey (byte[] buf) throws IOException
byte[] getKeyBuf ()
void setKeyBuf (byte[] buf)
int getKeyLen ()
byte[] getKey ()
int getVal (byte[] buf) throws IOException
byte[] getValBuf ()
void setValBuf (byte[] buf)
int getValLen ()
byte[] getVal ()
long getValAsLong () throws IOException
long size () throws IOException
long position () throws IOException
void release ()
 Release this cursor back to the pool.

void close () throws IOException
 Release any resources held by this cursor (but maintain ownership of it -- it can be resurrected by another positioning call.

boolean delete () throws IOException
 Delete the currently positioned record.

boolean insert (byte[] key, int klen, byte[] data, int doff, int dlen) throws IOException
 Insert a new key/data pair.

boolean insert (byte[] key, byte[] data) throws IOException
boolean replace (byte[] data, int doff, int dlen) throws IOException
 Replace the data portion of the current item with the specified data.

boolean replace (byte[] data) throws IOException


Member Function Documentation

boolean com.quadcap.sql.index.BCursor.absolute int  x  )  throws IOException [package]
 

Move to the specified record; one-based.

-1 means last record, -2 means next to last, etc.

Returns:
true if the specified record exists.

Implemented in com.quadcap.sql.index.BtreeCursor.

void com.quadcap.sql.index.BCursor.afterLast  )  throws IOException [package]
 

Position the cursor after the last record.

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.IndexCursor.afterLast().

void com.quadcap.sql.index.BCursor.beforeFirst  )  throws IOException [package]
 

Position cursor before the first record.

Implemented in com.quadcap.sql.index.BtreeCursor.

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

void com.quadcap.sql.index.BCursor.close  )  throws IOException [package]
 

Release any resources held by this cursor (but maintain ownership of it -- it can be resurrected by another positioning call.

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.index.Btree.releaseCursor().

boolean com.quadcap.sql.index.BCursor.delete  )  throws IOException [package]
 

Delete the currently positioned record.

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.index.Btree.delete(), com.quadcap.sql.Database.getRelationNameIterator(), com.quadcap.sql.Database.removeRelation(), and com.quadcap.sql.Database.renameRelation().

byte [] com.quadcap.sql.index.BCursor.getKey  )  [package]
 

Implemented in com.quadcap.sql.index.BtreeCursor.

int com.quadcap.sql.index.BCursor.getKey byte[]  buf  )  throws IOException [package]
 

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.ExportedKeyConstraint.checkKeyRemoval(), com.quadcap.sql.index.Btree.display(), com.quadcap.sql.UpdateIndex.finish(), com.quadcap.sql.Database.getRelationNameIterator(), and com.quadcap.sql.IndexCursor.updateRow().

byte [] com.quadcap.sql.index.BCursor.getKeyBuf  )  [package]
 

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.IndexCursor.next(), and com.quadcap.sql.IndexCursor.prev().

int com.quadcap.sql.index.BCursor.getKeyLen  )  [package]
 

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.IndexCursor.next(), and com.quadcap.sql.IndexCursor.prev().

byte [] com.quadcap.sql.index.BCursor.getVal  )  [package]
 

Implemented in com.quadcap.sql.index.BtreeCursor.

int com.quadcap.sql.index.BCursor.getVal byte[]  buf  )  throws IOException [package]
 

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.index.Btree.display(), com.quadcap.sql.index.Btree.get(), com.quadcap.sql.Database.renameIndexedTable(), and com.quadcap.sql.Database.updateTableIdentity().

long com.quadcap.sql.index.BCursor.getValAsLong  )  throws IOException [package]
 

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.StmtDropTable.deleteRows(), com.quadcap.sql.StmtDropColumn.execute(), com.quadcap.sql.StmtAddColumn.execute(), com.quadcap.sql.Database.removeRelation(), and com.quadcap.sql.Database.updateRelation().

byte [] com.quadcap.sql.index.BCursor.getValBuf  )  [package]
 

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.TempTableMerge.addRows(), com.quadcap.sql.OrderByCursor.fetchCurrentRow(), com.quadcap.sql.DistinctCursor.fetchCurrentRow(), com.quadcap.sql.UpdateIndex.finish(), com.quadcap.sql.OrderByCursor.getCurrentRowId(), com.quadcap.sql.IndexCursor.getCurrentRowId(), com.quadcap.sql.DistinctCursor.getCurrentRowId(), com.quadcap.sql.Database.getRelation(), com.quadcap.sql.Database.getTableIdentity(), com.quadcap.sql.TempTable.release(), and com.quadcap.sql.Database.renameRelation().

int com.quadcap.sql.index.BCursor.getValLen  )  [package]
 

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.UpdateIndex.finish(), com.quadcap.sql.index.Btree.get(), and com.quadcap.sql.Database.getTableIdentity().

boolean com.quadcap.sql.index.BCursor.insert byte[]  key,
byte[]  data
throws IOException [package]
 

Implemented in com.quadcap.sql.index.BtreeCursor.

boolean com.quadcap.sql.index.BCursor.insert byte[]  key,
int  klen,
byte[]  data,
int  doff,
int  dlen
throws IOException [package]
 

Insert a new key/data pair.

We are presumably positioned just before the spot where the new record should go, but we will check, anyway.

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.Database.addRelation(), com.quadcap.sql.TempTableMerge.addRows(), com.quadcap.sql.Database.renameRelation(), and com.quadcap.sql.UnaryExpression.uniqueValue().

boolean com.quadcap.sql.index.BCursor.next  )  throws IOException [package]
 

Move past the next record and return true the cursor is now pointed at a valid record.

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.ExportedKeyConstraint.checkKeyRemoval(), com.quadcap.sql.StmtDropTable.deleteRows(), com.quadcap.sql.index.Btree.display(), com.quadcap.sql.StmtDropColumn.execute(), com.quadcap.sql.StmtAddColumn.execute(), com.quadcap.sql.UpdateIndex.finish(), com.quadcap.sql.Database.getRelationNameIterator(), com.quadcap.sql.TempTable.release(), and com.quadcap.sql.Database.renameIndexedTable().

long com.quadcap.sql.index.BCursor.position  )  throws IOException [package]
 

Implemented in com.quadcap.sql.index.BtreeCursor.

boolean com.quadcap.sql.index.BCursor.prev  )  throws IOException [package]
 

Move before the previous record and return true the cursor is now pointed at a valid record.

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.Database.renameIndexedTable().

void com.quadcap.sql.index.BCursor.release  )  [package]
 

Release this cursor back to the pool.

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.Database.addRelation(), com.quadcap.sql.TempTableMerge.addRows(), com.quadcap.sql.ExportedKeyConstraint.checkKeyRemoval(), com.quadcap.sql.index.Btree.delete(), com.quadcap.sql.StmtDropTable.deleteRows(), com.quadcap.sql.index.Btree.display(), com.quadcap.sql.StmtDropColumn.execute(), com.quadcap.sql.StmtAddColumn.execute(), com.quadcap.sql.UpdateIndex.finish(), com.quadcap.sql.index.Btree.get(), com.quadcap.sql.Database.getRelation(), com.quadcap.sql.Database.getRelationNameIterator(), com.quadcap.sql.Database.getTableIdentity(), com.quadcap.sql.TempTable.release(), com.quadcap.sql.Database.removeRelation(), com.quadcap.sql.Database.renameIndexedTable(), com.quadcap.sql.Database.renameRelation(), com.quadcap.sql.UnaryExpression.uniqueValue(), com.quadcap.sql.Database.updateRelation(), and com.quadcap.sql.Database.updateTableIdentity().

boolean com.quadcap.sql.index.BCursor.replace byte[]  data  )  throws IOException [package]
 

Implemented in com.quadcap.sql.index.BtreeCursor.

boolean com.quadcap.sql.index.BCursor.replace byte[]  data,
int  doff,
int  dlen
throws IOException [package]
 

Replace the data portion of the current item with the specified data.

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.TempTableMerge.addRows(), com.quadcap.sql.Database.renameIndexedTable(), and com.quadcap.sql.Database.updateTableIdentity().

boolean com.quadcap.sql.index.BCursor.seek byte[]  buf  )  throws IOException [package]
 

Seek to (before) the specified key.

Implemented in com.quadcap.sql.index.BtreeCursor.

boolean com.quadcap.sql.index.BCursor.seek byte[]  key,
int  len
throws IOException
 

Seek to (before) the specified key.

Implemented in com.quadcap.sql.index.BtreeCursor.

Referenced by com.quadcap.sql.Database.addRelation(), com.quadcap.sql.TempTableMerge.addRows(), com.quadcap.sql.IndexCursor.afterLast(), com.quadcap.sql.IndexCursor.beforeFirst(), com.quadcap.sql.ExportedKeyConstraint.checkKeyRemoval(), com.quadcap.sql.index.Btree.delete(), com.quadcap.sql.index.Btree.get(), com.quadcap.sql.Database.getRelation(), com.quadcap.sql.Database.getTableIdentity(), com.quadcap.sql.Database.removeRelation(), com.quadcap.sql.Database.renameRelation(), com.quadcap.sql.IndexCursor.reset(), com.quadcap.sql.UnaryExpression.uniqueValue(), com.quadcap.sql.Database.updateRelation(), and com.quadcap.sql.Database.updateTableIdentity().

void com.quadcap.sql.index.BCursor.setKeyBuf byte[]  buf  )  [package]
 

Implemented in com.quadcap.sql.index.BtreeCursor.

void com.quadcap.sql.index.BCursor.setValBuf byte[]  buf  )  [package]
 

Implemented in com.quadcap.sql.index.BtreeCursor.

long com.quadcap.sql.index.BCursor.size  )  throws IOException [package]
 

Implemented in com.quadcap.sql.index.BtreeCursor.