|
| Tuple (const Tuple &t) |
| Copy constructor. More...
|
|
| Tuple (const Schema &s) |
| Construct a tuple of the specified schema. More...
|
|
| ~Tuple () |
| Destructor. More...
|
|
const Tuple & | operator= (const Tuple &rhs) |
|
bool | operator== (const Tuple &rhs) const |
|
void | verify () const |
| verify that the tuple is valid Throws StreamBaseException on invalid tuple More...
|
|
void | clear () |
| null all fields in the tuple More...
|
|
const Schema & | getSchema () const |
|
void | setSchema (const Schema &) |
| set the schema More...
|
|
size_t | getNumFields () const |
|
size_t | getSize () const |
|
template<typename T > |
T | get (const Field &f) const |
| Return the value of the given field of type T. More...
|
|
template<typename T > |
T | get (size_t i) const |
|
template<typename T > |
T | get (const std::string &field_name) const |
|
template<typename T > |
void | set (const Field &field, T value) |
| Set a field to a specific value. More...
|
|
template<typename T > |
void | set (int fieldNum, T value) |
|
template<typename T > |
void | set (const std::string &field_name, T value) |
|
bool | isNull (const Field &f) const |
| Test the null setting for field f. More...
|
|
bool | isNull (size_t i) const |
|
bool | isNull (const std::string &n) const |
|
void | setNull (const Field &f) |
| Set the null setting for field f. More...
|
|
void | setNull (size_t i) |
|
void | setNull (const std::string &n) |
|
bool | getBool (const Field &f) const |
| Return the value of a Boolean field. More...
|
|
bool | getBool (size_t i) const |
|
bool | getBool (const std::string &n) const |
|
void | setBool (const Field &f, bool v) |
| Set the value of a Boolean field. More...
|
|
void | setBool (size_t i, bool v) |
|
void | setBool (const std::string &n, bool v) |
|
int | getInt (const Field &f) const |
| Return the value of an int field. More...
|
|
int | getInt (size_t i) const |
|
int | getInt (const std::string &n) const |
|
void | setInt (const Field &f, int v) |
| Set the value of an integer field. More...
|
|
void | setInt (size_t i, int v) |
|
void | setInt (const std::string &n, int v) |
|
long long | getLong (const Field &f) const |
| Return the value of a long field. More...
|
|
long long | getLong (size_t i) const |
|
long long | getLong (const std::string &n) const |
|
void | setLong (const Field &f, long long v) |
| Set the value of a long field. More...
|
|
void | setLong (size_t i, long long v) |
|
void | setLong (const std::string &n, long long v) |
|
double | getDouble (const Field &f) const |
| Return the value of a double field. More...
|
|
double | getDouble (size_t i) const |
|
double | getDouble (const std::string &n) const |
|
void | setDouble (const Field &f, double v) |
| Set the value of a double field. More...
|
|
void | setDouble (size_t i, double v) |
|
void | setDouble (const std::string &n, double v) |
|
Timestamp | getTimestamp (const Field &f) const |
| Return the value of a Timestamp field. More...
|
|
Timestamp | getTimestamp (size_t i) const |
|
Timestamp | getTimestamp (const std::string &n) const |
|
void | setTimestamp (const Field &f, const Timestamp &v) |
| Set the value of a Timestamp field. More...
|
|
void | setTimestamp (size_t i, const Timestamp &v) |
|
void | setTimestamp (const std::string &n, const Timestamp &v) |
|
const std::string & | getBlobBuffer (const Field &f) const |
| Return the value of a BLOB field. More...
|
|
const std::string & | getBlobBuffer (size_t i) const |
|
const std::string & | getBlobBuffer (const std::string &n) const |
|
void | setBlobBuffer (const Field &f, const std::string &v) |
| Set the value of a BLOB field. More...
|
|
void | setBlobBuffer (size_t i, const std::string &v) |
|
void | setBlobBuffer (const std::string &n, const std::string &v) |
|
const std::vector< FieldValue > & | getList (const Schema::Field &f) const |
| Return the value of a LIST field. More...
|
|
const std::vector< FieldValue > & | getList (size_t i) const |
|
const std::vector< FieldValue > & | getList (const std::string &n) const |
|
void | setList (const Schema::Field &f, const std::vector< FieldValue > &v) |
| Set the value of a LIST field. More...
|
|
void | setList (size_t i, const std::vector< FieldValue > &v) |
|
void | setList (const std::string &n, const std::vector< FieldValue > &v) |
|
const std::string & | getString (const Field &f) const |
| Return the value of a string field. More...
|
|
const std::string & | getString (size_t i) const |
|
const std::string & | getString (const std::string &n) const |
|
void | setString (const Field &field, const std::string &value, Flags flags=NONE) |
| Set the value of a string field. More...
|
|
void | setString (size_t field, const char *data, size_t len, Flags flags=NONE) |
|
void | setString (const std::string &field, const char *data, size_t len, Flags flags=NONE) |
|
void | setString (const Field &field, const char *data, size_t len, Flags flags=NONE) |
|
void | setString (size_t field_index, const std::string &value, Flags flags=NONE) |
|
void | setString (const std::string &field_name, const std::string &value, Flags flags=NONE) |
|
const Tuple & | getTuple (const Field &f) const |
| Return the value of a nested tuple field. More...
|
|
const Tuple & | getTuple (size_t i) const |
|
const Tuple & | getTuple (const std::string &n) const |
|
const Function & | getFunction (const Field &f) const |
| Return the value of a function field. More...
|
|
const Function & | getFunction (size_t i) const |
|
const Function & | getFunction (const std::string &n) const |
|
void | setTuple (const Field &f, const Tuple &v) |
| Set the value of a nested tuple field. More...
|
|
void | setTuple (size_t i, const Tuple &v) |
|
void | setTuple (const std::string &n, const Tuple &v) |
|
void | setFunction (const Field &f, const Function &v) |
| Set the value of a function field. More...
|
|
void | setFunction (size_t i, const Function &v) |
|
void | setFunction (const std::string &n, const Function &v) |
|
FieldValue & | getFieldValue (const Field &f) |
| Takes a field with a path and returns the field at the target of that path. More...
|
|
const FieldValue & | getFieldValue (const Schema::Field &f) const |
| Takes a field with a path and returns the field at the target of that path. More...
|
|
FieldValue & | getFieldValue (size_t field_num) |
| Takes the index of a field in this tuple's schema, returns the corresponding field value. More...
|
|
const FieldValue & | getFieldValue (size_t field_num) const |
| Takes the index of a field in this tuple's schema, returns the corresponding field value. More...
|
|
FieldValue & | getFieldValue (const std::string &field_name) |
| Takes the name of a field in this tuple's schema, returns the corresponding field value. More...
|
|
const FieldValue & | getFieldValue (const std::string &field_name) const |
| Takes the name of a field in this tuple's schema, returns the corresponding field value. More...
|
|
void | setFieldValue (const Field &f, const FieldValue &fv) |
| Takes a field with a path and sets the value of the field at the target of that path to that of the provided FieldValue. More...
|
|
void | setFieldValue (size_t field_num, const FieldValue &fv) |
| Takes the index of a field in this tuple's schema and sets the corresponding field value. More...
|
|
void | setFieldValue (const std::string &field_name, const FieldValue &fv) |
| Takes the name of a field in this tuple's schema and sets the corresponding field value. More...
|
|
bool | hasHeader () const |
|
unsigned int | getId () const |
|
void | setId (unsigned int tid) |
| set the id More...
|
|
std::string | as_string () const |
| Return a human-readable string value representing this tuple in its entirety (including all header values, if applicable). More...
|
|
std::string | as_string_external (char delimiter=',', const std::string &null_string=getNullString()) const |
| Return a human-readable string value representing this tuple. More...
|
|
std::string | toDelimitedString (const std::string &delimiter, const std::string &null_string=getNullString(), bool include_names=false, bool quote_all_strings=false) const |
| Return a string value representing this tuple, separated by the given delimiter. More...
|
|
Tuples are value types that can be copied and modified separately thus.
t2 = t1;
t2.setId(0); // does not modify t1
They will only make copies of the underlying data as needed, so they are relatively cheap to pass around by value