next up previous contents
Next: InsertColumn Up: Column methods Previous: Column methods

AddColumn

NAME AddColumn

PROTOTYPE

#include "SSTable.h"

int SSTable::AddColumn(const char * newColumnName,
                       int makeTree = 0,
                       char opts = DEFAULT_OPTIONS);

EXAMPLE

#include "SSTable.h"
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif

SSTable * pTable = new SSTable();
pTable->AddColumn("NextToLastColumn");
pTable->AddColumn("LastColumn", TRUE, SSTable::DT_STRING |
  SSTable::CASE_SENSE | SSTable::W_SPACE_SENSE);
PURPOSE

AddColumn appends a column to the table, but does not add data to the column yet. Use FillColumn to add data to the whole column.

RECEIVES

newColumnName The name of the new column. The column name must be unique to the table.
makeTree If zero, no index will be constructed on the column, which will not be searchable. Set to a positive number if the column is to be searchable. Has a default value of 0.
opts Sets the options for the column. These include the datatype, case sensitivity, and white space sensitivity for comparisions. Has a default value indicating a column of strings, with case and white space sensitivity.

RETURN VALUE

A negative value indicates an error or warning.

REMARKS

See also: FillColumn
  Column Option Constants



Olivera Tosic
12/17/1999