Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
012a97a8
Commit
012a97a8
authored
Aug 28, 2018
by
Marcin Siodelski
Browse files
[
#92
,
!13
] Refactored libkea-dhcpsrv to use libkea-database
parent
7b2555aa
Changes
71
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp4/Makefile.am
View file @
012a97a8
...
...
@@ -84,6 +84,7 @@ kea_dhcp4_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
kea_dhcp4_LDADD
+=
$(top_builddir)
/src/lib/dns/libkea-dns++.la
kea_dhcp4_LDADD
+=
$(top_builddir)
/src/lib/cryptolink/libkea-cryptolink.la
kea_dhcp4_LDADD
+=
$(top_builddir)
/src/lib/hooks/libkea-hooks.la
kea_dhcp4_LDADD
+=
$(top_builddir)
/src/lib/database/libkea-database.la
kea_dhcp4_LDADD
+=
$(top_builddir)
/src/lib/log/libkea-log.la
kea_dhcp4_LDADD
+=
$(top_builddir)
/src/lib/util/threads/libkea-threads.la
kea_dhcp4_LDADD
+=
$(top_builddir)
/src/lib/util/libkea-util.la
...
...
src/bin/dhcp4/ctrl_dhcp4_srv.cc
View file @
012a97a8
...
...
@@ -23,6 +23,7 @@
#include <sstream>
using
namespace
isc
::
data
;
using
namespace
isc
::
db
;
using
namespace
isc
::
dhcp
;
using
namespace
isc
::
hooks
;
using
namespace
isc
::
config
;
...
...
src/bin/dhcp4/ctrl_dhcp4_srv.h
View file @
012a97a8
...
...
@@ -11,7 +11,7 @@
#include <asiolink/asiolink.h>
#include <cc/data.h>
#include <cc/command_interpreter.h>
#include <d
hcpsrv
/database_connection.h>
#include <d
atabase
/database_connection.h>
#include <dhcpsrv/timer_mgr.h>
#include <dhcp4/dhcp4_srv.h>
...
...
@@ -336,7 +336,7 @@ private:
/// @param db_reconnect_ctl pointer to the ReconnectCtl containing the
/// configured reconnect parameters
///
void
dbReconnect
(
ReconnectCtlPtr
db_reconnect_ctl
);
void
dbReconnect
(
db
::
ReconnectCtlPtr
db_reconnect_ctl
);
/// @brief Callback DB backends should invoke upon loss of connectivity
///
...
...
@@ -356,7 +356,7 @@ private:
/// configured reconnect parameters
///
/// @return false if reconnect is not configured, true otherwise
bool
dbLostCallback
(
ReconnectCtlPtr
db_reconnect_ctl
);
bool
dbLostCallback
(
db
::
ReconnectCtlPtr
db_reconnect_ctl
);
/// @brief Static pointer to the sole instance of the DHCP server.
///
...
...
src/bin/dhcp4/tests/Makefile.am
View file @
012a97a8
...
...
@@ -135,6 +135,7 @@ dhcp4_unittests_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
dhcp4_unittests_LDADD
+=
$(top_builddir)
/src/lib/dns/libkea-dns++.la
dhcp4_unittests_LDADD
+=
$(top_builddir)
/src/lib/cryptolink/libkea-cryptolink.la
dhcp4_unittests_LDADD
+=
$(top_builddir)
/src/lib/hooks/libkea-hooks.la
dhcp4_unittests_LDADD
+=
$(top_builddir)
/src/lib/database/libkea-database.la
dhcp4_unittests_LDADD
+=
$(top_builddir)
/src/lib/log/libkea-log.la
dhcp4_unittests_LDADD
+=
$(top_builddir)
/src/lib/util/threads/libkea-threads.la
dhcp4_unittests_LDADD
+=
$(top_builddir)
/src/lib/util/libkea-util.la
...
...
src/bin/dhcp6/Makefile.am
View file @
012a97a8
...
...
@@ -84,6 +84,7 @@ kea_dhcp6_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
kea_dhcp6_LDADD
+=
$(top_builddir)
/src/lib/dns/libkea-dns++.la
kea_dhcp6_LDADD
+=
$(top_builddir)
/src/lib/cryptolink/libkea-cryptolink.la
kea_dhcp6_LDADD
+=
$(top_builddir)
/src/lib/hooks/libkea-hooks.la
kea_dhcp6_LDADD
+=
$(top_builddir)
/src/lib/database/libkea-database.la
kea_dhcp6_LDADD
+=
$(top_builddir)
/src/lib/log/libkea-log.la
kea_dhcp6_LDADD
+=
$(top_builddir)
/src/lib/util/threads/libkea-threads.la
kea_dhcp6_LDADD
+=
$(top_builddir)
/src/lib/util/libkea-util.la
...
...
src/bin/dhcp6/ctrl_dhcp6_srv.cc
View file @
012a97a8
...
...
@@ -11,7 +11,6 @@
#include <dhcp/libdhcp++.h>
#include <dhcpsrv/cfgmgr.h>
#include <dhcpsrv/cfg_db_access.h>
#include <dhcpsrv/database_connection.h>
#include <dhcp6/ctrl_dhcp6_srv.h>
#include <dhcp6/dhcp6to4_ipc.h>
#include <dhcp6/dhcp6_log.h>
...
...
@@ -24,6 +23,7 @@
#include <sstream>
using
namespace
isc
::
config
;
using
namespace
isc
::
db
;
using
namespace
isc
::
dhcp
;
using
namespace
isc
::
data
;
using
namespace
isc
::
hooks
;
...
...
src/bin/dhcp6/ctrl_dhcp6_srv.h
View file @
012a97a8
...
...
@@ -11,7 +11,7 @@
#include <asiolink/asiolink.h>
#include <cc/data.h>
#include <cc/command_interpreter.h>
#include <d
hcpsrv
/database_connection.h>
#include <d
atabase
/database_connection.h>
#include <dhcpsrv/timer_mgr.h>
#include <dhcp6/dhcp6_srv.h>
...
...
@@ -335,7 +335,7 @@ private:
/// @param db_reconnect_ctl pointer to the ReconnectCtl containing the
/// configured reconnect parameters
///
void
dbReconnect
(
ReconnectCtlPtr
db_reconnect_ctl
);
void
dbReconnect
(
db
::
ReconnectCtlPtr
db_reconnect_ctl
);
/// @brief Callback DB backends should invoke upon loss of connectivity
///
...
...
@@ -353,7 +353,7 @@ private:
///
/// @param db_reconnect_ctl pointer to the ReconnectCtl containing the
/// configured reconnect parameters
bool
dbLostCallback
(
ReconnectCtlPtr
db_reconnect_ctl
);
bool
dbLostCallback
(
db
::
ReconnectCtlPtr
db_reconnect_ctl
);
/// @brief Static pointer to the sole instance of the DHCP server.
///
...
...
src/bin/dhcp6/tests/Makefile.am
View file @
012a97a8
...
...
@@ -135,6 +135,7 @@ dhcp6_unittests_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
dhcp6_unittests_LDADD
+=
$(top_builddir)
/src/lib/dns/libkea-dns++.la
dhcp6_unittests_LDADD
+=
$(top_builddir)
/src/lib/cryptolink/libkea-cryptolink.la
dhcp6_unittests_LDADD
+=
$(top_builddir)
/src/lib/hooks/libkea-hooks.la
dhcp6_unittests_LDADD
+=
$(top_builddir)
/src/lib/database/libkea-database.la
dhcp6_unittests_LDADD
+=
$(top_builddir)
/src/lib/log/libkea-log.la
dhcp6_unittests_LDADD
+=
$(top_builddir)
/src/lib/util/threads/libkea-threads.la
dhcp6_unittests_LDADD
+=
$(top_builddir)
/src/lib/util/libkea-util.la
...
...
src/lib/database/.gitignore
0 → 100644
View file @
012a97a8
/db_messages.cc
/db_messages.h
/s-messages
src/lib/database/Makefile.am
View file @
012a97a8
...
...
@@ -5,11 +5,30 @@ AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS
=
$(KEA_CXXFLAGS)
# Define rule to build logging source files from message file
db_messages.h db_messages.cc
:
s-messages
s-messages
:
db_messages.mes
$(top_builddir)
/src/lib/log/compiler/kea-msg-compiler
$(top_srcdir)
/src/lib/database/db_messages.mes
touch
$@
# Tell automake that the message files are built as part of the build process
# (so that they are built before the main library is built).
BUILT_SOURCES
=
db_messages.h db_messages.cc
# Ensure that the message file is included in the distribution
EXTRA_DIST
=
db_messages.mes
# Get rid of generated message files on a clean
CLEANFILES
=
*
.gcno
*
.gcda http_messages.h http_messages.cc s-messages
lib_LTLIBRARIES
=
libkea-database.la
libkea_database_la_SOURCES
=
database_connection.cc database_connection.h
libkea_database_la_SOURCES
+=
db_exceptions.h
libkea_database_la_SOURCES
+=
db_log.cc db_log.h
nodist_libkea_database_la_SOURCES
=
db_messages.cc db_messages.h
libkea_database_la_LIBADD
=
$(top_builddir)
/src/lib/log/libkea-log.la
libkea_database_la_LIBADD
+=
$(top_builddir)
/src/lib/log/interprocess/libkea-log_interprocess.la
libkea_database_la_LIBADD
+=
$(top_builddir)
/src/lib/util/threads/libkea-threads.la
...
...
@@ -23,8 +42,6 @@ libkea_database_la_LDFLAGS = -no-undefined -version-info 0:0:0
# The message file should be in the distribution.
#EXTRA_DIST = config_backend.dox
CLEANFILES
=
*
.gcno
*
.gcda
# Specify the headers for copying into the installation directory tree.
#libkea_cb_includedir = $(pkgincludedir)/config
#libkea_cb_include_HEADERS =
src/lib/database/database_log.cc
0 → 100644
View file @
012a97a8
// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
#include <database/database_log.h>
namespace
isc
{
namespace
db
{
isc
::
log
::
Logger
database_logger
(
"database"
);
}
// end of namespace db
}
// end of namespace isc
src/lib/d
hcpsrv/dhcpsrv_db
_log.h
→
src/lib/d
atabase/database
_log.h
View file @
012a97a8
...
...
@@ -4,23 +4,16 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifndef DHCPSRV_DB_LOG_H
#define DHCPSRV_DB_LOG_H
#include <database/db_log.h>
#ifndef DATABASE_LOG_H
#define DATABASE_LOG_H
namespace
isc
{
namespace
dhcp
{
/// @brief DHCP server database message map
extern
const
db
::
DbLogger
::
MessageMap
dhcpsrv_db_message_map
;
namespace
db
{
/// @brief DHCP server database Logger
///
/// It is the default database logger.
extern
db
::
DbLogger
dhcpsrv_db_logger
;
/// @brief Common database library logger.
extern
isc
::
log
::
Logger
database_logger
;
}
// namespace
dhcp
}
// namespace isc
}
//
end of
namespace
isc::db
}
//
end of
namespace isc
#endif // D
HCPSRV_DB
_LOG_H
#endif // D
ATABASE
_LOG_H
src/lib/database/db_log.cc
View file @
012a97a8
...
...
@@ -10,13 +10,42 @@
#include <exceptions/exceptions.h>
#include <database/db_log.h>
#include <database/db_messages.h>
using
namespace
isc
::
log
;
namespace
isc
{
namespace
db
{
DbLoggerStack
db_logger_stack
;
/// @brief Map of translated messages.
const
DbLogger
::
MessageMap
db_message_map
=
{
{
DB_INVALID_ACCESS
,
DATABASE_INVALID_ACCESS
},
{
PGSQL_DEALLOC_ERROR
,
DATABASE_PGSQL_DEALLOC_ERROR
},
{
PGSQL_FATAL_ERROR
,
DATABASE_PGSQL_FATAL_ERROR
},
{
PGSQL_START_TRANSACTION
,
DATABASE_PGSQL_START_TRANSACTION
},
{
PGSQL_COMMIT
,
DATABASE_PGSQL_COMMIT
},
{
PGSQL_ROLLBACK
,
DATABASE_PGSQL_ROLLBACK
},
{
MYSQL_FATAL_ERROR
,
DATABASE_MYSQL_FATAL_ERROR
},
{
MYSQL_START_TRANSACTION
,
DATABASE_MYSQL_START_TRANSACTION
},
{
MYSQL_COMMIT
,
DATABASE_MYSQL_COMMIT
},
{
MYSQL_ROLLBACK
,
DATABASE_MYSQL_ROLLBACK
},
{
CQL_DEALLOC_ERROR
,
DATABASE_CQL_DEALLOC_ERROR
},
{
CQL_CONNECTION_BEGIN_TRANSACTION
,
DATABASE_CQL_CONNECTION_BEGIN_TRANSACTION
},
{
CQL_CONNECTION_COMMIT
,
DATABASE_CQL_CONNECTION_COMMIT
},
{
CQL_CONNECTION_ROLLBACK
,
DATABASE_CQL_CONNECTION_ROLLBACK
}
};
isc
::
log
::
Logger
database_logger
(
"database"
);
DbLogger
db_logger_translator
(
database_logger
,
db_message_map
);
DbLoggerStack
db_logger_stack
=
{
db_logger_translator
};
const
MessageID
&
DbLogger
::
translateMessage
(
const
DbMessageID
&
id
)
const
{
...
...
src/lib/database/db_log.h
View file @
012a97a8
...
...
@@ -41,6 +41,10 @@ const int DB_DBG_TRACE_DETAIL = isc::log::DBGLVL_TRACE_DETAIL;
///@}
/// @brief Common database library logger.
extern
isc
::
log
::
Logger
database_logger
;
///@{
/// @brief Database messages
///
...
...
@@ -109,43 +113,49 @@ void checkDbLoggerStack();
/// @brief Macros
#define DB_LOG_DEBUG(LEVEL, MESSAGE) \
checkDbLoggerStack(); \
isc::db::
checkDbLoggerStack(); \
if (!db_logger_stack.back().logger_.isDebugEnabled((LEVEL))) { \
} else \
db_logger_stack.back().logger_.debug((LEVEL), \
db_logger_stack.back().translateMessage((MESSAGE)))
isc::db::
db_logger_stack.back().logger_.debug((LEVEL), \
isc::db::
db_logger_stack.back().translateMessage((MESSAGE)))
#define DB_LOG_INFO(MESSAGE) \
checkDbLoggerStack(); \
if (!db_logger_stack.back().logger_.isInfoEnabled()) { \
isc::db::
checkDbLoggerStack(); \
if (!
isc::db::
db_logger_stack.back().logger_.isInfoEnabled()) { \
} else \
db_logger_stack.back().logger_.info( \
db_logger_stack.back().translateMessage((MESSAGE)))
isc::db::
db_logger_stack.back().logger_.info( \
isc::db::
db_logger_stack.back().translateMessage((MESSAGE)))
#define DB_LOG_WARN(MESSAGE) \
checkDbLoggerStack(); \
if (!db_logger_stack.back().logger_.isWarnEnabled()) { \
isc::db::
checkDbLoggerStack(); \
if (!
isc::db::
db_logger_stack.back().logger_.isWarnEnabled()) { \
} else \
db_logger_stack.back().logger_.warn( \
db_logger_stack.back().translateMessage((MESSAGE)))
isc::db::
db_logger_stack.back().logger_.warn( \
isc::db::
db_logger_stack.back().translateMessage((MESSAGE)))
#define DB_LOG_ERROR(MESSAGE) \
checkDbLoggerStack(); \
if (!db_logger_stack.back().logger_.isErrorEnabled()) { \
isc::db::
checkDbLoggerStack(); \
if (!
isc::db::
db_logger_stack.back().logger_.isErrorEnabled()) { \
} else \
db_logger_stack.back().logger_.error( \
db_logger_stack.back().translateMessage((MESSAGE)))
isc::db::
db_logger_stack.back().logger_.error( \
isc::db::
db_logger_stack.back().translateMessage((MESSAGE)))
#define DB_LOG_FATAL(MESSAGE) \
checkDbLoggerStack(); \
if (!db_logger_stack.back().logger_.isFatalEnabled()) { \
isc::db::
checkDbLoggerStack(); \
if (!
isc::db::
db_logger_stack.back().logger_.isFatalEnabled()) { \
} else \
db_logger_stack.back().logger_.fatal( \
db_logger_stack.back().translateMessage((MESSAGE)))
isc::db::
db_logger_stack.back().logger_.fatal( \
isc::db::
db_logger_stack.back().translateMessage((MESSAGE)))
///@}
/// @brief DHCP server database message map
extern
const
db
::
DbLogger
::
MessageMap
db_message_map
;
/// @brief Database logger translator.
extern
db
::
DbLogger
db_logger_translator
;
}
// namespace db
}
// namespace isc
...
...
src/lib/database/db_messages.mes
0 → 100644
View file @
012a97a8
# Copyright (C) 2012-2018 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
$NAMESPACE isc::db
% DATABASE_CQL_CONNECTION_BEGIN_TRANSACTION begin transaction on current connection.
The server has issued a begin transaction call.
% DATABASE_CQL_CONNECTION_COMMIT committing to Cassandra database on current connection.
A commit call been issued on the server. For Cassandra, this is a no-op.
% DATABASE_CQL_CONNECTION_ROLLBACK rolling back Cassandra database on current connection.
The code has issued a rollback call. For Cassandra, this is a no-op.
% DATABASE_CQL_DEALLOC_ERROR An error occurred while closing the CQL connection: %1
This is an error message issued when a DHCP server (either V4 or V6) experienced
and error freeing CQL database resources as part of closing its connection to
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.
% DATABASE_INVALID_ACCESS invalid database access string: %1
This is logged when an attempt has been made to parse a database access string
and the attempt ended in error. The access string in question - which
should be of the form 'keyword=value keyword=value...' is included in
the message.
% DATABASE_MYSQL_COMMIT committing to MySQL database
The code has issued a commit call. All outstanding transactions will be
committed to the database. Note that depending on the MySQL settings,
the committal may not include a write to disk.
% DATABASE_MYSQL_FATAL_ERROR Unrecoverable MySQL error occurred: %1 for <%2>, reason: %3 (error code: %4).
An error message indicating that communication with the MySQL database server
has been lost. If automatic recovery has been enabled, then the server will
attempt to recover connectivity. If not the server wil exit with a
non-zero exit code. The cause of such an error is most likely a network issue
or the MySQL server has gone down.
% DATABASE_MYSQL_ROLLBACK rolling back MySQL database
The code has issued a rollback call. All outstanding transaction will
be rolled back and not committed to the database.
% DATABASE_MYSQL_START_TRANSACTION starting new MySQL transaction
A debug message issued when a new MySQL transaction is being started.
This message is typically not issued when inserting data into a
single table because the server doesn't explicitly start
transactions in this case. This message is issued when data is
inserted into multiple tables with multiple INSERT statements
and there may be a need to rollback the whole transaction if
any of these INSERT statements fail.
% DATABASE_PGSQL_COMMIT committing to PostgreSQL database
The code has issued a commit call. All outstanding transactions will be
committed to the database. Note that depending on the PostgreSQL settings,
the committal may not include a write to disk.
% DATABASE_PGSQL_DEALLOC_ERROR An error occurred deallocating SQL statements while closing the PostgreSQL lease database: %1
This is an error message issued when a DHCP server (either V4 or V6) experienced
and error freeing database SQL resources as part of closing its connection to
the PostgreSQL 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.
% DATABASE_PGSQL_FATAL_ERROR Unrecoverable PostgreSQL error occurred: Statement: <%1>, reason: %2 (error code: %3).
An error message indicating that communication with the PostgreSQL database server
has been lost. If automatic recovery has been enabled, then the server will
attempt to recover the connectivity. If not the server wil exit with a
non-zero exit code. The cause of such an error is most likely a network issue
or the PostgreSQL server has gone down.
% DATABASE_PGSQL_ROLLBACK rolling back PostgreSQL database
The code has issued a rollback call. All outstanding transaction will
be rolled back and not committed to the database.
% DATABASE_PGSQL_START_TRANSACTION starting a new PostgreSQL transaction
A debug message issued when a new PostgreSQL transaction is being started.
This message is typically not issued when inserting data into a
single table because the server doesn't explicitly start
transactions in this case. This message is issued when data is
inserted into multiple tables with multiple INSERT statements
and there may be a need to rollback the whole transaction if
any of these INSERT statements fail.
src/lib/dhcpsrv/Makefile.am
View file @
012a97a8
...
...
@@ -118,7 +118,6 @@ libkea_dhcpsrv_la_SOURCES += daemon.cc daemon.h
libkea_dhcpsrv_la_SOURCES
+=
db_type.h
libkea_dhcpsrv_la_SOURCES
+=
dhcp4o6_ipc.cc dhcp4o6_ipc.h
libkea_dhcpsrv_la_SOURCES
+=
dhcpsrv_log.cc dhcpsrv_log.h
libkea_dhcpsrv_la_SOURCES
+=
dhcpsrv_db_log.cc dhcpsrv_db_log.h
libkea_dhcpsrv_la_SOURCES
+=
host.cc host.h
libkea_dhcpsrv_la_SOURCES
+=
host_container.h
libkea_dhcpsrv_la_SOURCES
+=
host_data_source_factory.cc host_data_source_factory.h
...
...
@@ -276,13 +275,8 @@ libkea_dhcpsrv_include_HEADERS = \
d2_client_cfg.h
\
d2_client_mgr.h
\
daemon.h
\
database_connection.h
\
db_exceptions.h
\
db_log.h
\
db_type.h
\
dhcp4o6_ipc.h
\
dhcpsrv_db_log.h
\
dhcpsrv_log.h
\
host.h
\
host_container.h
\
host_data_source_factory.h
\
...
...
src/lib/dhcpsrv/cfg_db_access.h
View file @
012a97a8
...
...
@@ -8,7 +8,7 @@
#define CFG_DBACCESS_H
#include <cc/cfg_to_element.h>
#include <d
hcpsrv
/database_connection.h>
#include <d
atabase
/database_connection.h>
#include <boost/shared_ptr.hpp>
#include <string>
...
...
src/lib/dhcpsrv/cql_connection.cc
View file @
012a97a8
// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2015-2018 Deutsche Telekom AG.
//
// Authors: Razvan Becheriu <razvan.becheriu@qualitance.com>
...
...
@@ -17,13 +18,15 @@
#include <config.h>
#include <database/db_exceptions.h>
#include <database/db_log.h>
#include <dhcpsrv/cql_connection.h>
#include <dhcpsrv/cql_exchange.h>
#include <dhcpsrv/db_exceptions.h>
#include <dhcpsrv/db_log.h>
#include <string>
using
namespace
isc
::
db
;
namespace
isc
{
namespace
dhcp
{
...
...
src/lib/dhcpsrv/cql_connection.h
View file @
012a97a8
...
...
@@ -19,7 +19,7 @@
#ifndef CQL_CONNECTION_H
#define CQL_CONNECTION_H
#include <d
hcpsrv
/database_connection.h>
#include <d
atabase
/database_connection.h>
#include <cassandra.h>
...
...
@@ -116,7 +116,7 @@ typedef std::pair<StatementTag, CqlTaggedStatement> StatementMapEntry;
/// to the Cassandra database and preparing of compiled statements. Its fields
/// are public because they are used (both set and retrieved) in classes that
/// use instances of CqlConnection.
class
CqlConnection
:
public
DatabaseConnection
{
class
CqlConnection
:
public
db
::
DatabaseConnection
{
public:
/// @brief Constructor
///
...
...
@@ -133,7 +133,7 @@ public:
/// by the CQL backend.
/// @param statements statements to be prepared
///
/// @throw isc::d
hcp
::DbOperationError if an operation on the open database
/// @throw isc::d
b
::DbOperationError if an operation on the open database
/// has failed
/// @throw isc::InvalidParameter if there is an invalid access in the
/// vector. This represents an internal error within the code.
...
...
src/lib/dhcpsrv/cql_exchange.cc
View file @
012a97a8
// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2016-2017 Deutsche Telekom AG.
//
// Authors: Razvan Becheriu <razvan.becheriu@qualitance.com>
...
...
@@ -17,9 +18,9 @@
#include <config.h>
#include <database/db_exceptions.h>
#include <dhcpsrv/cql_connection.h>
#include <dhcpsrv/cql_exchange.h>
#include <dhcpsrv/db_exceptions.h>
#include <dhcpsrv/sql_common.h>
#include <boost/multi_index/hashed_index.hpp>
...
...
@@ -36,6 +37,8 @@
#include <utility>
#include <vector>
using
namespace
isc
::
db
;
namespace
isc
{
namespace
dhcp
{
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment