|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is for communicating between the DataDictionary and the various CatalogRowFactories. It tries to hide as much about each catalog as it can behind this interface.
Field Summary | |
static int |
ROWNOTDUPLICATE
ROWNOTDUPLICATE is out of range for a row number. |
Method Summary | |
int |
deleteRow(TransactionController tc,
ExecIndexRow key,
int indexNumber)
Given a key row, delete all matching heap rows and their index rows. |
int |
deleteRows(TransactionController tc,
ExecIndexRow startKey,
int startOp,
Qualifier[][] qualifier,
TupleFilter filter,
ExecIndexRow stopKey,
int stopOp,
int indexNumber)
Delete the set of rows defined by a scan on an index from the table. |
int |
getBaseColumnPosition(int indexNumber,
int colNumber)
Get the base column position for a column within a catalog given the (0-based) index number for this catalog and the (0-based) column number for the column within the index. |
CatalogRowFactory |
getCatalogRowFactory()
Get the CatalogRowFactory for this TabInfo. |
java.util.Properties |
getCreateHeapProperties()
Get the Properties associated with creating the heap. |
java.util.Properties |
getCreateIndexProperties(int indexNumber)
Get the Properties associated with creating the specified index. |
long |
getHeapConglomerate()
Get the conglomerate for the heap. |
int |
getIndexColumnCount(int indexNumber)
Get the column count for the specified index number. |
long |
getIndexConglomerate(int indexID)
Get the conglomerate for the specified index. |
java.lang.String |
getIndexName(int indexID)
Get the index name. |
IndexRowGenerator |
getIndexRowGenerator(int indexNumber)
Get the IndexRowGenerator for the specified index number. |
int |
getNumberOfIndexes()
Get the number of indexes on this catalog. |
ExecRow |
getRow(TransactionController tc,
ConglomerateController heap,
ExecIndexRow key,
int indexNumber)
Given a key row, return the first matching heap row. |
ExecRow |
getRow(TransactionController tc,
ExecIndexRow key,
int indexNumber)
Given a key row, return the first matching heap row. |
RowLocation |
getRowLocation(TransactionController tc,
ExecIndexRow key,
int indexNumber)
Given an index row and index number return the RowLocation in the heap of the first matching row. |
java.lang.String |
getTableName()
Get the table name. |
int |
insertRow(ExecRow row,
LanguageConnectionContext lcc)
Inserts a base row into a catalog and inserts all the corresponding index rows. |
int |
insertRow(ExecRow row,
TransactionController tc,
boolean wait)
Inserts a base row into a catalog and inserts all the corresponding index rows. |
RowLocation |
insertRowAndFetchRowLocation(ExecRow r,
TransactionController tc)
Inserts a base row into a catalog and inserts all the corresponding index rows. |
int |
insertRowList(ExecRow[] rowList,
TransactionController tc)
Inserts a list of base rows into a catalog and inserts all the corresponding index rows. |
boolean |
isComplete()
Is the TabInfo fully initialized. |
boolean |
isIndexUnique(int indexNumber)
Return whether or not this index is declared unique |
void |
setBaseColumnPosition(int indexNumber,
int colNumber,
int baseColumnPosition)
Set the base column position for a column within a catalog given the (0-based) index number for this catalog and the (0-based) column number for the column within the index. |
void |
setHeapConglomerate(long heapConglomerate)
Set the heap conglomerate for the TabInfo. |
void |
setIndexConglomerate(ConglomerateDescriptor cd)
Set the index conglomerate for the table. |
void |
setIndexConglomerate(int index,
long indexConglomerate)
Set the index conglomerate for the table. |
void |
setIndexName(int indexID,
java.lang.String indexName)
Set the index name for the specified indexID |
void |
setIndexRowGenerator(int indexNumber,
IndexRowGenerator irg)
Set the IndexRowGenerator for the specified index number. |
int |
truncate(TransactionController tc)
Delete all the rows from the table. |
void |
updateRow(ExecIndexRow key,
ExecRow[] newRows,
int indexNumber,
boolean[] indicesToUpdate,
int[] colsToUpdate,
TransactionController tc)
Updates a set of base rows in a catalog with same index key on an index and updates all the corresponding index rows. |
void |
updateRow(ExecIndexRow key,
ExecRow newRow,
int indexNumber,
boolean[] indicesToUpdate,
int[] colsToUpdate,
TransactionController tc)
Updates a base row in a catalog and updates all the corresponding index rows. |
void |
updateRow(ExecIndexRow key,
ExecRow newRow,
int indexNumber,
boolean[] indicesToUpdate,
int[] colsToUpdate,
TransactionController tc,
boolean wait)
Updates a base row in a catalog and updates all the corresponding index rows. |
Field Detail |
public static final int ROWNOTDUPLICATE
Method Detail |
public long getHeapConglomerate()
public void setHeapConglomerate(long heapConglomerate)
heapConglomerate
- The new heap conglomerate.
public long getIndexConglomerate(int indexID)
public void setIndexConglomerate(int index, long indexConglomerate)
index
- Index number for index for tableindexConglomerate
- The conglomerate for that index
public void setIndexConglomerate(ConglomerateDescriptor cd)
cd
- The ConglomerateDescriptor for one of the index
for this table.
public java.lang.String getTableName()
public java.lang.String getIndexName(int indexID)
indexID
- Index number for index for table
public void setIndexName(int indexID, java.lang.String indexName)
indexID
- Index number for index for tableindexName
- The name for that index IDpublic CatalogRowFactory getCatalogRowFactory()
public boolean isComplete()
public int getIndexColumnCount(int indexNumber)
indexNumber
- The index number.
public IndexRowGenerator getIndexRowGenerator(int indexNumber)
indexNumber
- The index number.
public void setIndexRowGenerator(int indexNumber, IndexRowGenerator irg)
indexNumber
- The index number.irg
- The IndexRowGenerator for the specified index number.
public int getNumberOfIndexes()
public int getBaseColumnPosition(int indexNumber, int colNumber)
indexNumber
- The index numbercolNumber
- The column number within the index
public void setBaseColumnPosition(int indexNumber, int colNumber, int baseColumnPosition)
indexNumber
- The index numbercolNumber
- The column number within the index
public boolean isIndexUnique(int indexNumber)
indexNumber
- The index number
public int insertRow(ExecRow row, TransactionController tc, boolean wait) throws StandardException
row
- row to inserttc
- transactionwait
- to wait for lock or not
StandardException
- Thrown on failurepublic int insertRow(ExecRow row, LanguageConnectionContext lcc) throws StandardException
row
- row to insertlcc
- language state variable
StandardException
- Thrown on failurepublic RowLocation insertRowAndFetchRowLocation(ExecRow r, TransactionController tc) throws StandardException
tc
- transaction controller
StandardException
- Thrown on failurepublic int insertRowList(ExecRow[] rowList, TransactionController tc) throws StandardException
rowList
- List of rows to inserttc
- transaction controller
StandardException
- Thrown on failurepublic int truncate(TransactionController tc) throws StandardException
LOCKING: exclusive TABLE locking
tc
- transaction controller
StandardException
- Thrown on failurepublic int deleteRows(TransactionController tc, ExecIndexRow startKey, int startOp, Qualifier[][] qualifier, TupleFilter filter, ExecIndexRow stopKey, int stopOp, int indexNumber) throws StandardException
LOCKING: row locking if there is a start and a stop key; otherwise, table locking
tc
- transaction controllerstartKey
- key to start the scan.startOp
- operation to start the scan.stopKey
- key to start the scan.qualifier
- a qualifier for the scan.filter
- filter on base rowsstopOp
- operation to start the scan.indexNumber
- Key is appropriate for this index.
StandardException
- Thrown on failureTransactionController.openScan(long, boolean, int, int, int, org.apache.derby.iapi.services.io.FormatableBitSet, org.apache.derby.iapi.types.DataValueDescriptor[], int, org.apache.derby.iapi.store.access.Qualifier[][], org.apache.derby.iapi.types.DataValueDescriptor[], int)
public int deleteRow(TransactionController tc, ExecIndexRow key, int indexNumber) throws StandardException
LOCKING: row locking if there is a key; otherwise, table locking.
tc
- transaction controllerkey
- key to delete by.indexNumber
- Key is appropriate for this index.
StandardException
- Thrown on failurepublic ExecRow getRow(TransactionController tc, ExecIndexRow key, int indexNumber) throws StandardException
LOCKING: shared row locking.
tc
- transaction controllerkey
- key to read by.indexNumber
- Key is appropriate for this index.
StandardException
- Thrown on failurepublic ExecRow getRow(TransactionController tc, ConglomerateController heap, ExecIndexRow key, int indexNumber) throws StandardException
LOCKING: shared row locking.
tc
- transaction controllerheap
- heap to look inkey
- key to read by.indexNumber
- Key is appropriate for this index.
StandardException
- Thrown on failurepublic RowLocation getRowLocation(TransactionController tc, ExecIndexRow key, int indexNumber) throws StandardException
tc
- Transaction Controller to use.key
- Index Row to search in the index.indexNumber
- Identifies the index to use.
StandardException
- thrown on failure.DataDictionaryImpl.computeRowLocation(TransactionController, TableDescriptor, String)
public void updateRow(ExecIndexRow key, ExecRow[] newRows, int indexNumber, boolean[] indicesToUpdate, int[] colsToUpdate, TransactionController tc) throws StandardException
LOCKING: exclusive row locking
key
- key rownewRows
- new version of the set of rowsindexNumber
- index that key operatesindicesToUpdate
- array of booleans, one for each index on the catalog.
if a boolean is true, that means we must update the
corresponding index because changes in the newRow
affect it.colsToUpdate
- int array of columns to be updated (1 based). If
null, all cols are updatedtc
- transaction controller
StandardException
- Thrown on failurepublic void updateRow(ExecIndexRow key, ExecRow newRow, int indexNumber, boolean[] indicesToUpdate, int[] colsToUpdate, TransactionController tc) throws StandardException
LOCKING: exclusive row locking
key
- key rownewRow
- new version of the rowindexNumber
- index that key operatesindicesToUpdate
- array of booleans, one for each index on the catalog.
if a boolean is true, that means we must update the
corresponding index because changes in the newRow
affect it.colsToUpdate
- int array of columns to be updated (1 based). If
null, all cols are updatedtc
- transaction controller
StandardException
- Thrown on failurepublic void updateRow(ExecIndexRow key, ExecRow newRow, int indexNumber, boolean[] indicesToUpdate, int[] colsToUpdate, TransactionController tc, boolean wait) throws StandardException
LOCKING: exclusive row locking
key
- key rownewRow
- new version of the rowindexNumber
- index that key operatesindicesToUpdate
- array of booleans, one for each index on the catalog.
if a boolean is true, that means we must update the
corresponding index because changes in the newRow
affect it.colsToUpdate
- int array of columns to be updated (1 based). If
null, all cols are updatedtc
- transaction controllerwait
- If true, then the caller wants to wait for locks. False will be
when we using a nested user xaction - we want to timeout right away
if the parent holds the lock. (bug 4821)
StandardException
- Thrown on failurepublic java.util.Properties getCreateHeapProperties()
public java.util.Properties getCreateIndexProperties(int indexNumber)
indexNumber
- The specified index number.
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |