#include "SSTable.h"
int SSTable::SetPrecision(unsigned int newP, int colIndex);
#include "SSTable.h"
SSTable * pTable = new SSTable();
... // do table construction
// Set all columns to doubles with 3 decimals precision
for (int i = 0; i < pTable->GetNumColumns(); i++) {
pTable->SetFlags(SSTable::DT_DOUBLE, i);
pTable->SetPrecision(3, i);
}
SetPrecision sets the number of significant decimal places for the data in a column. This precision only has meaning for columns with a datatype of DT_DOUBLE.
| newP | The new precision, in decimal places. |
| colIndex | The index of the column to have precision set. |
A negative value indicates an error or warning.
| See also: | Column Option Constants |
|---|