|
| 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 |
|
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...
|
|
|
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 |
| Return the value of the given field of type T. More...
|
|
template<typename T > |
T | get (const std::string &field_name) const |
| Return the value of the given field of type T. More...
|
|
|
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) |
| Set a field to a specific value. More...
|
|
template<typename T > |
void | set (const std::string &field_name, T value) |
| Set a field to a specific value. More...
|
|
|
bool | isNull (const Field &f) const |
| Test the null setting for field f. More...
|
|
bool | isNull (size_t i) const |
| Test the null setting for field f. More...
|
|
bool | isNull (const std::string &n) const |
| Test the null setting for field f. More...
|
|
|
void | setNull (const Field &f) |
| Set the null setting for field f. More...
|
|
void | setNull (size_t i) |
| Set the null setting for field f. More...
|
|
void | setNull (const std::string &n) |
| Set the null setting for field f. More...
|
|
|
bool | getBool (const Field &f) const |
| Return the value of a Boolean field. More...
|
|
bool | getBool (size_t i) const |
| Return the value of a Boolean field. More...
|
|
bool | getBool (const std::string &n) const |
| Return the value of a Boolean field. More...
|
|
|
void | setBool (const Field &f, bool v) |
| Set the value of a Boolean field. More...
|
|
void | setBool (size_t i, bool v) |
| Set the value of a Boolean field. More...
|
|
void | setBool (const std::string &n, bool v) |
| Set the value of a Boolean field. More...
|
|
|
int | getInt (const Field &f) const |
| Return the value of an int field. More...
|
|
int | getInt (size_t i) const |
| Return the value of an int field. More...
|
|
int | getInt (const std::string &n) const |
| Return the value of an int field. More...
|
|
|
void | setInt (const Field &f, int v) |
| Set the value of an integer field. More...
|
|
void | setInt (size_t i, int v) |
| Set the value of an integer field. More...
|
|
void | setInt (const std::string &n, int v) |
| Set the value of an integer field. More...
|
|
|
long long | getLong (const Field &f) const |
| Return the value of a long field. More...
|
|
long long | getLong (size_t i) const |
| Return the value of a long field. More...
|
|
long long | getLong (const std::string &n) const |
| Return the value of a long field. More...
|
|
|
void | setLong (const Field &f, long long v) |
| Set the value of a long field. More...
|
|
void | setLong (size_t i, long long v) |
| Set the value of a long field. More...
|
|
void | setLong (const std::string &n, long long v) |
| Set the value of a long field. More...
|
|
|
double | getDouble (const Field &f) const |
| Return the value of a double field. More...
|
|
double | getDouble (size_t i) const |
| Return the value of a double field. More...
|
|
double | getDouble (const std::string &n) const |
| Return the value of a double field. More...
|
|
|
void | setDouble (const Field &f, double v) |
| Set the value of a double field. More...
|
|
void | setDouble (size_t i, double v) |
| Set the value of a double field. More...
|
|
void | setDouble (const std::string &n, double v) |
| Set the value of a double field. More...
|
|
|
Timestamp | getTimestamp (const Field &f) const |
| Return the value of a Timestamp field. More...
|
|
Timestamp | getTimestamp (size_t i) const |
| Return the value of a Timestamp field. More...
|
|
Timestamp | getTimestamp (const std::string &n) const |
| Return the value of a Timestamp field. More...
|
|
|
void | setTimestamp (const Field &f, const Timestamp &v) |
| Set the value of a Timestamp field. More...
|
|
void | setTimestamp (size_t i, const Timestamp &v) |
| Set the value of a Timestamp field. More...
|
|
void | setTimestamp (const std::string &n, const Timestamp &v) |
| Set the value of a Timestamp field. More...
|
|
|
const std::string & | getBlobBuffer (const Field &f) const |
| Return the value of a BLOB field. More...
|
|
const std::string & | getBlobBuffer (size_t i) const |
| Return the value of a BLOB field. More...
|
|
const std::string & | getBlobBuffer (const std::string &n) const |
| Return the value of a BLOB field. More...
|
|
|
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) |
| Set the value of a BLOB field. More...
|
|
void | setBlobBuffer (const std::string &n, const std::string &v) |
| Set the value of a BLOB field. More...
|
|
|
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 |
| Return the value of a LIST field. More...
|
|
const std::vector< FieldValue > & | getList (const std::string &n) const |
| Return the value of a LIST field. More...
|
|
|
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) |
| Set the value of a LIST field. More...
|
|
void | setList (const std::string &n, const std::vector< FieldValue > &v) |
| Set the value of a LIST field. More...
|
|
|
const std::string & | getString (const Field &f) const |
| Return the value of a string field. More...
|
|
const std::string & | getString (size_t i) const |
| Return the value of a string field. More...
|
|
const std::string & | getString (const std::string &n) const |
| Return the value of a string field. More...
|
|
|
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) |
| Set the value of a string field. More...
|
|
void | setString (const std::string &field, const char *data, size_t len, Flags flags=NONE) |
| Set the value of a string field. More...
|
|
void | setString (const Field &field, const char *data, size_t len, Flags flags=NONE) |
| Set the value of a string field. More...
|
|
void | setString (size_t field_index, const std::string &value, Flags flags=NONE) |
| Set the value of a string field. More...
|
|
void | setString (const std::string &field_name, const std::string &value, Flags flags=NONE) |
| Set the value of a string field. More...
|
|
|
const Tuple & | getTuple (const Field &f) const |
| Return the value of a nested tuple field. More...
|
|
const Tuple & | getTuple (size_t i) const |
| Return the value of a nested tuple field. More...
|
|
const Tuple & | getTuple (const std::string &n) const |
| Return the value of a nested tuple field. More...
|
|
|
const Function & | getFunction (const Field &f) const |
| Return the value of a function field. More...
|
|
const Function & | getFunction (size_t i) const |
| Return the value of a function field. More...
|
|
const Function & | getFunction (const std::string &n) const |
| Return the value of a function field. More...
|
|
|
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) |
| Set the value of a nested tuple field. More...
|
|
void | setTuple (const std::string &n, const Tuple &v) |
| Set the value of a nested tuple field. More...
|
|
|
void | setFunction (const Field &f, const Function &v) |
| Set the value of a function field. More...
|
|
void | setFunction (size_t i, const Function &v) |
| Set the value of a function field. More...
|
|
void | setFunction (const std::string &n, const Function &v) |
| Set the value of a function field. 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