Interface RowLocationRetRowSource
-
- All Superinterfaces:
RowSource
- All Known Subinterfaces:
NoPutResultSet
,ScanControllerRowSource
- All Known Implementing Classes:
AlterTableConstantAction
,AnyResultSet
,BasicNoPutResultSetImpl
,BulkTableScanResultSet
,CardinalityCounter
,CurrentOfResultSet
,DependentResultSet
,DistinctGroupedAggregateResultSet
,DistinctScalarAggregateResultSet
,DistinctScanResultSet
,GenericAggregateResultSet
,GroupedAggregateResultSet
,HashJoinResultSet
,HashLeftOuterJoinResultSet
,HashScanResultSet
,HashTableResultSet
,IndexRowToBaseRowResultSet
,JoinResultSet
,LastIndexKeyResultSet
,MaterializedResultSet
,MergeJoinResultSet
,MergeScanRowSource
,MultiProbeTableScanResultSet
,NestedLoopJoinResultSet
,NestedLoopLeftOuterJoinResultSet
,NoPutResultSetImpl
,NormalizeResultSet
,OnceResultSet
,ProjectRestrictResultSet
,RowCountResultSet
,RowResultSet
,ScalarAggregateResultSet
,ScanResultSet
,ScrollInsensitiveResultSet
,SetOpResultSet
,SortBufferRowSource
,SortResultSet
,TableScanResultSet
,TemporaryRowHolderResultSet
,UnionResultSet
,ValidateCheckConstraintResultSet
,VTIResultSet
,WindowResultSet
public interface RowLocationRetRowSource extends RowSource
A RowLocationRetRowSource is the mechanism for iterating over a set of rows, loading those rows into a conglomerate, and returning the RowLocation of the inserted rows.- See Also:
RowSource
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
needsRowLocation()
needsRowLocation returns true iff this the row source expects the drainer of the row source to call rowLocation after getting a row from getNextRowFromRowSource.boolean
needsRowLocationForDeferredCheckConstraints()
void
offendingRowLocation(RowLocation rl, long containdId)
void
rowLocation(RowLocation rl)
rowLocation is a callback for the drainer of the row source to return the rowLocation of the current row, i.e, the row that is being returned by getNextRowFromRowSource.-
Methods inherited from interface org.apache.derby.iapi.store.access.RowSource
closeRowSource, getNextRowFromRowSource, getValidColumns, needsToClone
-
-
-
-
Method Detail
-
needsRowLocation
boolean needsRowLocation()
needsRowLocation returns true iff this the row source expects the drainer of the row source to call rowLocation after getting a row from getNextRowFromRowSource.- Returns:
- true iff this row source expects some row location to be returned
- See Also:
rowLocation(org.apache.derby.iapi.types.RowLocation)
-
needsRowLocationForDeferredCheckConstraints
boolean needsRowLocationForDeferredCheckConstraints()
-
rowLocation
void rowLocation(RowLocation rl) throws StandardException
rowLocation is a callback for the drainer of the row source to return the rowLocation of the current row, i.e, the row that is being returned by getNextRowFromRowSource. This interface is for the purpose of loading a base table with index. In that case, the indices can be built at the same time the base table is laid down once the row location of the base row is known. This is an example pseudo code on how this call is expected to be used:boolean needsRL = rowSource.needsRowLocation(); DataValueDescriptor[] row; while((row = rowSource.getNextRowFromRowSource()) != null) { RowLocation rl = heapConglomerate.insertRow(row); if (needsRL) rowSource.rowLocation(rl); }
NeedsRowLocation and rowLocation will ONLY be called by a drainer of the row source which CAN return a row location. Drainer of row source which cannot return rowLocation will guarantee to not call either callbacks. Conversely, if NeedsRowLocation is called and it returns true, then for every row return by getNextRowFromRowSource, a rowLocation callback must also be issued with the row location of the row. Implementor of both the source and the drain of the row source must be aware of this protocol.
The RowLocation object is own by the caller of rowLocation, in other words, the drainer of the RowSource. This is so that we don't need to new a row location for every row. If the Row Source wants to keep the row location, it needs to clone it (RowLocation is a ClonableObject).- Throws:
StandardException
- on error
-
offendingRowLocation
void offendingRowLocation(RowLocation rl, long containdId) throws StandardException
- Throws:
StandardException
-
-