Kea  1.9.9-git
isc::db::CqlVersionExchange Class Reference

Exchange used to retrieve schema version from the keyspace. More...

#include <cql_exchange.h>

+ Inheritance diagram for isc::db::CqlVersionExchange:

Public Member Functions

 CqlVersionExchange ()
 Constructor. More...
 
virtual ~CqlVersionExchange ()
 Destructor. More...
 
virtual void createBindForSelect (AnyArray &data, StatementTag statement_tag=NULL) override
 Create BIND array to receive C++ data. More...
 
virtual boost::any retrieve () override
 Copy received data into the <version,minor> pair. More...
 
virtual VersionPair retrieveVersion (const CqlConnection &connection)
 Standalone method used to retrieve schema version. More...
 
- Public Member Functions inherited from isc::db::CqlExchange
 CqlExchange ()
 Constructor. More...
 
virtual ~CqlExchange ()
 Destructor. More...
 
void executeMutation (const CqlConnection &connection, const AnyArray &assigned_values, StatementTag statement_tag)
 Executes INSERT, UPDATE or DELETE statements. More...
 
AnyArray executeSelect (const CqlConnection &connection, const AnyArray &where_values, StatementTag statement_tag, const bool &single=false)
 Executes SELECT statements. More...
 
bool statementApplied (CassFuture *future, size_t *row_count=NULL, size_t *column_count=NULL)
 Check if CQL statement has been applied. More...
 
- Public Member Functions inherited from isc::db::SqlExchange
 SqlExchange ()
 Constructor. More...
 
virtual ~SqlExchange ()
 Destructor. More...
 

Static Public Attributes

static StatementMap tagged_statements_
 Cassandra statements. More...
 
static constexpr StatementTag GET_VERSION = "GET_VERSION"
 Statement tags definitions. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from isc::db::CqlExchange
static void convertToDatabaseTime (const time_t &cltt, const uint32_t &valid_lifetime, cass_int64_t &expire)
 
static void convertFromDatabaseTime (const cass_int64_t &expire, const cass_int64_t &valid_lifetime, time_t &cltt)
 Converts time from Cassandra format. More...
 

Detailed Description

Exchange used to retrieve schema version from the keyspace.

Definition at line 236 of file cql_exchange.h.

Constructor & Destructor Documentation

isc::db::CqlVersionExchange::CqlVersionExchange ( )

Constructor.

Specifies table columns.

Definition at line 987 of file cql_exchange.cc.

isc::db::CqlVersionExchange::~CqlVersionExchange ( )
virtual

Destructor.

Definition at line 990 of file cql_exchange.cc.

Member Function Documentation

void isc::db::CqlVersionExchange::createBindForSelect ( AnyArray data,
StatementTag  statement_tag = NULL 
)
overridevirtual

Create BIND array to receive C++ data.

Used in executeSelect() to retrieve from database

Parameters
dataarray of bound objects representing data to be retrieved
statement_tagprepared statement being executed; defaults to an invalid index

Implements isc::db::CqlExchange.

Definition at line 994 of file cql_exchange.cc.

References isc::db::AnyArray::add().

+ Here is the call graph for this function:

boost::any isc::db::CqlVersionExchange::retrieve ( )
overridevirtual

Copy received data into the <version,minor> pair.

Copies information about the version to be retrieved into a pair. Called in executeSelect().

Returns
a pointer to the object retrieved.

Implements isc::db::CqlExchange.

Definition at line 1001 of file cql_exchange.cc.

VersionPair isc::db::CqlVersionExchange::retrieveVersion ( const CqlConnection connection)
virtual

Standalone method used to retrieve schema version.

Parameters
connectionarray of bound objects representing data to be retrieved
Returns
version of schema specified in the prepared statement in the CqlConnection parameter

Definition at line 1007 of file cql_exchange.cc.

References isc::db::CqlExchange::executeSelect(), and GET_VERSION.

+ Here is the call graph for this function:

Member Data Documentation

constexpr StatementTag isc::db::CqlVersionExchange::GET_VERSION = "GET_VERSION"
static

Statement tags definitions.

Definition at line 276 of file cql_exchange.h.

Referenced by retrieveVersion().

StatementMap isc::db::CqlVersionExchange::tagged_statements_
static
Initial value:
= {
{GET_VERSION, {GET_VERSION, "SELECT version, minor FROM schema_version "}}
}

Cassandra statements.

Definition at line 280 of file cql_exchange.h.

Referenced by isc::db::CqlConnection::getVersion().


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