casacore
|
#include <TableIndexProxy.h>
Public Member Functions | |
TableIndexProxy (const TableProxy &table, const Vector< String > &columnNames, Bool noSort) | |
Construct for the given columns in the table. More... | |
TableIndexProxy (const TableIndexProxy &) | |
Copy constructor. More... | |
~TableIndexProxy () | |
Bool | isUnique () const |
Are all keys in the index unique? More... | |
Vector< String > | columnNames () const |
Return the names of the columns forming the index. More... | |
void | setChanged (const Vector< String > &columnNames) |
Something has changed in the table, so the index has to be recreated. More... | |
Int64 | getRowNumber (const Record &key) |
Find the row number matching the key. More... | |
Vector< Int64 > | getRowNumbers (const Record &key) |
Find the row numbers matching the key. More... | |
Vector< Int64 > | getRowNumbersRange (const Record &lower, const Record &upper, Bool lowerInclusive, Bool upperInclusive) |
Find the row numbers matching the key range. More... | |
Private Member Functions | |
TableIndexProxy & | operator= (const TableIndexProxy &) |
Assignment is forbidden. More... | |
Private Attributes | |
ColumnsIndex * | scaIndex_p |
ColumnsIndexArray * | arrIndex_p |
Proxy for table index access.
Public interface
TableIndexProxy gives access to indexed access to tables, both for scalar columns and array columns. It is primarily meant to be used in classes that wrap access to it from scripting languages (like Glish and Python). However, it can also be used directly from other C++ code.
A TableIndexProxy object is usually created by class TableProxy.
Definition at line 70 of file TableIndexProxy.h.
casacore::TableIndexProxy::TableIndexProxy | ( | const TableProxy & | table, |
const Vector< String > & | columnNames, | ||
Bool | noSort | ||
) |
Construct for the given columns in the table.
casacore::TableIndexProxy::TableIndexProxy | ( | const TableIndexProxy & | ) |
Copy constructor.
casacore::TableIndexProxy::~TableIndexProxy | ( | ) |
Return the names of the columns forming the index.
Find the row number matching the key.
All keys have to be unique, otherwise an exception is thrown. If no match is found, -1 is returned.
Find the row numbers matching the key.
It should be used instead of getRowNumber
if the same key can exist multiple times.
Vector<Int64> casacore::TableIndexProxy::getRowNumbersRange | ( | const Record & | lower, |
const Record & | upper, | ||
Bool | lowerInclusive, | ||
Bool | upperInclusive | ||
) |
Find the row numbers matching the key range.
The boolean arguments tell if the lower and upper key are part of the range.
Bool casacore::TableIndexProxy::isUnique | ( | ) | const |
Are all keys in the index unique?
|
private |
Assignment is forbidden.
Something has changed in the table, so the index has to be recreated.
An empty vector means that all columns have changed, otherwise only the given columns.
|
private |
Definition at line 113 of file TableIndexProxy.h.
|
private |
Definition at line 112 of file TableIndexProxy.h.