use of org.apache.derby.iapi.store.access.conglomerate.Sort in project derby by apache.
the class RAMTransaction method openSortRowSource.
/**
* @see TransactionController#openSortRowSource
* @exception StandardException Standard error policy.
*/
public RowLocationRetRowSource openSortRowSource(long id) throws StandardException {
Sort sort;
// if it doesn't exist.
if (sorts == null || id >= sorts.size() || (sort = (sorts.get((int) id))) == null) {
throw StandardException.newException(SQLState.AM_NO_SUCH_SORT, id);
}
// Open a scan row source on it.
ScanControllerRowSource sc = sort.openSortRowSource(this);
// Keep track of it so we can release on close.
scanControllers.add((ScanManager) sc);
return sc;
}
use of org.apache.derby.iapi.store.access.conglomerate.Sort in project derby by apache.
the class RAMTransaction method dropSort.
/**
* Drop a sort.
* <p>
* Drop a sort created by a call to createSort() within the current
* transaction (sorts are automatically "dropped" at the end of a
* transaction. This call should only be made after all openSortScan()'s
* and openSort()'s have been closed.
* <p>
*
* @param sortid The identifier of the sort to drop, as returned from
* createSort.
* @exception StandardException From a lower-level exception.
*/
public void dropSort(long sortid) throws StandardException {
// should call close on the sort.
Sort sort = sorts.get((int) sortid);
if (sort != null) {
sort.drop(this);
sorts.set((int) sortid, null);
freeSortIds.add((int) sortid);
}
}
Aggregations