Column family specification. More...
#include <ColumnFamilySpec.h>

Public Member Functions | |
| ColumnFamilySpec () | |
| Default constructor. More... | |
| ColumnFamilySpec (const std::string &name) | |
| Constructor with column family name initializer. More... | |
| void | set_name (const std::string &name) |
| Sets column family name. More... | |
| const std::string & | get_name () const |
| Gets column family name. More... | |
| void | set_access_group (const std::string &ag) |
| Sets access group. More... | |
| const std::string & | get_access_group () const |
| Gets access group name. More... | |
| void | set_generation (int64_t generation) |
| Sets generation. More... | |
| int64_t | get_generation () const |
| Gets generation. More... | |
| void | set_id (int32_t id) |
| Sets column ID. More... | |
| int32_t | get_id () const |
| Gets column ID. More... | |
| void | set_value_index (bool value) |
| Sets value index flag. More... | |
| bool | get_value_index () const |
| Gets value index flag. More... | |
| void | set_qualifier_index (bool value) |
| Sets qualifier index flag. More... | |
| bool | get_qualifier_index () const |
| Gets qualifier index flag. More... | |
| void | set_deleted (bool value) |
| Sets deleted flag. More... | |
| bool | get_deleted () const |
| Gets deleted flag. More... | |
| void | set_option_max_versions (int32_t max_versions) |
| Sets max versions option. More... | |
| int32_t | get_option_max_versions () const |
| Gets max versions option. More... | |
| void | set_option_ttl (time_t ttl) |
| Sets ttl option. More... | |
| time_t | get_option_ttl () const |
| Gets ttl option. More... | |
| void | set_option_time_order_desc (bool value) |
| Sets time order desc option. More... | |
| bool | get_option_time_order_desc () const |
| Gets time order desc option. More... | |
| void | set_option_counter (bool value) |
| Sets counter option. More... | |
| bool | get_option_counter () const |
| Gets the counter option. More... | |
| void | merge_options (const ColumnFamilyOptions &other) |
| Merges options from another ColumnFamilyOptions object. More... | |
| const std::string | render_xml (const std::string &line_prefix, bool with_ids=false) const |
| Renders spec in XML format. More... | |
| bool | operator== (const ColumnFamilySpec &other) const |
| Equality operator. More... | |
| void | parse_xml (const char *base, int len) |
| Parses XML options document. More... | |
| const std::string | render_hql () const |
| Renders spec in HQL format. More... | |
| const ColumnFamilyOptions & | options () const |
| Returns reference to options structure. More... | |
Private Attributes | |
| std::string | m_name |
| Column family name More... | |
| std::string | m_ag |
| Access group name. More... | |
| int64_t | m_generation {} |
| Generation. More... | |
| int32_t | m_id {} |
| ID. More... | |
| ColumnFamilyOptions | m_options |
| Options. More... | |
| bool | m_value_index {} |
| Value index flag. More... | |
| bool | m_qualifier_index {} |
| Qualifier index flag More... | |
| bool | m_deleted {} |
| Deleted flag. More... | |
Column family specification.
Definition at line 225 of file ColumnFamilySpec.h.
|
inline |
Default constructor.
Definition at line 229 of file ColumnFamilySpec.h.
|
inline |
Constructor with column family name initializer.
Initializes m_name with name
| name | Column family name |
Definition at line 234 of file ColumnFamilySpec.h.
|
inline |
Gets access group name.
Definition at line 252 of file ColumnFamilySpec.h.
|
inline |
|
inline |
|
inline |
|
inline |
Gets column family name.
Definition at line 243 of file ColumnFamilySpec.h.
|
inline |
|
inline |
Gets max versions option.
Definition at line 310 of file ColumnFamilySpec.h.
|
inline |
Gets time order desc option.
Definition at line 334 of file ColumnFamilySpec.h.
|
inline |
|
inline |
Gets qualifier index flag.
Definition at line 288 of file ColumnFamilySpec.h.
|
inline |
| void ColumnFamilySpec::merge_options | ( | const ColumnFamilyOptions & | other | ) |
Merges options from another ColumnFamilyOptions object.
Merges options from other int m_options.
| other | ColumnFamilyOptions object with which to merge |
Definition at line 276 of file ColumnFamilySpec.cc.
| bool ColumnFamilySpec::operator== | ( | const ColumnFamilySpec & | other | ) | const |
Equality operator.
| other | Other object to which comparison is to be made |
other, false otherwise. Definition at line 280 of file ColumnFamilySpec.cc.
|
inline |
Returns reference to options structure.
Definition at line 412 of file ColumnFamilySpec.h.
| void ColumnFamilySpec::parse_xml | ( | const char * | base, |
| int | len | ||
| ) |
Parses XML options document.
This method parses an XML document representing a column family specification, populating the corresponding member variables.
| base | Pointer to character buffer holding XML document |
| len | Length of XML document |
Definition at line 360 of file ColumnFamilySpec.cc.
| const std::string ColumnFamilySpec::render_hql | ( | ) | const |
Renders spec in HQL format.
Renders the column family specification in a format that can be used as the column specification in an HQL CREATE TABLE command. The following shows an example of the HQL produced by this member function.
foo MAX_VERSIONS 3 TTL 1398615345 TIME_ORDER desc, QUALIFIER INDEX foo
Definition at line 407 of file ColumnFamilySpec.cc.
| const std::string ColumnFamilySpec::render_xml | ( | const std::string & | line_prefix, |
| bool | with_ids = false |
||
| ) | const |
Renders spec in XML format.
Renders the spec as an XML document. The line_prefix parameter can be used to get nice indenting if the object is being rendered as part of a larger object and is typically some number of space characters. The with_ids parameter causes the generated XML to include the ID attribute and Generation elements. The following is example output produced by this member function with with_ids set to true.
<ColumnFamily id="42">
<Generation>123</Generation>
<Name>foo</Name>
<AccessGroup>default</AccessGroup>
<Deleted>false</Deleted>
<QualifierIndex>true</QualifierIndex>
<Options>
<MaxVersions>3</MaxVersions>
<TTL>1398615345</TTL>
<TimeOrder>desc</TimeOrder>
</Options>
</ColumnFamily>
| line_prefix | std::string to prepend to each line of output |
| with_ids | Include ID and Generation in output |
Definition at line 365 of file ColumnFamilySpec.cc.
| void ColumnFamilySpec::set_access_group | ( | const std::string & | ag | ) |
Sets access group.
Sets m_ag to ag
| ag | Access group name to which this column belons |
Definition at line 207 of file ColumnFamilySpec.cc.
| void ColumnFamilySpec::set_deleted | ( | bool | value | ) |
Sets deleted flag.
Sets m_deleted flag to value indicating whether or not the column family is deleted.
| value | Deleted flag. |
Definition at line 219 of file ColumnFamilySpec.cc.
| void ColumnFamilySpec::set_generation | ( | int64_t | generation | ) |
Sets generation.
| generation | Generation value |
Definition at line 211 of file ColumnFamilySpec.cc.
| void ColumnFamilySpec::set_id | ( | int32_t | id | ) |
| void ColumnFamilySpec::set_name | ( | const std::string & | name | ) |
Sets column family name.
Sets m_name to name
| name | Column family name |
Definition at line 203 of file ColumnFamilySpec.cc.
| void ColumnFamilySpec::set_option_counter | ( | bool | value | ) |
Sets counter option.
Sets the counter option of the m_options member to value.
| value | New value for counter option. |
| Exception | if supplied value is true and either the max versions or time order desc options are set, which are incompatible with the counter option. |
Definition at line 241 of file ColumnFamilySpec.cc.
| void ColumnFamilySpec::set_option_max_versions | ( | int32_t | max_versions | ) |
Sets max versions option.
Sets the max versions option of the m_options member to max_versions
| max_versions | New value for max versions option |
| Exception | if max_versions is negative or if the counter option is set, which is incompatible. |
Definition at line 226 of file ColumnFamilySpec.cc.
| void ColumnFamilySpec::set_option_time_order_desc | ( | bool | value | ) |
Sets time order desc option.
Sets the time order desc option of the m_options member to value.
| value | New value for time order desc option |
| Exception | if supplied value is true and the counter option is set, which is incompatible with the time order desc option. |
Definition at line 236 of file ColumnFamilySpec.cc.
| void ColumnFamilySpec::set_option_ttl | ( | time_t | ttl | ) |
Sets ttl option.
Sets the ttl option of the m_options member to ttl.
| ttl | New value for ttl option |
| Exception | if supplied ttl value is negative. |
Definition at line 231 of file ColumnFamilySpec.cc.
| void ColumnFamilySpec::set_qualifier_index | ( | bool | value | ) |
Sets qualifier index flag.
Sets m_qualifier_index flag to value indicating whether or not a qualifier index is specified for this column family.
| value | Qualifier index flag. |
Definition at line 266 of file ColumnFamilySpec.cc.
| void ColumnFamilySpec::set_value_index | ( | bool | value | ) |
Sets value index flag.
Sets m_value_index flag to value indicating whether or not a value index is specified for this column family.
| value | Value index flag. |
Definition at line 256 of file ColumnFamilySpec.cc.
|
private |
Access group name.
Definition at line 420 of file ColumnFamilySpec.h.
|
private |
Deleted flag.
Definition at line 438 of file ColumnFamilySpec.h.
|
private |
Generation.
Definition at line 423 of file ColumnFamilySpec.h.
|
private |
ID.
Definition at line 426 of file ColumnFamilySpec.h.
|
private |
Column family name
Definition at line 417 of file ColumnFamilySpec.h.
|
private |
Options.
Definition at line 429 of file ColumnFamilySpec.h.
|
private |
Qualifier index flag
Definition at line 435 of file ColumnFamilySpec.h.
|
private |
Value index flag.
Definition at line 432 of file ColumnFamilySpec.h.
1.8.8