#include <table.h>

Public Member Functions | |
| virtual int | addColumn (const char *cname, ibis::TYPE_T ctype, const char *cdesc)=0 |
| virtual int | addColumn (const char *cname, ibis::TYPE_T ctype)=0 |
| Add a column. | |
| virtual int | append (const char *cname, uint64_t begin, uint64_t end, void *values)=0 |
| Add values to the named column. | |
| virtual int | appendRow (const char *line, const char *delimiters=0)=0 |
| Append a row stored in ASCII form. | |
| virtual int | appendRow (const ibis::table::row &)=0 |
| Add one row. | |
| virtual int | appendRows (const std::vector< ibis::table::row > &)=0 |
| Add multiple rows. | |
| virtual void | clearData ()=0 |
| Remove all data recorded. | |
| virtual int | readCSV (const char *filename, const char *delimiters=0)=0 |
| Read the content of the specified as comma-separated values. | |
| virtual int | write (const char *dir, const char *tname, const char *tdesc) const =0 |
| Write the in-memory data records to the specified directory on disk. | |
Static Public Member Functions | |
| static ibis::tablex * | create () |
| Create a minimalistic table exclusively for entering new records. | |
| virtual int ibis::tablex::append | ( | const char * | cname, | |
| uint64_t | begin, | |||
| uint64_t | end, | |||
| void * | values | |||
| ) | [pure virtual] |
Add values to the named column.
The column name must be in the table already. The first value is to be placed at row begin (the row numbers start with 0) and the last value before row end. The array values must contain values of the correct type corresponding to the type specified before.
The expected types of values are "const std::vector<std::string>*" for string valued columns, and "const T*" for a fix-sized column of type T. More specifically, if the column type is float, the type of values is "const float*"; if the column type is category, the type of values is "const std::vector<std::string>*".
This function can not be used to introduce new columns in a table. A new column must be added with addColumn.
Implemented in ibis::tafel.
Referenced by fastbit_add_values().
| virtual int ibis::tablex::appendRow | ( | const char * | line, | |
| const char * | delimiters = 0 | |||
| ) | [pure virtual] |
Append a row stored in ASCII form.
The ASCII form of the values are assumed to be separated by comma (,) or space, but additional delimiters may be added through the second argument.
Implemented in ibis::tafel.
| virtual int ibis::tablex::appendRow | ( | const ibis::table::row & | ) | [pure virtual] |
Add one row.
If an array of names has the same number of elements as the array of values, the names are used as column names. If the names are not specified explicitly, the values are assigned to the columns of the same data type in the order as they are specified through addColumn or if the same order as they are recreated from an existing dataset (which is typically alphabetical).
Like append, this function can not be used to introduce new columns in a table. A new column must be added with addColumn.
Since the various columns may have different numbers of rows filled, the number of rows in the table is assumed to the largest number of rows filled so far. The new row appended here increases the number of rows in the table by 1. The unfilled rows are assumed to be null.
A null value of an integer column is recorded as the maximum possible of the type of integer. A null value of a floating-point valued column is recorded as a quiet NaN (Not-a-Number). A null value of a string-valued column is recorded as an empty string. In all cases, a null mask is used to indicate that they are null values.
Implemented in ibis::tafel.
| virtual int ibis::tablex::appendRows | ( | const std::vector< ibis::table::row > & | ) | [pure virtual] |
Add multiple rows.
Rows in the incoming vector are processed on after another. The ordering of the values in earlier rows are automatically carried over to the later rows until another set of names is specified.
Implemented in ibis::tafel.
| virtual void ibis::tablex::clearData | ( | ) | [pure virtual] |
Remove all data recorded.
Keeps the metadata. It is intended to be used after a call to function write to store new rows.
Implemented in ibis::tafel.
| ibis::tablex * ibis::tablex::create | ( | ) | [static] |
| virtual int ibis::tablex::readCSV | ( | const char * | filename, | |
| const char * | delimiters = 0 | |||
| ) | [pure virtual] |
Read the content of the specified as comma-separated values.
Append the records to this table. By default the records are delimited by comma (,) and blank space. One may specify additional delimiters using the second argument.
Implemented in ibis::tafel.
| virtual int ibis::tablex::write | ( | const char * | dir, | |
| const char * | tname, | |||
| const char * | tdesc | |||
| ) | const [pure virtual] |
Write the in-memory data records to the specified directory on disk.
If the table name (tname) is a null string or an empty, the last component of the directory name is used. If the description (tdesc) is a null string or an empty string, a time stamp will be printed in its place. If the specified directory already contains data, the new records will be appended to the existing data. In this case, the table name specified here will overwrite the existing name, but the existing name and description will be retained if the current arguments are null strings or empty strings. The data type associated with this table will overwrite the existing data type information.
Implemented in ibis::tafel.
Referenced by fastbit_flush_buffer().
|
|