MSTableIndex.h
Classes
- MSTableIndex -- (full description)
Interface
- Public Members
- MSTableIndex()
- MSTableIndex(const Table &subTable, const Vector<String> &indexCols, ColumnsIndex::Compare *compareFunction = 0)
- MSTableIndex(const MSTableIndex &other)
- virtual ~MSTableIndex()
- MSTableIndex &operator=(const MSTableIndex &other)
- void attach(const Table &subTable, const Vector<String> &indexCols, ColumnsIndex::Compare *compareFunction = 0)
- virtual void setChanged()
- virtual Record &accessKey()
- virtual Double &time()
- virtual Double &interval()
- virtual Vector<uInt> getRowNumbers()
- virtual uInt getNearestRow(Bool &found)
- virtual Bool isNull()
- virtual Table &table()
- Private Members
- void clear()
- void makeKeys()
- Bool keysChanged()
- void getInternals()
- void nearestTime()
Review Status
- Date Reviewed:
- yyyy/mm/dd
Prerequisite
- MeasurementSet
- ColumnsIndex
Etymology
Synopsis
Example
Motivation
Thrown Exceptions
To Do
- Make the searches smarter - for TIME sorted tables, if the time to search is
past the last seach, there's no need to search any earlier times.
- Need to handle the INTERVAL=-1 case fully
Member Description
no index attached, use the attach function or assignment operator to change that
construct one using the indicated subtable which is part of the parent MS
using the indicated index columns. All index columns must be scalar integer
columns. TIME and INTERVAL will be used when present. A compare function
can be provided to over-ride literal matching of column values.
MSTableIndex(const MSTableIndex &other)
construct one from another
MSTableIndex &operator=(const MSTableIndex &other)
assignment operator, refernce semantics
void attach(const Table &subTable, const Vector<String> &indexCols, ColumnsIndex::Compare *compareFunction = 0)
attach this to a subtable using indexCols
Call this when an index in an existing row has changed. There is no need to
call this when new rows are added to the table
access the record of index (integer) keys
virtual Double &time()
access the TIME to use in the search (seconds)
virtual Double &interval()
access the INTERVAL to use in the search (seconds), must be >= 0
get all of the rows in the subTable which have data during the indicated time and
interval values. For now, this code will miss the case where the subtable has
interval = -1 and the start time is outside of the time range implied by the time
and interval. If the table has changed and the time is >
get the row number which falls in the interval and has the time nearest to the
center of the interval (time()). This also has the same problem as the previous function.
virtual Bool isNull()
is this attached to a null table
return the subtable being indexed