All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Hypertable::HyperAppHelper Namespace Reference


const char * error_get_text (int error_code)
 Retrieves a descriptive error string of an error code. More...
void create_cell_unique (const TablePtr &table, const KeySpec &key, String &guid)
 Inserts a unique value into a table. More...
String generate_guid ()
 Generates a new GUID. More...

Function Documentation

void Hypertable::HyperAppHelper::create_cell_unique ( const TablePtr table,
const KeySpec key,
String guid 

Inserts a unique value into a table.

This function inserts a unique value into a table. The table must be created with TIME_ORDER DESC, MAX_VERSIONS 1 (although the latter is optional).

If the value is empty then a new GUID will be assigned (using generate_guid).

If the table was not created with TIME_ORDER DESC an exception will be thrown.

Unique values are just like any other values. They can be deleted with the regular mutator interface and queried with a scanner.

tableThe table pointer
keyThe KeySpec object with Row, Column and Column Family
guidThe unique string; will be filled with a new GUID if it's empty
See also

Definition at line 33 of file Unique.cc.

const char* Hypertable::HyperAppHelper::error_get_text ( int  error_code)

Retrieves a descriptive error string of an error code.

error_codeThe table pointer
a descriptive error string, or "ERROR NOT REGISTERED" if if the error_code is unknown

Definition at line 38 of file Error.h.

String Hypertable::HyperAppHelper::generate_guid ( )

Generates a new GUID.

GUIDs are globally unique. The generated string is 36 bytes long and has a format similar to "9cf7da31-307a-4bef-b65e-19fb05aa57d8".

Definition at line 44 of file Unique.h.