#include "SSTable.h"
ReVarPCifArray<int> * SSTable::ConstrainColumnGreaterThanEqual(
CifString & target,
CifString & colName,
int & errCode);
#include "SSTable.h"
CifString cs("0.00"), col1("twist");
int errCode = 0;
SSTable s("MyTable");
...
s.SetFlags(SSTable::DT_DOUBLE, s.GetColumnIndex(col1.Text()));
s.SetPrecision(2, s.GetColumnIndex(col1.Text()));
ReVarPCifArray<int> * iArray;
iArray = s.ConstrainColumnGreaterThanEqual(cs, col1, errCode);
if (iArray) {
for (int i = 0; i < iArray->Length(); i++) {
// do something to each row with twist >= 0.00
}
}
ConstrainColumnGreaterThanEqual returns the row indices of cells in a column that are greater than or equal to the target value. You can only search a column that was constructed with a tree index. The search is dictated by the datatype of the column, since, strings, integers, and doubles get compared differently.
| target | The target value to compare to. |
| colName | The name of the column to search. |
| errCode | A reference to an integer holding the error code resulting from this operation. |
A pointer to a ReVarPCifArray<int> holding the row indices of the cells containing a value greater than or equal to the target.
A NULL value indicates a possible error or an unsuccessful search.
A negative value in errCode indicates an error or warning.
| See also: | ConstrainColumnGreaterThan |
|---|