0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Related Functions | List of all members
Hypertable::Lib::ColumnPredicate Class Reference

Represents a column predicate (e.g. More...

#include <ColumnPredicate.h>

Inheritance diagram for Hypertable::Lib::ColumnPredicate:
Inheritance graph
[legend]
Collaboration diagram for Hypertable::Lib::ColumnPredicate:
Collaboration graph
[legend]

Public Types

enum  {
  NO_OPERATION = 0, EXACT_MATCH = 0x0001, PREFIX_MATCH = 0x0002, REGEX_MATCH = 0x0004,
  VALUE_MATCH = 0x0007, QUALIFIER_EXACT_MATCH = 0x0100, QUALIFIER_PREFIX_MATCH = 0x0200, QUALIFIER_REGEX_MATCH = 0x0400,
  QUALIFIER_MATCH = 0x0700
}
 

Public Member Functions

 ColumnPredicate ()
 
 ColumnPredicate (const char *family, const char *qualifier, uint32_t op, const char *v, uint32_t vlen=0)
 
 ColumnPredicate (const uint8_t **bufp, size_t *remainp)
 
virtual ~ColumnPredicate ()
 
const string render_hql () const
 Renders predicate as HQL. More...
 
- Public Member Functions inherited from Hypertable::Serializable
virtual size_t encoded_length () const
 Returns serialized object length. More...
 
virtual void encode (uint8_t **bufp) const
 Writes serialized representation of object to a buffer. More...
 
virtual void decode (const uint8_t **bufp, size_t *remainp)
 Reads serialized representation of object from a buffer. More...
 

Public Attributes

const char * column_family {}
 
const char * column_qualifier {}
 
const char * value {}
 
uint32_t column_qualifier_len {}
 
uint32_t value_len {}
 
uint32_t operation {}
 

Private Member Functions

uint8_t encoding_version () const override
 Returns encoding version. More...
 
size_t encoded_length_internal () const override
 Returns internal serialized length. More...
 
void encode_internal (uint8_t **bufp) const override
 Writes serialized representation of object to a buffer. More...
 
void decode_internal (uint8_t version, const uint8_t **bufp, size_t *remainp) override
 Reads serialized representation of object from a buffer. More...
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &os, const ColumnPredicate &cp)
 

Additional Inherited Members

Detailed Description

Represents a column predicate (e.g.

WHERE cf = "value"). c-string data members are not managed so caller must handle (de)allocation.

Definition at line 40 of file ColumnPredicate.h.

Constructor & Destructor Documentation

Hypertable::Lib::ColumnPredicate::ColumnPredicate ( )
inline

Definition at line 54 of file ColumnPredicate.h.

Hypertable::Lib::ColumnPredicate::ColumnPredicate ( const char *  family,
const char *  qualifier,
uint32_t  op,
const char *  v,
uint32_t  vlen = 0 
)
inline

Definition at line 56 of file ColumnPredicate.h.

Hypertable::Lib::ColumnPredicate::ColumnPredicate ( const uint8_t **  bufp,
size_t *  remainp 
)
inline

Definition at line 66 of file ColumnPredicate.h.

virtual Hypertable::Lib::ColumnPredicate::~ColumnPredicate ( )
inlinevirtual

Definition at line 70 of file ColumnPredicate.h.

Member Function Documentation

void ColumnPredicate::decode_internal ( uint8_t  version,
const uint8_t **  bufp,
size_t *  remainp 
)
overrideprivatevirtual

Reads serialized representation of object from a buffer.

Parameters
versionEncoding version
bufpAddress of destination buffer pointer (advanced by call)
remainpAddress of integer holding amount of serialized object remaining
See also
encode_internal() for encoding format

Implements Hypertable::Serializable.

Definition at line 74 of file ColumnPredicate.cc.

void ColumnPredicate::encode_internal ( uint8_t **  bufp) const
overrideprivatevirtual

Writes serialized representation of object to a buffer.

Parameters
bufpAddress of destination buffer pointer (advanced by call)

Encoding is as follows:

Encoding Description
vstr Column family
vstr Column qualifier
vstr Value
i32 Operation

Implements Hypertable::Serializable.

Definition at line 67 of file ColumnPredicate.cc.

size_t ColumnPredicate::encoded_length_internal ( ) const
overrideprivatevirtual

Returns internal serialized length.

Returns
Internal serialized length
See also
encode_internal() for encoding format

Implements Hypertable::Serializable.

Definition at line 37 of file ColumnPredicate.cc.

uint8_t ColumnPredicate::encoding_version ( ) const
overrideprivatevirtual

Returns encoding version.

Returns
Encoding version

Implements Hypertable::Serializable.

Definition at line 33 of file ColumnPredicate.cc.

const string ColumnPredicate::render_hql ( ) const

Renders predicate as HQL.

Returns
HQL string representing predidate.

Definition at line 83 of file ColumnPredicate.cc.

Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  os,
const ColumnPredicate cp 
)
related

Definition at line 124 of file ColumnPredicate.cc.

Member Data Documentation

const char* Hypertable::Lib::ColumnPredicate::column_family {}

Definition at line 76 of file ColumnPredicate.h.

const char* Hypertable::Lib::ColumnPredicate::column_qualifier {}

Definition at line 77 of file ColumnPredicate.h.

uint32_t Hypertable::Lib::ColumnPredicate::column_qualifier_len {}

Definition at line 79 of file ColumnPredicate.h.

uint32_t Hypertable::Lib::ColumnPredicate::operation {}

Definition at line 81 of file ColumnPredicate.h.

const char* Hypertable::Lib::ColumnPredicate::value {}

Definition at line 78 of file ColumnPredicate.h.

uint32_t Hypertable::Lib::ColumnPredicate::value_len {}

Definition at line 80 of file ColumnPredicate.h.


The documentation for this class was generated from the following files: