Commit 161dc9c3 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[github35] Changes after first part of the review.

parent df949c9e
......@@ -728,7 +728,7 @@ if test "$CQL_CONFIG" != "" ; then
CQL_INCLUDEDIR=`$CQL_CONFIG --includedir`
CQL_CPPFLAGS="`$CQL_CONFIG --cppflags` -I$CQL_INCLUDEDIR"
CQL_LIBS="-L`$CQL_CONFIG --libdir` -lcassandra_static -luv"
CQL_LIBS="-L`$CQL_CONFIG --libdir` -lcassandra -luv"
CQL_VERSION=`$CQL_CONFIG --version`
AC_SUBST(CQL_CPPFLAGS)
......
......@@ -88,6 +88,9 @@ kea_ctrl_agent_LDADD += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS) $(BOOST_LIBS)
kea_ctrl_agent_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS)
if HAVE_CQL
kea_ctrl_agent_LDFLAGS += $(CQL_LIBS)
endif
if GENERATE_PARSER
......
......@@ -53,5 +53,10 @@ lease_cmds_unittests_LDADD += $(LOG4CPLUS_LIBS)
lease_cmds_unittests_LDADD += $(CRYPTO_LIBS)
lease_cmds_unittests_LDADD += $(BOOST_LIBS)
lease_cmds_unittests_LDADD += $(GTEST_LDADD)
if HAVE_CQL
lease_cmds_unittests_LDFLAGS += $(CQL_LIBS)
endif
endif
noinst_PROGRAMS = $(TESTS)
......@@ -22,6 +22,20 @@
#include <dhcpsrv/db_exceptions.h>
#include <dhcpsrv/sql_common.h>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/member.hpp>
#include <boost/multi_index/sequenced_index.hpp>
#include <boost/multi_index_container.hpp>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <fstream>
#include <iostream>
#include <map>
#include <string>
#include <utility>
#include <vector>
namespace isc {
namespace dhcp {
......
......@@ -48,7 +48,7 @@ class CqlExchange;
/// behaviour.
class AnyArray : public std::vector<boost::any> {
public:
/// @brief Add a at the end of the vector.
/// @brief Add a value at the end of the vector.
void add(const boost::any& value);
/// @brief Remove the void pointer to the data value from a specified
......
......@@ -13,6 +13,10 @@ namespace isc {
namespace dhcp {
/// @brief Database statement not applied
///
/// Cassandra have a concept of mutation (any statement that does change the
/// data, like INSERT, UPDATE or DELETE. Under certain conditions it may be
/// possible that those statesments may fail to apply.
class StatementNotApplied : public Exception {
public:
StatementNotApplied(const char* file, size_t line, const char* what)
......
......@@ -198,9 +198,6 @@ the Cassandra database. The connection is closed as part of normal server
shutdown. This error is most likely a programmatic issue that is highly
unlikely to occur or negatively impact server operation.
% DHCPSRV_CQL_BEGIN_TRANSACTION begin transaction.
The server has issued a begin transaction call.
% DHCPSRV_CQL_CONNECTION_BEGIN_TRANSACTION begin transaction on current connection.
The server has issued a begin transaction call.
......
......@@ -17,20 +17,6 @@
#ifndef SQL_COMMON_H
#define SQL_COMMON_H
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/member.hpp>
#include <boost/multi_index/sequenced_index.hpp>
#include <boost/multi_index_container.hpp>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <fstream>
#include <iostream>
#include <map>
#include <string>
#include <utility>
#include <vector>
namespace isc {
namespace dhcp {
......@@ -47,8 +33,8 @@ enum ExchangeDataType {
EXCHANGE_DATA_TYPE_STRING,
EXCHANGE_DATA_TYPE_BYTES,
EXCHANGE_DATA_TYPE_UUID,
EXCHANGE_DATA_TYPE_UDT,
EXCHANGE_DATA_TYPE_COLLECTION
EXCHANGE_DATA_TYPE_UDT, ///< User-Defined Type (used in Cassandra)
EXCHANGE_DATA_TYPE_COLLECTION ///< Collection (used in Cassandra)
};
/// @brief Base class for backend exchanges.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment