TableIndexProxy.h
Classes
- TableIndexProxy -- Proxy for table index access. (full description)
Interface
- Public Members
- TableIndexProxy (const TableProxy& table, const Vector<String>& columnNames, Bool noSort)
- TableIndexProxy (const TableIndexProxy&)
- ~TableIndexProxy()
- Bool isUnique() const
- Vector<String> columnNames() const
- void setChanged (const Vector<String>& columnNames)
- Int getRowNumber (const Record& key)
- Vector<Int> getRowNumbers (const Record& key)
- Vector<Int> getRowNumbersRange (const Record& lower, const Record& upper, Bool lowerInclusive, Bool upperInclusive)
- Private Members
- TableIndexProxy& operator= (const TableIndexProxy&)
Review Status
- Reviewed By:
- Paul Shannon
- Date Reviewed:
- 1995/09/15
- Programs:
- Tests:
Prerequisite
- class ColumnsIndex
- class ColumnsIndexArray
Synopsis
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.
Member Description
Construct for the given columns in the table.
Copy constructor.
Are all keys in the index unique?
Return the names of the columns forming the index.
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.
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<Int> 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.
TableIndexProxy& operator= (const TableIndexProxy&)
Assignment is forbidden.