Go to the documentation of this file.
28 #ifndef TABLES_COLUMNSINDEXARRAY_H
29 #define TABLES_COLUMNSINDEXARRAY_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/Tables/Table.h>
35 #include <casacore/casa/Arrays/Vector.h>
36 #include <casacore/casa/Containers/Block.h>
37 #include <casacore/casa/Containers/Record.h>
242 Bool lowerInclusive,
Bool upperInclusive,
Record & accessUpperKey()
void addColumnToDesc(RecordDesc &description, const TableColumn &column)
Add a column to the record description for the keys.
Description of the fields in a record object.
void deleteObjects()
Delete all data in the object.
ColumnsIndexArray(const Table &, const String &columnName)
Create an index on the given table for the given column.
Vector< uInt > getRowNumbers(Bool lowerInclusive, Bool upperInclusive, Bool unique=False)
Find the row numbers matching the key range.
Read/write access to a table column.
ColumnsIndexArray & operator=(const ColumnsIndexArray &that)
Assignment (copy semantics).
void fillRowNumbers(Vector< uInt > &rows, uInt start, uInt end, Bool unique) const
Fill the row numbers vector for the given start till end in the itsUniqueIndexArray vector (end is no...
void makeObjects(const RecordDesc &description)
Make the various internal RecordFieldPtr objects.
void getArray(Vector< uInt > &result, const String &name)
Record & accessKey()
Access the key values.
Vector< uInt > itsDataIndex
static Int compare(void *fieldPtr, void *dataPtr, Int dataType, Int index)
Compare the key in fieldPtr with the given index entry.
Main interface class to a read/write table.
Bool isUnique() const
Are all keys in the index unique?
uInt getRowNumber(Bool &found)
Find the row number matching the key.
Vector< uInt > getRowNumbers(const Record &lower, const Record &upper, Bool lowerInclusive, Bool upperInclusive, Bool unique=False)
Index to an array column in a table.
void setChanged()
Something has changed in the table, so the index has to be recreated.
Record & accessLowerKey()
void getArray(Vector< Int > &result, const String &name)
void getArray(Vector< String > &result, const String &name)
this file contains all the compiler specific defines
void copy(const ColumnsIndexArray &that)
Copy that object to this.
Vector< uInt > itsUniqueIndex
ColumnsIndexArray(const ColumnsIndexArray &that)
Copy constructor (copy semantics).
const String & columnName() const
Return the names of the columns forming the index.
void setChanged(const String &columnName)
void getArray(Vector< Int64 > &result, const String &name)
String: the storage and methods of handling collections of characters.
void fillRownrs(uInt npts, const Block< uInt > &nrel)
Fill the rownrs belonging to each array value.
bool Bool
Define the standard types used by Casacore.
Vector< uInt > getRowNumbers(Bool unique=False)
Find the row numbers matching the key.
A hierarchical collection of named fields of various types.
uInt getRowNumber(Bool &found, const Record &key)
void getArray(Vector< uChar > &result, const String &name)
Get the data if the column is an array.
void readData()
Read the data of the columns forming the index, sort them and form the index.
const Table & table() const
Get the table for which this index is created.
Vector< uInt > getRowNumbers(const Record &key, Bool unique=False)
uInt bsearch(Bool &found, void *fieldPtr) const
Do a binary search on itsUniqueIndexArray for the key in fieldPtrs.
void getArray(Vector< Short > &result, const String &name)