|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.impl.sql.catalog.TabInfoImpl
class TabInfoImpl
A poor mans structure used in DataDictionaryImpl.java. Used to save heapId, name pairs for non core tables.
| Field Summary | |
|---|---|
private boolean |
computedStreamStorableHeapColIds
|
private CatalogRowFactory |
crf
|
private long |
heapConglomerate
|
private boolean |
heapSet
|
private IndexInfoImpl[] |
indexes
|
private int |
numIndexesSet
|
(package private) static int |
ROWNOTDUPLICATE
ROWNOTDUPLICATE is out of range for a row number. |
private int[] |
streamStorableHeapColIds
|
| Constructor Summary | |
|---|---|
TabInfoImpl(CatalogRowFactory crf)
Constructor |
|
| Method Summary | |
|---|---|
(package private) int |
deleteRow(TransactionController tc,
ExecIndexRow key,
int indexNumber)
Given a key row, delete all matching heap rows and their index rows. |
(package private) int |
deleteRow(TransactionController tc,
ExecIndexRow key,
int indexNumber,
boolean wait)
|
(package private) 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. |
private int |
deleteRows(TransactionController tc,
ExecIndexRow startKey,
int startOp,
Qualifier[][] qualifier,
TupleFilter filter,
ExecIndexRow stopKey,
int stopOp,
int indexNumber,
boolean wait)
|
(package private) 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. |
(package private) CatalogRowFactory |
getCatalogRowFactory()
Get the CatalogRowFactory for this. |
(package private) java.util.Properties |
getCreateHeapProperties()
Get the Properties associated with creating the heap. |
(package private) java.util.Properties |
getCreateIndexProperties(int indexNumber)
Get the Properties associated with creating the specified index. |
(package private) long |
getHeapConglomerate()
Get the conglomerate for the heap. |
(package private) int |
getIndexColumnCount(int indexNumber)
Get the column count for the specified index number. |
(package private) long |
getIndexConglomerate(int indexID)
Get the conglomerate for the specified index. |
(package private) java.lang.String |
getIndexName(int indexId)
Get the index name. |
private ExecIndexRow |
getIndexRowFromHeapRow(IndexRowGenerator irg,
RowLocation rl,
ExecRow heapRow)
Get an index row based on a row from the heap. |
(package private) IndexRowGenerator |
getIndexRowGenerator(int indexNumber)
Get the IndexRowGenerator for the specified index number. |
(package private) int |
getNumberOfIndexes()
Get the number of indexes on this catalog. |
(package private) ExecRow |
getRow(TransactionController tc,
ConglomerateController heapCC,
ExecIndexRow key,
int indexNumber)
Given a key row, return the first matching heap row. |
(package private) ExecRow |
getRow(TransactionController tc,
ExecIndexRow key,
int indexNumber)
Given a key row, return the first matching heap row. |
private RowChanger |
getRowChanger(TransactionController tc,
int[] changedCols,
ExecRow baseRow)
Gets a row changer for this catalog. |
private ExecRow |
getRowInternal(TransactionController tc,
ConglomerateController heapCC,
ExecIndexRow key,
int indexNumber,
RowLocation[] rl)
|
(package private) 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. |
private int[] |
getStreamStorableHeapColIds(ExecRow baseRow)
|
(package private) java.lang.String |
getTableName()
Get the table name. |
(package private) int |
insertRow(ExecRow row,
TransactionController tc)
Inserts a base row into a catalog and inserts all the corresponding index rows. |
(package private) int |
insertRowList(ExecRow[] rowList,
TransactionController tc)
Inserts a list of base rows into a catalog and inserts all the corresponding index rows. |
private int |
insertRowListImpl(ExecRow[] rowList,
TransactionController tc,
RowLocation[] rowLocationOut)
Insert logic to insert a list of rows into a table. |
(package private) boolean |
isComplete()
Is this fully initialized. |
(package private) boolean |
isIndexUnique(int indexNumber)
Return whether or not this index is declared unique |
(package private) void |
setHeapConglomerate(long heapConglomerate)
Set the heap conglomerate for this. |
(package private) void |
setIndexConglomerate(ConglomerateDescriptor cd)
Set the index conglomerate for the table. |
(package private) void |
setIndexConglomerate(int index,
long indexConglomerate)
Set the index conglomerate for the table. |
(package private) void |
setIndexRowGenerator(int indexNumber,
IndexRowGenerator irg)
Set the IndexRowGenerator for the specified index number. |
java.lang.String |
toString()
|
(package private) void |
updateRow(ExecIndexRow key,
ExecRow[] newRows,
int indexNumber,
boolean[] indicesToUpdate,
int[] colsToUpdate,
TransactionController tc)
Updates a set of base rows in a catalog with the same key on an index and updates all the corresponding index rows. |
(package private) 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final int ROWNOTDUPLICATE
private IndexInfoImpl[] indexes
private long heapConglomerate
private int numIndexesSet
private boolean heapSet
private final CatalogRowFactory crf
private boolean computedStreamStorableHeapColIds
private int[] streamStorableHeapColIds
| Constructor Detail |
|---|
TabInfoImpl(CatalogRowFactory crf)
crf - the associated CatalogRowFactory| Method Detail |
|---|
long getHeapConglomerate()
void setHeapConglomerate(long heapConglomerate)
heapConglomerate - The new heap conglomerate.long getIndexConglomerate(int indexID)
void setIndexConglomerate(int index,
long indexConglomerate)
index - Index number for index for tableindexConglomerate - The conglomerate for that indexvoid setIndexConglomerate(ConglomerateDescriptor cd)
cd - The ConglomerateDescriptor for one of the index
for this table.java.lang.String getTableName()
java.lang.String getIndexName(int indexId)
indexId - Index number for index for table
CatalogRowFactory getCatalogRowFactory()
boolean isComplete()
int getIndexColumnCount(int indexNumber)
indexNumber - The index number.
IndexRowGenerator getIndexRowGenerator(int indexNumber)
indexNumber - The index number.
void setIndexRowGenerator(int indexNumber,
IndexRowGenerator irg)
indexNumber - The index number.irg - The IndexRowGenerator for the specified index number.int getNumberOfIndexes()
int getBaseColumnPosition(int indexNumber,
int colNumber)
indexNumber - The index numbercolNumber - The column number within the index
boolean isIndexUnique(int indexNumber)
indexNumber - The index number
int insertRow(ExecRow row,
TransactionController tc)
throws StandardException
row - row to inserttc - transaction
StandardException - Thrown on failure
int insertRowList(ExecRow[] rowList,
TransactionController tc)
throws StandardException
rowList - List of rows to inserttc - transaction controller
StandardException - Thrown on failure
private int insertRowListImpl(ExecRow[] rowList,
TransactionController tc,
RowLocation[] rowLocationOut)
throws StandardException
rowList - the list of rows to inserttc - transaction controllerrowLocationOut - on output rowLocationOut[0] is set to the
last RowLocation inserted.
StandardException
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 failure
int deleteRow(TransactionController tc,
ExecIndexRow key,
int indexNumber,
boolean wait)
throws StandardException
StandardException
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)
private int deleteRows(TransactionController tc,
ExecIndexRow startKey,
int startOp,
Qualifier[][] qualifier,
TupleFilter filter,
ExecIndexRow stopKey,
int stopOp,
int indexNumber,
boolean wait)
throws StandardException
StandardException
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 failure
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)
ExecRow getRow(TransactionController tc,
ConglomerateController heapCC,
ExecIndexRow key,
int indexNumber)
throws StandardException
LOCKING: shared row locking.
tc - transaction controllerheapCC - heap to look inkey - key to read by.indexNumber - Key is appropriate for this index.
StandardException - Thrown on failure
private ExecRow getRowInternal(TransactionController tc,
ConglomerateController heapCC,
ExecIndexRow key,
int indexNumber,
RowLocation[] rl)
throws StandardException
StandardException - Thrown on failure
void updateRow(ExecIndexRow key,
ExecRow newRow,
int indexNumber,
boolean[] indicesToUpdate,
int[] colsToUpdate,
TransactionController tc)
throws StandardException
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 - array of ints indicating which columns (1 based)
to update. If null, do all.tc - transaction controller
StandardException - Thrown on failure
void updateRow(ExecIndexRow key,
ExecRow[] newRows,
int indexNumber,
boolean[] indicesToUpdate,
int[] colsToUpdate,
TransactionController tc)
throws StandardException
key - key rownewRows - new version of the array 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 - array of ints indicating which columns (1 based)
to update. If null, do all.tc - transaction controller
StandardException - Thrown on failurejava.util.Properties getCreateHeapProperties()
java.util.Properties getCreateIndexProperties(int indexNumber)
indexNumber - The specified index number.
private RowChanger getRowChanger(TransactionController tc,
int[] changedCols,
ExecRow baseRow)
throws StandardException
tc - transaction controllerchangedCols - the columns to change (1 based), may be nullbaseRow - used to detemine column types at creation time
only. The row changer does ***Not*** keep a referance to
this row or change it in any way.
StandardException - Thrown on failure
private int[] getStreamStorableHeapColIds(ExecRow baseRow)
throws StandardException
StandardException
private ExecIndexRow getIndexRowFromHeapRow(IndexRowGenerator irg,
RowLocation rl,
ExecRow heapRow)
throws StandardException
irg - IndexRowGenerator to userl - RowLocation for heapheapRow - Row from the heap
StandardException - Thrown on errorpublic java.lang.String toString()
toString in class java.lang.Object
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||