|
|||||||||
| Home >> All >> org >> apache >> derby >> impl >> sql >> [ execute overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.impl.sql.execute
Class HashTableResultSet

java.lang.Objectorg.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
org.apache.derby.impl.sql.execute.NoPutResultSetImpl
org.apache.derby.impl.sql.execute.HashTableResultSet
- All Implemented Interfaces:
- org.apache.derby.iapi.sql.execute.CursorResultSet, org.apache.derby.iapi.sql.execute.NoPutResultSet, org.apache.derby.iapi.sql.ResultSet, org.apache.derby.iapi.store.access.RowLocationRetRowSource, org.apache.derby.iapi.store.access.RowSource
- public class HashTableResultSet
- extends NoPutResultSetImpl
- implements org.apache.derby.iapi.sql.execute.CursorResultSet
- extends NoPutResultSetImpl
Builds a hash table on the underlying result set tree.
| Fields inherited from interface org.apache.derby.iapi.sql.ResultSet |
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST |
| Fields inherited from interface org.apache.derby.iapi.sql.execute.NoPutResultSet |
ABSOLUTE, FIRST, LAST, NEXT, PREVIOUS, RELATIVE |
| Constructor Summary | |
HashTableResultSet(org.apache.derby.iapi.sql.execute.NoPutResultSet s,
org.apache.derby.iapi.sql.Activation a,
org.apache.derby.iapi.services.loader.GeneratedMethod str,
org.apache.derby.iapi.store.access.Qualifier[][] nextQualifiers,
org.apache.derby.iapi.services.loader.GeneratedMethod p,
int resultSetNumber,
int mapRefItem,
boolean reuseResult,
int keyColItem,
boolean removeDuplicates,
long maxInMemoryRowCount,
int initialCapacity,
float loadFactor,
boolean skipNullKeyColumns,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost,
org.apache.derby.iapi.services.loader.GeneratedMethod c)
|
|
| Method Summary | |
protected void |
addWarning(java.sql.SQLWarning w)
|
protected void |
attachStatementContext()
Attach this result set to the top statement context on the stack. |
boolean |
checkRowPosition(int isType)
Determine if the cursor is before the first row in the result set. |
void |
cleanUp()
Clean up on error |
void |
clearCurrentRow()
Clear the current row |
protected void |
clearOrderableCache(org.apache.derby.iapi.store.access.Qualifier[][] qualifiers)
Clear the Orderable cache for each qualifier. |
void |
close()
If the result set has been opened, close the open scan. |
void |
closeRowSource()
closeRowSource tells the RowSource that it will no longer need to return any rows and it can release any resource it may have. |
private org.apache.derby.iapi.sql.execute.ExecRow |
doProjection(org.apache.derby.iapi.sql.execute.ExecRow sourceRow)
Do the projection against the source row. |
protected java.lang.String |
dumpTimeStats(java.lang.String indent,
java.lang.String subIndent)
Dump out the time information for run time stats. |
void |
finish()
Tells the system that there will be no more access to any database information via this result set; in particular, no more calls to open(). |
protected void |
finishAndRTS()
|
org.apache.derby.iapi.sql.execute.ExecRow |
getAbsoluteRow(int row)
Returns the row at the absolute position from the query, and returns NULL when there is no such position. |
org.apache.derby.iapi.sql.ResultSet |
getAutoGeneratedKeysResultset()
ResultSet for rows inserted into the table (contains auto-generated keys columns only) |
java.sql.Timestamp |
getBeginExecutionTimestamp()
Get the Timestamp for the beginning of execution. |
protected org.apache.derby.iapi.sql.execute.ExecRow |
getCompactRow(org.apache.derby.iapi.sql.execute.ExecRow candidate,
org.apache.derby.iapi.services.io.FormatableBitSet accessedCols,
org.apache.derby.iapi.services.io.FormatableBitSet otherCols,
boolean isKeyed)
Get a compacted version of the candidate row according to the columns specified in the bit map. |
org.apache.derby.iapi.sql.execute.ExecRow |
getCurrentRow()
Gets last row returned. |
protected long |
getCurrentTimeMillis()
Return the current time in milliseconds, if DEBUG and RunTimeStats is on, else return 0. |
java.lang.String |
getCursorName()
Return my cursor name for JDBC. |
protected long |
getElapsedMillis(long beginTime)
Return the elapsed time in milliseconds, between now and the beginTime, if DEBUG and RunTimeStats is on, else return 0. |
java.sql.Timestamp |
getEndExecutionTimestamp()
Get the Timestamp for the end of execution. |
double |
getEstimatedRowCount()
Get the estimated row count from this result set. |
long |
getExecuteTime()
Get the execution time in milliseconds. |
(package private) org.apache.derby.iapi.sql.execute.ExecutionFactory |
getExecutionFactory()
Get a execution factory |
org.apache.derby.iapi.sql.execute.ExecRow |
getFirstRow()
Returns the first row from the query, and returns NULL when there are no rows. |
protected org.apache.derby.iapi.sql.conn.LanguageConnectionContext |
getLanguageConnectionContext()
Cache the language connection context. |
org.apache.derby.iapi.sql.execute.ExecRow |
getLastRow()
Returns the last row from the query, and returns NULL when there are no rows. |
org.apache.derby.iapi.sql.execute.ExecRow |
getNextRow()
Return the requested values computed from the next row (if any) for which the restriction evaluates to true. |
org.apache.derby.iapi.sql.execute.ExecRow |
getNextRowCore()
Return the requested values computed from the next row (if any) for which the restriction evaluates to true. |
org.apache.derby.iapi.types.DataValueDescriptor[] |
getNextRowFromRowSource()
Get the next row as an array of column objects. |
int |
getPointOfAttachment()
Return the point of attachment for this subquery. |
org.apache.derby.iapi.sql.execute.ExecRow |
getPreviousRow()
Returns the previous row from the query, and returns NULL when there are no more previous rows. |
org.apache.derby.iapi.sql.execute.ExecRow |
getRelativeRow(int row)
Returns the row at the relative position from the current cursor position, and returns NULL when there is no such position. |
org.apache.derby.iapi.sql.ResultDescription |
getResultDescription()
Returns the description of the table's rows |
org.apache.derby.iapi.types.RowLocation |
getRowLocation()
Gets information from its source. |
int |
getRowNumber()
Returns the row number of the current row. |
int |
getScanIsolationLevel()
Return the isolation level of the scan in the result set. |
org.apache.derby.iapi.sql.execute.NoPutResultSet[] |
getSubqueryTrackingArray(int numSubqueries)
Get the subquery ResultSet tracking array from the top ResultSet. |
long |
getTimeSpent(int type)
Return the total amount of time spent in this ResultSet |
(package private) org.apache.derby.iapi.store.access.TransactionController |
getTransactionController()
Get the current transaction controller. |
org.apache.derby.iapi.services.io.FormatableBitSet |
getValidColumns()
getValidColumns describes the DataValueDescriptor[] returned by all calls to the getNextRowFromRowSource() call. |
java.sql.SQLWarning |
getWarnings()
Return the set of warnings generated during the execution of this result set. |
boolean |
isClosed()
Report if closed. |
boolean |
isForUpdate()
Is this ResultSet or it's source result set for update |
void |
markAsTopResultSet()
Mark the ResultSet as the topmost one in the ResultSet tree. |
int |
modifiedRowCount()
Returns the number of rows affected by the statement. |
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 |
needsToClone()
Does the caller of getNextRowFromRowSource() need to clone the row in order to keep a reference to the row past the getNextRowFromRowSource() call which returned the row. |
void |
open()
open a scan on the table. |
void |
openCore()
open a scan on the table. |
static java.lang.String |
printQualifiers(org.apache.derby.iapi.store.access.Qualifier[][] qualifiers)
Return a 2-d array of Qualifiers as a String |
void |
reopenCore()
reopen a scan on the table. |
boolean |
requiresRelocking()
Do we need to relock the row when going to the heap. |
private void |
resetProbeVariables()
|
int |
resultSetNumber()
Get the number of this ResultSet, which is guaranteed to be unique within a statement. |
boolean |
returnsRows()
Returns true. |
void |
rowLocation(org.apache.derby.iapi.types.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. |
org.apache.derby.iapi.sql.execute.ExecRow |
setAfterLastRow()
Sets the current position to after the last row and returns NULL because there is no current row. |
org.apache.derby.iapi.sql.execute.ExecRow |
setBeforeFirstRow()
Sets the current position to before the first row and returns NULL because there is no current row. |
protected void |
setCheckConstraints(org.apache.derby.iapi.services.loader.GeneratedMethod checkGM)
Set the GeneratedMethod for enforcing check constraints |
protected org.apache.derby.iapi.sql.execute.ExecRow |
setCompactRow(org.apache.derby.iapi.sql.execute.ExecRow candidateRow,
org.apache.derby.iapi.sql.execute.ExecRow compactRow)
Copy columns from the candidate row from the store to the given compact row. |
protected void |
setCompatRow(org.apache.derby.iapi.sql.execute.ExecRow compactRow,
java.lang.Object[] sourceRow)
|
void |
setCurrentRow(org.apache.derby.iapi.sql.execute.ExecRow row)
Set the current row to the row passed in. |
protected void |
setHeapConglomerate(long heapConglomerate)
Set the heap conglomerate number (used in enforcing check constraints) |
void |
setNeedsRowLocation(boolean needsRowLocation)
Set whether or not the NPRS need the row location when acting as a row source. |
void |
setTargetResultSet(org.apache.derby.iapi.sql.execute.TargetResultSet trs)
Notify a NPRS that it is the source for the specified TargetResultSet. |
protected boolean |
skipRow(org.apache.derby.iapi.sql.execute.ExecRow row)
Return true if we should skip the scan due to nulls in the row when the start or stop positioners on the columns containing null do not implement ordered null semantics. |
protected boolean |
skipScan(org.apache.derby.iapi.sql.execute.ExecIndexRow startPosition,
org.apache.derby.iapi.sql.execute.ExecIndexRow stopPosition)
Return true if we should skip the scan due to nulls in the start or stop position when the predicate on the column(s) in question do not implement ordered null semantics. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.derby.iapi.sql.ResultSet |
checkRowPosition, cleanUp, finish, getAbsoluteRow, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRow |
| Field Detail |
restrictionTime
public long restrictionTime
projectionTime
public long projectionTime
hashtableSize
public int hashtableSize
scanProperties
public java.util.Properties scanProperties
source
public org.apache.derby.iapi.sql.execute.NoPutResultSet source
singleTableRestriction
public org.apache.derby.iapi.services.loader.GeneratedMethod singleTableRestriction
nextQualifiers
public org.apache.derby.iapi.store.access.Qualifier[][] nextQualifiers
projection
private org.apache.derby.iapi.services.loader.GeneratedMethod projection
projectMapping
private int[] projectMapping
closeCleanup
private org.apache.derby.iapi.services.loader.GeneratedMethod closeCleanup
runTimeStatsOn
private boolean runTimeStatsOn
mappedResultRow
private org.apache.derby.iapi.sql.execute.ExecRow mappedResultRow
reuseResult
public boolean reuseResult
keyColumns
public int[] keyColumns
removeDuplicates
private boolean removeDuplicates
maxInMemoryRowCount
private long maxInMemoryRowCount
initialCapacity
private int initialCapacity
loadFactor
private float loadFactor
skipNullKeyColumns
private boolean skipNullKeyColumns
firstNext
private boolean firstNext
numFetchedOnNext
private int numFetchedOnNext
entryVectorSize
private int entryVectorSize
entryVector
private java.util.Vector entryVector
hashTableBuilt
private boolean hashTableBuilt
firstIntoHashtable
private boolean firstIntoHashtable
nextCandidate
private org.apache.derby.iapi.sql.execute.ExecRow nextCandidate
projRow
private org.apache.derby.iapi.sql.execute.ExecRow projRow
ht
private org.apache.derby.iapi.store.access.BackingStoreHashtable ht
resultSetNumber
public final int resultSetNumber
indent
protected java.lang.String indent
subIndent
protected java.lang.String subIndent
sourceDepth
protected int sourceDepth
clonedExecRow
protected org.apache.derby.iapi.sql.execute.ExecRow clonedExecRow
checkGM
org.apache.derby.iapi.services.loader.GeneratedMethod checkGM
heapConglomerate
long heapConglomerate
targetResultSet
protected org.apache.derby.iapi.sql.execute.TargetResultSet targetResultSet
checkNullCols
protected int[] checkNullCols
cncLen
protected int cncLen
isOpen
protected boolean isOpen
finished
protected boolean finished
currentRow
protected org.apache.derby.iapi.sql.execute.ExecRow currentRow
isTopResultSet
protected boolean isTopResultSet
lcc
protected org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc
numOpens
public int numOpens
rowsSeen
public int rowsSeen
rowsFiltered
public int rowsFiltered
startExecutionTime
protected long startExecutionTime
endExecutionTime
protected long endExecutionTime
beginTime
public long beginTime
constructorTime
public long constructorTime
openTime
public long openTime
nextTime
public long nextTime
closeTime
public long closeTime
optimizerEstimatedRowCount
public double optimizerEstimatedRowCount
optimizerEstimatedCost
public double optimizerEstimatedCost
subqueryTrackingArray
public org.apache.derby.iapi.sql.execute.NoPutResultSet[] subqueryTrackingArray
compactRow
org.apache.derby.iapi.sql.execute.ExecRow compactRow
activation
protected org.apache.derby.iapi.sql.Activation activation
resultDescription
org.apache.derby.iapi.sql.ResultDescription resultDescription
| Constructor Detail |
HashTableResultSet
public HashTableResultSet(org.apache.derby.iapi.sql.execute.NoPutResultSet s, org.apache.derby.iapi.sql.Activation a, org.apache.derby.iapi.services.loader.GeneratedMethod str, org.apache.derby.iapi.store.access.Qualifier[][] nextQualifiers, org.apache.derby.iapi.services.loader.GeneratedMethod p, int resultSetNumber, int mapRefItem, boolean reuseResult, int keyColItem, boolean removeDuplicates, long maxInMemoryRowCount, int initialCapacity, float loadFactor, boolean skipNullKeyColumns, double optimizerEstimatedRowCount, double optimizerEstimatedCost, org.apache.derby.iapi.services.loader.GeneratedMethod c) throws org.apache.derby.iapi.error.StandardException
| Method Detail |
openCore
public void openCore()
throws org.apache.derby.iapi.error.StandardException
- open a scan on the table. scan parameters are evaluated
at each open, so there is probably some way of altering
their values...
- Specified by:
openCorein interfaceorg.apache.derby.iapi.sql.execute.NoPutResultSet- Specified by:
openCorein classBasicNoPutResultSetImpl
reopenCore
public void reopenCore()
throws org.apache.derby.iapi.error.StandardException
- reopen a scan on the table. scan parameters are evaluated
at each open, so there is probably some way of altering
their values...
- Specified by:
reopenCorein interfaceorg.apache.derby.iapi.sql.execute.NoPutResultSet- Overrides:
reopenCorein classBasicNoPutResultSetImpl
resetProbeVariables
private void resetProbeVariables()
throws org.apache.derby.iapi.error.StandardException
getNextRowCore
public org.apache.derby.iapi.sql.execute.ExecRow getNextRowCore() throws org.apache.derby.iapi.error.StandardException
- Return the requested values computed
from the next row (if any) for which
the restriction evaluates to true.
restriction and projection parameters are evaluated for each row.
- Specified by:
getNextRowCorein interfaceorg.apache.derby.iapi.sql.execute.NoPutResultSet- Specified by:
getNextRowCorein classBasicNoPutResultSetImpl
getTimeSpent
public long getTimeSpent(int type)
- Return the total amount of time spent in this ResultSet
- Specified by:
getTimeSpentin interfaceorg.apache.derby.iapi.sql.ResultSet
close
public void close()
throws org.apache.derby.iapi.error.StandardException
- If the result set has been opened,
close the open scan.
- Specified by:
closein interfaceorg.apache.derby.iapi.sql.ResultSet- Overrides:
closein classNoPutResultSetImpl
getRowLocation
public org.apache.derby.iapi.types.RowLocation getRowLocation() throws org.apache.derby.iapi.error.StandardException
- Gets information from its source. We might want
to have this take a CursorResultSet in its constructor some day,
instead of doing a cast here?
- Specified by:
getRowLocationin interfaceorg.apache.derby.iapi.sql.execute.CursorResultSet
getCurrentRow
public org.apache.derby.iapi.sql.execute.ExecRow getCurrentRow() throws org.apache.derby.iapi.error.StandardException
- Gets last row returned.
- Specified by:
getCurrentRowin interfaceorg.apache.derby.iapi.sql.execute.CursorResultSet
doProjection
private org.apache.derby.iapi.sql.execute.ExecRow doProjection(org.apache.derby.iapi.sql.execute.ExecRow sourceRow) throws org.apache.derby.iapi.error.StandardException
- Do the projection against the source row. Use reflection
where necessary, otherwise get the source column into our
result row.
getNextRowFromRowSource
public org.apache.derby.iapi.types.DataValueDescriptor[] getNextRowFromRowSource() throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
org.apache.derby.iapi.store.access.RowSource - Get the next row as an array of column objects. The column objects can
be a JBMS Storable or any
Serializable/Externalizable/Formattable/Streaming type.
A return of null indicates that the complete set of rows has been read.A null column can be specified by leaving the object null, or indicated by returning a non-null getValidColumns. On streaming columns, it can be indicated by returning a non-null get FieldStates.
If RowSource.needToClone() is true then the returned row (the DataValueDescriptor[]) is guaranteed not to be modified by drainer of the RowSource (except that the input stream will be read, of course) and drainer will keep no reference to it before making the subsequent nextRow call. So it is safe to return the same DataValueDescriptor[] in subsequent nextRow calls if that is desirable for performance reasons.
If RowSource.needToClone() is false then the returned row (the DataValueDescriptor[]) may be be modified by drainer of the RowSource, and the drainer may keep a reference to it after making the subsequent nextRow call. In this case the client should severe all references to the row after returning it from getNextRowFromRowSource().
- Specified by:
getNextRowFromRowSourcein interfaceorg.apache.derby.iapi.store.access.RowSource- Overrides:
getNextRowFromRowSourcein classNoPutResultSetImpl
isForUpdate
public boolean isForUpdate()
- Is this ResultSet or it's source result set for update
- Specified by:
isForUpdatein interfaceorg.apache.derby.iapi.sql.execute.NoPutResultSet- Overrides:
isForUpdatein classNoPutResultSetImpl
getResultDescription
public org.apache.derby.iapi.sql.ResultDescription getResultDescription()
- Returns the description of the table's rows
- Specified by:
getResultDescriptionin interfaceorg.apache.derby.iapi.sql.ResultSet- Overrides:
getResultDescriptionin classBasicNoPutResultSetImpl
getCursorName
public java.lang.String getCursorName()
- Return my cursor name for JDBC. Can be null.
resultSetNumber
public int resultSetNumber()
- Description copied from interface:
org.apache.derby.iapi.sql.execute.NoPutResultSet - Get the number of this ResultSet, which is guaranteed to be unique
within a statement.
- Specified by:
resultSetNumberin interfaceorg.apache.derby.iapi.sql.execute.NoPutResultSet- Overrides:
resultSetNumberin classBasicNoPutResultSetImpl
setTargetResultSet
public void setTargetResultSet(org.apache.derby.iapi.sql.execute.TargetResultSet trs)
- Description copied from interface:
org.apache.derby.iapi.sql.execute.NoPutResultSet - Notify a NPRS that it is the source for the specified
TargetResultSet. This is useful when doing bulk insert.
setNeedsRowLocation
public void setNeedsRowLocation(boolean needsRowLocation)
- Description copied from interface:
org.apache.derby.iapi.sql.execute.NoPutResultSet - Set whether or not the NPRS need the row location when acting
as a row source. (The target result set determines this.)
getValidColumns
public org.apache.derby.iapi.services.io.FormatableBitSet getValidColumns()
- Description copied from interface:
org.apache.derby.iapi.store.access.RowSource - getValidColumns describes the DataValueDescriptor[] returned by all calls
to the getNextRowFromRowSource() call.
If getValidColumns returns null, the number of columns is given by the
DataValueDescriptor.length where DataValueDescriptor[] is returned by the
preceeding getNextRowFromRowSource() call. Column N maps to
DataValueDescriptor[N], where column numbers start at zero.
If getValidColumns return a non null validColumns FormatableBitSet the number of
columns is given by the number of bits set in validColumns. Column N is
not in the partial row if validColumns.get(N) returns false. Column N is
in the partial row if validColumns.get(N) returns true. If column N is
in the partial row then it maps to DataValueDescriptor[M] where M is the
count of calls to validColumns.get(i) that return true where i < N. If
DataValueDescriptor.length is greater than the number of columns
indicated by validColumns the extra entries are ignored.
needsToClone
public boolean needsToClone()
- Description copied from interface:
org.apache.derby.iapi.store.access.RowSource - Does the caller of getNextRowFromRowSource() need to clone the row
in order to keep a reference to the row past the
getNextRowFromRowSource() call which returned the row. This call
must always return the same for all rows in a RowSource (ie. the
caller will call this once per scan from a RowSource and assume the
behavior is true for all rows in the RowSource).
closeRowSource
public void closeRowSource()
- Description copied from interface:
org.apache.derby.iapi.store.access.RowSource - closeRowSource tells the RowSource that it will no longer need to
return any rows and it can release any resource it may have.
Subsequent call to any method on the RowSource will result in undefined
behavior. A closed rowSource can be closed again.
needsRowLocation
public boolean needsRowLocation()
- Description copied from interface:
org.apache.derby.iapi.store.access.RowLocationRetRowSource - needsRowLocation returns true iff this the row source expects the
drainer of the row source to call rowLocation after getting a row from
getNextRowFromRowSource.
rowLocation
public void rowLocation(org.apache.derby.iapi.types.RowLocation rl) throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
org.apache.derby.iapi.store.access.RowLocationRetRowSource - 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 guarentee 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).
clearOrderableCache
protected void clearOrderableCache(org.apache.derby.iapi.store.access.Qualifier[][] qualifiers) throws org.apache.derby.iapi.error.StandardException
- Clear the Orderable cache for each qualifier.
(This should be done each time a scan/conglomerate with
qualifiers is reopened.)
setCheckConstraints
protected void setCheckConstraints(org.apache.derby.iapi.services.loader.GeneratedMethod checkGM)
- Set the GeneratedMethod for enforcing check constraints
setHeapConglomerate
protected void setHeapConglomerate(long heapConglomerate)
- Set the heap conglomerate number (used in enforcing check constraints)
setCurrentRow
public final void setCurrentRow(org.apache.derby.iapi.sql.execute.ExecRow row)
- Set the current row to the row passed in.
clearCurrentRow
public final void clearCurrentRow()
- Clear the current row
skipScan
protected boolean skipScan(org.apache.derby.iapi.sql.execute.ExecIndexRow startPosition, org.apache.derby.iapi.sql.execute.ExecIndexRow stopPosition) throws org.apache.derby.iapi.error.StandardException
- Return true if we should skip the scan due to nulls in the start
or stop position when the predicate on the column(s) in question
do not implement ordered null semantics. beetle 4464, we also compact
the areNullsOrdered flags into checkNullCols here.
skipRow
protected boolean skipRow(org.apache.derby.iapi.sql.execute.ExecRow row) throws org.apache.derby.iapi.error.StandardException
- Return true if we should skip the scan due to nulls in the row
when the start or stop positioners on the columns containing
null do not implement ordered null semantics.
printQualifiers
public static java.lang.String printQualifiers(org.apache.derby.iapi.store.access.Qualifier[][] qualifiers)
- Return a 2-d array of Qualifiers as a String
getPointOfAttachment
public int getPointOfAttachment()
- Description copied from interface:
org.apache.derby.iapi.sql.execute.NoPutResultSet - Return the point of attachment for this subquery.
(Only meaningful for Any and Once ResultSets, which can and will only
be at the top of a ResultSet for a subquery.)
- Specified by:
getPointOfAttachmentin interfaceorg.apache.derby.iapi.sql.execute.NoPutResultSet
markAsTopResultSet
public void markAsTopResultSet()
- Mark the ResultSet as the topmost one in the ResultSet tree.
Useful for closing down the ResultSet on an error.
- Specified by:
markAsTopResultSetin interfaceorg.apache.derby.iapi.sql.execute.NoPutResultSet
getScanIsolationLevel
public int getScanIsolationLevel()
- Description copied from interface:
org.apache.derby.iapi.sql.execute.NoPutResultSet - Return the isolation level of the scan in the result set.
Only expected to be called for those ResultSets that
contain a scan.
- Specified by:
getScanIsolationLevelin interfaceorg.apache.derby.iapi.sql.execute.NoPutResultSet
getEstimatedRowCount
public double getEstimatedRowCount()
- Description copied from interface:
org.apache.derby.iapi.sql.execute.NoPutResultSet - Get the estimated row count from this result set.
- Specified by:
getEstimatedRowCountin interfaceorg.apache.derby.iapi.sql.execute.NoPutResultSet
requiresRelocking
public boolean requiresRelocking()
- Description copied from interface:
org.apache.derby.iapi.sql.execute.NoPutResultSet - Do we need to relock the row when going to the heap.
- Specified by:
requiresRelockingin interfaceorg.apache.derby.iapi.sql.execute.NoPutResultSet
open
public final void open()
throws org.apache.derby.iapi.error.StandardException
- open a scan on the table. scan parameters are evaluated
at each open, so there is probably some way of altering
their values...
NOTE: This method should only be called on the top ResultSet
of a ResultSet tree to ensure that the entire ResultSet
tree gets closed down on an error. the openCore() method
will be called for all other ResultSets in the tree.
- Specified by:
openin interfaceorg.apache.derby.iapi.sql.ResultSet
getAbsoluteRow
public org.apache.derby.iapi.sql.execute.ExecRow getAbsoluteRow(int row) throws org.apache.derby.iapi.error.StandardException
- Returns the row at the absolute position from the query,
and returns NULL when there is no such position.
(Negative position means from the end of the result set.)
Moving the cursor to an invalid position leaves the cursor
positioned either before the first row (negative position)
or after the last row (positive position).
NOTE: An exception will be thrown on 0.
- Specified by:
getAbsoluteRowin interfaceorg.apache.derby.iapi.sql.ResultSet
getRelativeRow
public org.apache.derby.iapi.sql.execute.ExecRow getRelativeRow(int row) throws org.apache.derby.iapi.error.StandardException
- Returns the row at the relative position from the current
cursor position, and returns NULL when there is no such position.
(Negative position means toward the beginning of the result set.)
Moving the cursor to an invalid position leaves the cursor
positioned either before the first row (negative position)
or after the last row (positive position).
NOTE: 0 is valid.
NOTE: An exception is thrown if the cursor is not currently
positioned on a row.
- Specified by:
getRelativeRowin interfaceorg.apache.derby.iapi.sql.ResultSet
setBeforeFirstRow
public org.apache.derby.iapi.sql.execute.ExecRow setBeforeFirstRow() throws org.apache.derby.iapi.error.StandardException
- Sets the current position to before the first row and returns NULL
because there is no current row.
- Specified by:
setBeforeFirstRowin interfaceorg.apache.derby.iapi.sql.ResultSet
checkRowPosition
public boolean checkRowPosition(int isType)
throws org.apache.derby.iapi.error.StandardException
- Determine if the cursor is before the first row in the result
set.
- Specified by:
checkRowPositionin interfaceorg.apache.derby.iapi.sql.ResultSet
getRowNumber
public int getRowNumber()
- Returns the row number of the current row. Row
numbers start from 1 and go to 'n'. Corresponds
to row numbering used to position current row
in the result set (as per JDBC).
- Specified by:
getRowNumberin interfaceorg.apache.derby.iapi.sql.ResultSet
getFirstRow
public org.apache.derby.iapi.sql.execute.ExecRow getFirstRow() throws org.apache.derby.iapi.error.StandardException
- Returns the first row from the query, and returns NULL when there
are no rows.
- Specified by:
getFirstRowin interfaceorg.apache.derby.iapi.sql.ResultSet
getNextRow
public final org.apache.derby.iapi.sql.execute.ExecRow getNextRow() throws org.apache.derby.iapi.error.StandardException
- Return the requested values computed
from the next row (if any) for which
the restriction evaluates to true.
restriction and projection parameters are evaluated for each row. NOTE: This method should only be called on the top ResultSet of a ResultSet tree to ensure that the entire ResultSet tree gets closed down on an error. the getNextRowCore() method will be called for all other ResultSets in the tree.
- Specified by:
getNextRowin interfaceorg.apache.derby.iapi.sql.ResultSet
getPreviousRow
public org.apache.derby.iapi.sql.execute.ExecRow getPreviousRow() throws org.apache.derby.iapi.error.StandardException
- Returns the previous row from the query, and returns NULL when there
are no more previous rows.
- Specified by:
getPreviousRowin interfaceorg.apache.derby.iapi.sql.ResultSet
getLastRow
public org.apache.derby.iapi.sql.execute.ExecRow getLastRow() throws org.apache.derby.iapi.error.StandardException
- Returns the last row from the query, and returns NULL when there
are no rows.
- Specified by:
getLastRowin interfaceorg.apache.derby.iapi.sql.ResultSet
setAfterLastRow
public org.apache.derby.iapi.sql.execute.ExecRow setAfterLastRow() throws org.apache.derby.iapi.error.StandardException
- Sets the current position to after the last row and returns NULL
because there is no current row.
- Specified by:
setAfterLastRowin interfaceorg.apache.derby.iapi.sql.ResultSet
returnsRows
public boolean returnsRows()
- Returns true.
- Specified by:
returnsRowsin interfaceorg.apache.derby.iapi.sql.ResultSet
modifiedRowCount
public final int modifiedRowCount()
- Description copied from interface:
org.apache.derby.iapi.sql.ResultSet - Returns the number of rows affected by the statement.
Only valid of returnsRows() returns false.
For other DML statements, it returns the number of rows
modified by the statement. For statements that do not affect rows
(like DDL statements), it returns zero.
- Specified by:
modifiedRowCountin interfaceorg.apache.derby.iapi.sql.ResultSet
cleanUp
public void cleanUp()
throws org.apache.derby.iapi.error.StandardException
- Clean up on error
- Specified by:
cleanUpin interfaceorg.apache.derby.iapi.sql.ResultSet
isClosed
public boolean isClosed()
- Report if closed.
- Specified by:
isClosedin interfaceorg.apache.derby.iapi.sql.ResultSet
finish
public void finish()
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
org.apache.derby.iapi.sql.ResultSet - Tells the system that there will be no more access
to any database information via this result set;
in particular, no more calls to open().
Will close the result set if it is not already closed.
- Specified by:
finishin interfaceorg.apache.derby.iapi.sql.ResultSet
finishAndRTS
protected final void finishAndRTS()
throws org.apache.derby.iapi.error.StandardException
getExecuteTime
public long getExecuteTime()
- Get the execution time in milliseconds.
- Specified by:
getExecuteTimein interfaceorg.apache.derby.iapi.sql.ResultSet
getBeginExecutionTimestamp
public java.sql.Timestamp getBeginExecutionTimestamp()
- Get the Timestamp for the beginning of execution.
- Specified by:
getBeginExecutionTimestampin interfaceorg.apache
JAVADOC