Kea
1.9.9-git
|
Classes | |
class | AmbiguousDatabase |
Specification of the database backend to be used yields multiple results. More... | |
class | AnyArray |
Structure used to bind C++ input values to dynamic CQL parameters. More... | |
class | AuditEntry |
Represents a single entry in the audit table. More... | |
struct | AuditEntryModificationTimeIdTag |
Tag used to access index by modification time. More... | |
struct | AuditEntryObjectIdTag |
Tag used to access index by object id. More... | |
struct | AuditEntryObjectTypeTag |
Tag used to access index by object type. More... | |
class | BackendSelector |
Config Backend selector. More... | |
class | CqlCommon |
Common operations in Cassandra exchanges. More... | |
class | CqlConnection |
Common CQL connector pool. More... | |
class | CqlExchange |
Cassandra Exchange. More... | |
struct | CqlFunction |
Wrapper over the bind and get functions that interface with Cassandra. More... | |
struct | CqlTaggedStatement |
Defines a single statement or query. More... | |
class | CqlVersionExchange |
Exchange used to retrieve schema version from the keyspace. More... | |
class | DatabaseConnection |
Common database connection class. More... | |
class | DataTruncated |
Data is truncated. More... | |
struct | DB_LOG |
DB_LOG_* logic. More... | |
struct | DB_LOG_DEBUG |
struct | DB_LOG_ERROR |
struct | DB_LOG_FATAL |
all DB_LOG specializations More... | |
struct | DB_LOG_INFO |
struct | DB_LOG_WARN |
class | DbAccessParser |
Parse Database Parameters. More... | |
class | DbConfigError |
Error detected in the database configuration. More... | |
class | DbConnectionUnusable |
Exception thrown when a specific connection has been rendered unusable either through loss of connectivity or API lib error. More... | |
class | DbInvalidReadOnly |
Invalid 'readonly' value specification. More... | |
class | DbInvalidTimeout |
Invalid Timeout. More... | |
class | DbLogger |
Database logger class. More... | |
class | DbOpenError |
Exception thrown on failure to open database. More... | |
class | DbOperationError |
Exception thrown on failure to execute a database function. More... | |
class | DuplicateEntry |
Database duplicate entry error. More... | |
struct | ExchangeDataTypeHash |
a helper structure with a function call operator that returns key value in a format expected by std::hash. More... | |
class | InvalidAddressFamily |
Invalid address family used as input to Lease Manager. More... | |
class | InvalidRange |
Upper bound address is lower than lower bound address while retrieving a range of leases. More... | |
class | InvalidType |
Invalid type exception. More... | |
class | MultipleRecords |
Multiple lease records found where one expected. More... | |
class | MySqlBinding |
MySQL binding used in prepared statements. More... | |
struct | MySqlBindingTraits |
Trait class for column types supported in MySQL. More... | |
struct | MySqlBindingTraits< boost::posix_time::ptime > |
Specialization for MySQL TIMESTAMP type. More... | |
struct | MySqlBindingTraits< float > |
struct | MySqlBindingTraits< int16_t > |
Speclialization for MySQL SMALLINT type. More... | |
struct | MySqlBindingTraits< int32_t > |
Specialization for MySQL INT type. More... | |
struct | MySqlBindingTraits< int64_t > |
Specialization for MySQL BIGINT type. More... | |
struct | MySqlBindingTraits< int8_t > |
Specialization for MySQL TINYINT type. More... | |
struct | MySqlBindingTraits< std::string > |
Specialization for MySQL TEXT type. More... | |
struct | MySqlBindingTraits< uint16_t > |
Specialization for MySQL SMALLINT UNSIGNED type. More... | |
struct | MySqlBindingTraits< uint32_t > |
Specialization for MySQL INT UNSIGNED type. More... | |
struct | MySqlBindingTraits< uint64_t > |
Specialization for MySQL BIGINT UNSIGNED type. More... | |
struct | MySqlBindingTraits< uint8_t > |
Specialization for MySQL TINYINT UNSIGNED type. More... | |
class | MySqlConnection |
Common MySQL Connector Pool. More... | |
class | MySqlFreeResult |
Fetch and Release MySQL Results. More... | |
class | MySqlHolder |
MySQL Handle Holder. More... | |
class | MySqlTransaction |
RAII object representing MySQL transaction. More... | |
class | NoDatabaseName |
Exception thrown if name of database is not specified. More... | |
class | NoSuchDatabase |
Error when specified database could not be found in the server configuration. More... | |
class | NullKeyError |
Key is NULL but was specified NOT NULL. More... | |
class | PgSqlConnection |
Common PgSql Connector Pool. More... | |
class | PgSqlExchange |
Base class for marshalling data to and from PostgreSQL. More... | |
class | PgSqlHolder |
Postgresql connection handle Holder. More... | |
class | PgSqlResult |
RAII wrapper for PostgreSQL Result sets. More... | |
struct | PgSqlTaggedStatement |
Define a PostgreSQL statement. More... | |
class | PgSqlTransaction |
RAII object representing a PostgreSQL transaction. More... | |
struct | PsqlBindArray |
class | ReadOnlyDb |
Attempt to modify data in read-only database. More... | |
class | ReconnectCtl |
Warehouses DB reconnect control values. More... | |
class | Server |
Represents information about a Kea server in the database. More... | |
class | ServerFetcher |
Utility class used to fetch Server objects from the ServerCollection . More... | |
class | ServerSelector |
Server selector for associating objects in a database with specific servers. More... | |
struct | ServerTagIndexTag |
Tag identifying an index by server tag. More... | |
class | SqlExchange |
Base class for backend exchanges. More... | |
class | StatementNotApplied |
Database statement not applied. More... | |
struct | StatementTagEqual |
Equality function for StatementMap keys. More... | |
struct | StatementTagHash |
Hash function for StatementMap keys. More... | |
struct | TaggedStatement |
MySQL Selection Statements. More... | |
class | Udt |
Typedefs | |
typedef AnyArray | AnyCollection |
Defines an array of arbitrary objects (used by Cassandra backend) More... | |
typedef boost::multi_index_container< AuditEntryPtr, boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< boost::multi_index::tag< AuditEntryObjectTypeTag >, boost::multi_index::composite_key< AuditEntry, boost::multi_index::const_mem_fun< AuditEntry, std::string,&AuditEntry::getObjectType >, boost::multi_index::const_mem_fun< AuditEntry, AuditEntry::ModificationType,&AuditEntry::getModificationType > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< AuditEntryModificationTimeIdTag >, boost::multi_index::composite_key< AuditEntry, boost::multi_index::const_mem_fun< AuditEntry, boost::posix_time::ptime,&AuditEntry::getModificationTime >, boost::multi_index::const_mem_fun< AuditEntry, uint64_t,&AuditEntry::getRevisionId > > >, boost::multi_index::hashed_non_unique< boost::multi_index::tag< AuditEntryObjectIdTag >, boost::multi_index::const_mem_fun< AuditEntry, uint64_t,&AuditEntry::getObjectId > > >> | AuditEntryCollection |
Multi index container holding AuditEntry instances. More... | |
typedef boost::shared_ptr< AuditEntryCollection > | AuditEntryCollectionPtr |
typedef boost::shared_ptr< AuditEntry > | AuditEntryPtr |
Pointer to the AuditEntry object. More... | |
typedef std::vector< cass_byte_t > | CassBlob |
Host identifier converted to Cassandra data type. More... | |
typedef boost::shared_ptr< const std::string > | ConstStringPtr |
Structure used to bind C++ input values to dynamic SQL parameters The structure contains three vectors which store the input values, data lengths, and formats. More... | |
typedef CassError(* | CqlBindFunction) (const boost::any &value, const size_t &index, CassStatement *statement) |
Binds a C++ object to a Cassandra statement's parameter. More... | |
typedef CassError(* | CqlCollectionAppendFunction) (const boost::any &value, CassCollection *collection) |
Sets an item in a collection. More... | |
typedef std::shared_ptr< CqlConnection > | CqlConnectionPtr |
typedef std::unordered_map< ExchangeDataType, CqlFunction, ExchangeDataTypeHash > | CqlFunctionMap |
Defines a type for storing aux. Cassandra functions. More... | |
typedef CassError(* | CqlGetFunction) (const boost::any &data, const CassValue *value) |
Converts a single Cassandra column value to a C++ object. More... | |
typedef CassError(* | CqlUdtSetFunction) (const boost::any &value, const size_t &index, CassUserType *cass_user_type) |
Sets a member in a UDT. More... | |
typedef std::function< bool(ReconnectCtlPtr db_reconnect_ctl)> | DbCallback |
Defines a callback prototype for propagating events upward. More... | |
typedef std::list< DbLogger > | DbLoggerStack |
Database logger stack. More... | |
typedef std::function< isc::asiolink::IOServicePtr()> | IOServiceAccessor |
Function which returns the IOService that can be used to recover the connection. More... | |
typedef boost::shared_ptr< IOServiceAccessor > | IOServiceAccessorPtr |
Pointer to an instance of IOServiceAccessor. More... | |
typedef std::vector< MySqlBindingPtr > | MySqlBindingCollection |
Collection of bindings. More... | |
typedef boost::shared_ptr< MySqlBinding > | MySqlBindingPtr |
Shared pointer to the Binding class. More... | |
typedef boost::shared_ptr< PsqlBindArray > | PsqlBindArrayPtr |
Defines a smart pointer to PsqlBindArray. More... | |
typedef boost::shared_ptr< ReconnectCtl > | ReconnectCtlPtr |
Pointer to an instance of ReconnectCtl. More... | |
typedef boost::multi_index_container< ServerPtr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< ServerTagIndexTag >, boost::multi_index::const_mem_fun< Server, std::string,&Server::getServerTagAsText > > >> | ServerCollection |
Multi index container for Server . More... | |
typedef boost::shared_ptr< Server > | ServerPtr |
Shared pointer to the Server class. More... | |
typedef std::unordered_map< StatementTag, CqlTaggedStatement, StatementTagHash, StatementTagEqual > | StatementMap |
A container for all statements. More... | |
typedef std::pair< StatementTag, CqlTaggedStatement > | StatementMapEntry |
A type for a single entry on the statements map. More... | |
typedef char const *const | StatementTag |
Statement index representing the statement name. More... | |
typedef std::pair< uint32_t, uint32_t > | VersionPair |
Pair containing major and minor versions. More... | |
typedef std::unordered_map< std::type_index, ExchangeDataType > | AnyTypeMap |
Map types used to determine exchange type. More... | |
typedef std::unordered_map< uint8_t, ExchangeDataType > | CassTypeMap |
Functions | |
void | checkDbLoggerStack () |
Check database logger stack. More... | |
ExchangeDataType | exchangeType (const boost::any &object) |
Determine exchange type based on boost::any type. More... | |
ExchangeDataType | exchangeType (const CassValueType &type) |
Determine exchange type based on CassValueType. More... | |
std::size_t | hash_value (const CassValueType &key) |
hash function for CassTypeMap More... | |
int | MysqlExecuteStatement (MYSQL_STMT *stmt) |
Execute a prepared statement. More... | |
int | MysqlQuery (MYSQL *mysql, const char *stmt) |
Execute a literal statement. More... | |
template<typename Fun , typename... Args> | |
int | retryOnDeadlock (Fun &fun, Args...args) |
Retry on InnoDB deadlock. More... | |
CqlBind functions for binding data into Cassandra format for | |
insertion: | |
CqlUdtSet functions for binding data into Cassandra format for | |
insertion of a UDT: | |
CqlCollectionAppend functions for binding data into Cassandra format | |
for insertion of a collection: | |
CqlGet functions for retrieving data of the proper Cassandra format: |
Variables | |
CqlFunctionMap | CQL_FUNCTIONS |
Functions used to interface with the Cassandra C++ driver. More... | |
const isc::log::MessageID | DATABASE_CQL_CONNECTION_BEGIN_TRANSACTION = "DATABASE_CQL_CONNECTION_BEGIN_TRANSACTION" |
const isc::log::MessageID | DATABASE_CQL_CONNECTION_COMMIT = "DATABASE_CQL_CONNECTION_COMMIT" |
const isc::log::MessageID | DATABASE_CQL_CONNECTION_ROLLBACK = "DATABASE_CQL_CONNECTION_ROLLBACK" |
const isc::log::MessageID | DATABASE_CQL_DEALLOC_ERROR = "DATABASE_CQL_DEALLOC_ERROR" |
const isc::log::MessageID | DATABASE_INVALID_ACCESS = "DATABASE_INVALID_ACCESS" |
isc::log::Logger | database_logger ("database") |
Common database library logger. More... | |
const isc::log::MessageID | DATABASE_MYSQL_COMMIT = "DATABASE_MYSQL_COMMIT" |
const isc::log::MessageID | DATABASE_MYSQL_FATAL_ERROR = "DATABASE_MYSQL_FATAL_ERROR" |
const isc::log::MessageID | DATABASE_MYSQL_ROLLBACK = "DATABASE_MYSQL_ROLLBACK" |
const isc::log::MessageID | DATABASE_MYSQL_START_TRANSACTION = "DATABASE_MYSQL_START_TRANSACTION" |
const isc::log::MessageID | DATABASE_PGSQL_COMMIT = "DATABASE_PGSQL_COMMIT" |
const isc::log::MessageID | DATABASE_PGSQL_DEALLOC_ERROR = "DATABASE_PGSQL_DEALLOC_ERROR" |
const isc::log::MessageID | DATABASE_PGSQL_FATAL_ERROR = "DATABASE_PGSQL_FATAL_ERROR" |
const isc::log::MessageID | DATABASE_PGSQL_ROLLBACK = "DATABASE_PGSQL_ROLLBACK" |
const isc::log::MessageID | DATABASE_PGSQL_START_TRANSACTION = "DATABASE_PGSQL_START_TRANSACTION" |
const isc::log::MessageID | DATABASE_TO_JSON_ERROR = "DATABASE_TO_JSON_ERROR" |
std::mutex | db_logger_mutex |
Global mutex to protect logger stack. More... | |
DbLoggerStack | db_logger_stack = { db_logger_translator } |
Global database logger stack (initialized to database logger) More... | |
DbLogger | db_logger_translator (database_logger, db_message_map) |
Database logger translator. More... | |
const DbLogger::MessageMap | db_message_map |
Map of translated messages. More... | |
const int | MYSQL_DEFAULT_CONNECTION_TIMEOUT = 5 |
const uint32_t | PG_SCHEMA_VERSION_MAJOR = 6 |
Define PostgreSQL backend version: 6.2. More... | |
const uint32_t | PG_SCHEMA_VERSION_MINOR = 2 |
const int | PGSQL_DEFAULT_CONNECTION_TIMEOUT = 5 |
const size_t | PGSQL_MAX_PARAMETERS_IN_QUERY = 32 |
constexpr uint32_t | CQL_DRIVER_VERSION_MAJOR = CASS_VERSION_MAJOR |
Define CQL backend version. More... | |
constexpr uint32_t | CQL_DRIVER_VERSION_MINOR = CASS_VERSION_MINOR |
constexpr uint32_t | CQL_SCHEMA_VERSION_MAJOR = 5u |
Define CQL schema version: 5.0. More... | |
constexpr uint32_t | CQL_SCHEMA_VERSION_MINOR = 0u |
const int | DB_DBG_TRACE_DETAIL = isc::log::DBGLVL_TRACE_DETAIL |
Database logging levels. More... | |
Current database schema version values. | |
const uint32_t | MYSQL_SCHEMA_VERSION_MAJOR = 9 |
const uint32_t | MYSQL_SCHEMA_VERSION_MINOR = 6 |
const size_t | OID_NONE = 0 |
Constants for PostgreSQL data types These are defined by PostgreSQL in <catalog/pg_type.h>, but including this file is extraordinarily convoluted, so we'll use these to fill-in. More... | |
const size_t | OID_BOOL = 16 |
const size_t | OID_BYTEA = 17 |
const size_t | OID_INT8 = 20 |
const size_t | OID_INT2 = 21 |
const size_t | OID_INT4 = 23 |
const size_t | OID_TEXT = 25 |
const size_t | OID_VARCHAR = 1043 |
const size_t | OID_TIMESTAMP = 1114 |
MySQL constants. | |
typedef char | my_bools |
my_bools type for vectors. More... | |
typedef bool | my_bool |
my_bool type in MySQL 8.x. More... | |
const my_bool | MLM_FALSE = false |
MySQL false value. More... | |
const my_bool | MLM_TRUE = true |
MySQL true value. More... | |
const int | MLM_MYSQL_FETCH_SUCCESS = 0 |
check for bool size More... | |
const int | MLM_MYSQL_FETCH_FAILURE = 0 |
MySQL fetch failure code. More... | |
typedef AnyArray isc::db::AnyCollection |
Defines an array of arbitrary objects (used by Cassandra backend)
Definition at line 90 of file cql_exchange.h.
typedef std::unordered_map<std::type_index, ExchangeDataType> isc::db::AnyTypeMap |
Map types used to determine exchange type.
Defines type that maps specific type to an enum
Definition at line 81 of file cql_exchange.cc.
typedef boost::multi_index_container< AuditEntryPtr, boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< boost::multi_index::tag<AuditEntryObjectTypeTag>, boost::multi_index::composite_key< AuditEntry, boost::multi_index::const_mem_fun< AuditEntry, std::string, &AuditEntry::getObjectType >, boost::multi_index::const_mem_fun< AuditEntry, AuditEntry::ModificationType, &AuditEntry::getModificationType > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag<AuditEntryModificationTimeIdTag>, boost::multi_index::composite_key< AuditEntry, boost::multi_index::const_mem_fun< AuditEntry, boost::posix_time::ptime, &AuditEntry::getModificationTime >, boost::multi_index::const_mem_fun< AuditEntry, uint64_t, &AuditEntry::getRevisionId > > >, boost::multi_index::hashed_non_unique< boost::multi_index::tag<AuditEntryObjectIdTag>, boost::multi_index::const_mem_fun< AuditEntry, uint64_t, &AuditEntry::getObjectId > > >> isc::db::AuditEntryCollection |
Multi index container holding AuditEntry
instances.
This container provides indexes to access the audit entries by object type and modification time.
Definition at line 291 of file audit_entry.h.
typedef boost::shared_ptr<AuditEntryCollection> isc::db::AuditEntryCollectionPtr |
Definition at line 294 of file audit_entry.h.
typedef boost::shared_ptr<AuditEntry> isc::db::AuditEntryPtr |
Pointer to the AuditEntry
object.
Definition at line 23 of file audit_entry.h.
typedef std::vector<cass_byte_t> isc::db::CassBlob |
Host identifier converted to Cassandra data type.
Definition at line 37 of file cql_exchange.h.
typedef std::unordered_map<uint8_t, ExchangeDataType> isc::db::CassTypeMap |
Definition at line 85 of file cql_exchange.cc.
typedef boost::shared_ptr<const std::string> isc::db::ConstStringPtr |
Structure used to bind C++ input values to dynamic SQL parameters The structure contains three vectors which store the input values, data lengths, and formats.
These vectors are passed directly into the PostgreSQL execute call.
Note that the data values are stored as pointers. These pointers need to be valid for the duration of the PostgreSQL statement execution. In other words populating them with pointers to values that go out of scope before statement is executed is a bad idea.
Other than vectors or buffers of binary data, all other values are currently converted to their string representation prior to sending them to PostgreSQL. All of the add() method variants which accept a non-string value internally create the conversion string which is then retained in the bind array to ensure scope.
smart pointer to const std::strings used by PsqlBindArray to ensure scope of strings supplying exchange values
Definition at line 42 of file pgsql_exchange.h.
typedef CassError(* isc::db::CqlBindFunction) (const boost::any &value, const size_t &index, CassStatement *statement) |
Binds a C++ object to a Cassandra statement's parameter.
Used in all statements.
value | the value to be set or retrieved |
index | offset of the value being processed |
statement | pointer to the parent statement being used |
Definition at line 97 of file cql_exchange.h.
typedef CassError(* isc::db::CqlCollectionAppendFunction) (const boost::any &value, CassCollection *collection) |
Sets an item in a collection.
Used in INSERT & UPDATE statements.
value | pointer to a value to be inserted or updated |
collection | pointer to collection to be inserted or updated |
Definition at line 112 of file cql_exchange.h.
typedef std::shared_ptr<CqlConnection> isc::db::CqlConnectionPtr |
Definition at line 235 of file cql_connection.h.
typedef std::unordered_map<ExchangeDataType, CqlFunction, ExchangeDataTypeHash> isc::db::CqlFunctionMap |
Defines a type for storing aux. Cassandra functions.
Definition at line 62 of file cql_exchange.cc.
typedef CassError(* isc::db::CqlGetFunction) (const boost::any &data, const CassValue *value) |
Converts a single Cassandra column value to a C++ object.
Used in SELECT statements.
data | the result will be stored here (this pointer will be updated) |
value | this value will be converted |
Definition at line 120 of file cql_exchange.h.
typedef CassError(* isc::db::CqlUdtSetFunction) (const boost::any &value, const size_t &index, CassUserType *cass_user_type) |
Sets a member in a UDT.
Used in INSERT & UPDATE statements.
value | the value to be set or retrieved |
index | offset of the value being processed |
cass_user_type | pointer to the user type that uses this member |
Definition at line 105 of file cql_exchange.h.
typedef std::function<bool (ReconnectCtlPtr db_reconnect_ctl)> isc::db::DbCallback |
Defines a callback prototype for propagating events upward.
Definition at line 199 of file database_connection.h.
typedef std::list<DbLogger> isc::db::DbLoggerStack |
typedef std::function<isc::asiolink::IOServicePtr ()> isc::db::IOServiceAccessor |
Function which returns the IOService that can be used to recover the connection.
This accessor is used to lazy retrieve the IOService when the connection is lost. It is useful to retrieve it at a later time to support hook libraries which create managers on load and set IOService later on by using the dhcp4_srv_configured and dhcp6_srv_configured hooks.
Definition at line 208 of file database_connection.h.
typedef boost::shared_ptr<IOServiceAccessor> isc::db::IOServiceAccessorPtr |
Pointer to an instance of IOServiceAccessor.
Definition at line 211 of file database_connection.h.
typedef bool isc::db::my_bool |
my_bool type in MySQL 8.x.
Definition at line 33 of file mysql_constants.h.
typedef char isc::db::my_bools |
my_bools type for vectors.
Definition at line 22 of file mysql_constants.h.
typedef std::vector<MySqlBindingPtr> isc::db::MySqlBindingCollection |
Collection of bindings.
Definition at line 659 of file mysql_binding.h.
typedef boost::shared_ptr<MySqlBinding> isc::db::MySqlBindingPtr |
Shared pointer to the Binding
class.
Definition at line 136 of file mysql_binding.h.
typedef boost::shared_ptr<PsqlBindArray> isc::db::PsqlBindArrayPtr |
Defines a smart pointer to PsqlBindArray.
Definition at line 193 of file pgsql_exchange.h.
typedef boost::shared_ptr<ReconnectCtl> isc::db::ReconnectCtlPtr |
Pointer to an instance of ReconnectCtl.
Definition at line 196 of file database_connection.h.
typedef boost::multi_index_container< ServerPtr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag<ServerTagIndexTag>, boost::multi_index::const_mem_fun<Server, std::string, &Server::getServerTagAsText> > >> isc::db::ServerCollection |
Multi index container for Server
.
It merely contains one index at the moment, but the number of indexes is likely to grow.
Definition at line 35 of file server_collection.h.
typedef boost::shared_ptr<Server> isc::db::ServerPtr |
typedef std::unordered_map<StatementTag, CqlTaggedStatement, StatementTagHash, StatementTagEqual> isc::db::StatementMap |
A container for all statements.
Definition at line 107 of file cql_connection.h.
typedef std::pair<StatementTag, CqlTaggedStatement> isc::db::StatementMapEntry |
A type for a single entry on the statements map.
Definition at line 110 of file cql_connection.h.
typedef char const* const isc::db::StatementTag |
Statement index representing the statement name.
Definition at line 43 of file cql_connection.h.
typedef std::pair<uint32_t, uint32_t> isc::db::VersionPair |
Pair containing major and minor versions.
Definition at line 40 of file cql_connection.h.
enum isc::db::DbMessageID |
Database messages.
Used to map server data types with internal backend storage data types.
Definition at line 26 of file sql_common.h.
enum isc::db::log_type_t |
|
strong |
Type of action to take on connection loss.
Enumerator | |
---|---|
STOP_RETRY_EXIT | |
SERVE_RETRY_EXIT | |
SERVE_RETRY_CONTINUE |
Definition at line 80 of file database_connection.h.
void isc::db::checkDbLoggerStack | ( | ) |
Check database logger stack.
Unexpected | if the stack is empty |
Definition at line 62 of file db_log.cc.
References isc_throw.
Referenced by isc::db::DB_LOG< debug >::DB_LOG().
ExchangeDataType isc::db::exchangeType | ( | const boost::any & | object | ) |
Determine exchange type based on boost::any type.
Definition at line 643 of file cql_exchange.cc.
References isc_throw.
Referenced by isc::db::CqlCommon::bindData(), and isc::db::CqlCommon::getData().
ExchangeDataType isc::db::exchangeType | ( | const CassValueType & | type | ) |
Determine exchange type based on CassValueType.
Definition at line 662 of file cql_exchange.cc.
References isc_throw.
std::size_t isc::db::hash_value | ( | const CassValueType & | key | ) |
hash function for CassTypeMap
Required by g++ versions 5 and below.
key | being hashed |
Definition at line 73 of file cql_exchange.cc.
|
inline |
Execute a prepared statement.
Call mysql_stmt_execute and retry on ER_LOCK_DEADLOCK.
stmt | Statement to execute. |
Definition at line 106 of file mysql_connection.h.
References retryOnDeadlock().
Referenced by isc::dhcp::MySqlHostDataSourceImpl::addStatement(), isc::dhcp::MySqlHostDataSourceImpl::delStatement(), isc::dhcp::MySqlHostDataSourceImpl::getHostCollection(), isc::db::MySqlConnection::getVersion(), isc::db::MySqlConnection::insertQuery(), isc::db::MySqlConnection::selectQuery(), isc::dhcp::MySqlLeaseStatsQuery::start(), and isc::db::MySqlConnection::updateDeleteQuery().
|
inline |
Execute a literal statement.
Call mysql_query and retry on ER_LOCK_DEADLOCK.
mysql | MySQL context. |
stmt | Statement to execute. |
Definition at line 117 of file mysql_connection.h.
References retryOnDeadlock().
int isc::db::retryOnDeadlock | ( | Fun & | fun, |
Args... | args | ||
) |
Retry on InnoDB deadlock.
When f(args) returns ER_LOCK_DEADLOCK f(args) is called again up to 5 times.
Fun | Type of the function which must return an int. |
Args | Types of arguments. |
fun | The function to call. |
args | Arguments. |
Definition at line 89 of file mysql_connection.h.
Referenced by MysqlExecuteStatement(), and MysqlQuery().
constexpr uint32_t isc::db::CQL_DRIVER_VERSION_MAJOR = CASS_VERSION_MAJOR |
Define CQL backend version.
The CASS_VERSION_* constants are defined in a header provided by cpp-driver.
Definition at line 48 of file cql_connection.h.
constexpr uint32_t isc::db::CQL_DRIVER_VERSION_MINOR = CASS_VERSION_MINOR |
Definition at line 49 of file cql_connection.h.
CqlFunctionMap isc::db::CQL_FUNCTIONS |
Functions used to interface with the Cassandra C++ driver.
Definition at line 616 of file cql_exchange.cc.
constexpr uint32_t isc::db::CQL_SCHEMA_VERSION_MAJOR = 5u |
Define CQL schema version: 5.0.
Definition at line 54 of file cql_connection.h.
Referenced by isc::dhcp::CqlHostDataSourceImpl::CqlHostDataSourceImpl(), isc::dhcp::CqlLeaseMgr::CqlLeaseMgr(), and isc::dhcp::CqlLeaseMgr::getDBVersion().
constexpr uint32_t isc::db::CQL_SCHEMA_VERSION_MINOR = 0u |
Definition at line 55 of file cql_connection.h.
Referenced by isc::dhcp::CqlHostDataSourceImpl::CqlHostDataSourceImpl(), isc::dhcp::CqlLeaseMgr::CqlLeaseMgr(), and isc::dhcp::CqlLeaseMgr::getDBVersion().
const isc::log::MessageID isc::db::DATABASE_CQL_CONNECTION_BEGIN_TRANSACTION = "DATABASE_CQL_CONNECTION_BEGIN_TRANSACTION" |
Definition at line 11 of file db_messages.h.
const isc::log::MessageID isc::db::DATABASE_CQL_CONNECTION_COMMIT = "DATABASE_CQL_CONNECTION_COMMIT" |
Definition at line 12 of file db_messages.h.
const isc::log::MessageID isc::db::DATABASE_CQL_CONNECTION_ROLLBACK = "DATABASE_CQL_CONNECTION_ROLLBACK" |
Definition at line 13 of file db_messages.h.
const isc::log::MessageID isc::db::DATABASE_CQL_DEALLOC_ERROR = "DATABASE_CQL_DEALLOC_ERROR" |
Definition at line 14 of file db_messages.h.
const isc::log::MessageID isc::db::DATABASE_INVALID_ACCESS = "DATABASE_INVALID_ACCESS" |
Definition at line 15 of file db_messages.h.
isc::log::Logger isc::db::database_logger |
Common database library logger.
Definition at line 46 of file db_log.h.
Referenced by isc::db::DatabaseConnection::toElement().
const isc::log::MessageID isc::db::DATABASE_MYSQL_COMMIT = "DATABASE_MYSQL_COMMIT" |
Definition at line 16 of file db_messages.h.
const isc::log::MessageID isc::db::DATABASE_MYSQL_FATAL_ERROR = "DATABASE_MYSQL_FATAL_ERROR" |
Definition at line 17 of file db_messages.h.
const isc::log::MessageID isc::db::DATABASE_MYSQL_ROLLBACK = "DATABASE_MYSQL_ROLLBACK" |
Definition at line 18 of file db_messages.h.
const isc::log::MessageID isc::db::DATABASE_MYSQL_START_TRANSACTION = "DATABASE_MYSQL_START_TRANSACTION" |
Definition at line 19 of file db_messages.h.
const isc::log::MessageID isc::db::DATABASE_PGSQL_COMMIT = "DATABASE_PGSQL_COMMIT" |
Definition at line 20 of file db_messages.h.
const isc::log::MessageID isc::db::DATABASE_PGSQL_DEALLOC_ERROR = "DATABASE_PGSQL_DEALLOC_ERROR" |
Definition at line 21 of file db_messages.h.
const isc::log::MessageID isc::db::DATABASE_PGSQL_FATAL_ERROR = "DATABASE_PGSQL_FATAL_ERROR" |
Definition at line 22 of file db_messages.h.
const isc::log::MessageID isc::db::DATABASE_PGSQL_ROLLBACK = "DATABASE_PGSQL_ROLLBACK" |
Definition at line 23 of file db_messages.h.
const isc::log::MessageID isc::db::DATABASE_PGSQL_START_TRANSACTION = "DATABASE_PGSQL_START_TRANSACTION" |
Definition at line 24 of file db_messages.h.
const isc::log::MessageID isc::db::DATABASE_TO_JSON_ERROR = "DATABASE_TO_JSON_ERROR" |
Definition at line 25 of file db_messages.h.
Referenced by isc::db::DatabaseConnection::toElement().
const int isc::db::DB_DBG_TRACE_DETAIL = isc::log::DBGLVL_TRACE_DETAIL |
Database logging levels.
Defines the levels used to output debug messages in the database support. Note that higher numbers equate to more verbose (and detailed) output. Additional information
Record detailed tracing. This is generally reserved for tracing access to the lease database.
Definition at line 21 of file db_log.cc.
Referenced by isc::db::CqlConnection::commit(), isc::db::PgSqlConnection::commit(), isc::db::MySqlConnection::commit(), isc::db::CqlConnection::rollback(), isc::db::PgSqlConnection::rollback(), isc::db::MySqlConnection::rollback(), isc::db::CqlConnection::startTransaction(), isc::db::PgSqlConnection::startTransaction(), and isc::db::MySqlConnection::startTransaction().
std::mutex isc::db::db_logger_mutex |
Global mutex to protect logger stack.
Definition at line 51 of file db_log.cc.
Referenced by isc::db::DB_LOG< debug >::DB_LOG().
DbLoggerStack isc::db::db_logger_stack = { db_logger_translator } |
db::DbLogger isc::db::db_logger_translator |
const db::DbLogger::MessageMap isc::db::db_message_map |
Map of translated messages.
DHCP server database message map.
const my_bool isc::db::MLM_FALSE = false |
MySQL false value.
Definition at line 36 of file mysql_constants.h.
Referenced by isc::dhcp::MySqlLease4Exchange::createBindForReceive(), isc::dhcp::MySqlLease6Exchange::createBindForReceive(), isc::dhcp::MySqlLease4Exchange::getLeaseData(), isc::dhcp::MySqlLease6Exchange::getLeaseData(), isc::dhcp::MySqlLease4Exchange::MySqlLease4Exchange(), isc::dhcp::MySqlLease6Exchange::MySqlLease6Exchange(), isc::db::MySqlConnection::openDatabase(), and isc::dhcp::MySqlLeaseExchange::setErrorIndicators().
const int isc::db::MLM_MYSQL_FETCH_FAILURE = 0 |
MySQL fetch failure code.
Definition at line 49 of file mysql_constants.h.
Referenced by isc::dhcp::MySqlHostDataSourceImpl::getHostCollection(), and isc::db::MySqlConnection::selectQuery().
const int isc::db::MLM_MYSQL_FETCH_SUCCESS = 0 |
check for bool size
MySQL fetch success code.
Definition at line 46 of file mysql_constants.h.
Referenced by isc::dhcp::MySqlHostDataSourceImpl::getHostCollection(), isc::dhcp::MySqlLeaseStatsQuery::getNextRow(), and isc::db::MySqlConnection::selectQuery().
const my_bool isc::db::MLM_TRUE = true |
MySQL true value.
Definition at line 39 of file mysql_constants.h.
Referenced by isc::db::MySqlBinding::amNull(), isc::dhcp::MySqlLease4Exchange::createBindForReceive(), isc::dhcp::MySqlLease6Exchange::createBindForReceive(), isc::dhcp::MySqlLease4Exchange::createBindForSend(), isc::dhcp::MySqlLease6Exchange::createBindForSend(), isc::dhcp::MySqlHostDataSource::del(), isc::dhcp::MySqlHostDataSource::del4(), isc::dhcp::MySqlHostDataSource::del6(), isc::dhcp::MySqlLeaseMgr::deleteLease(), isc::dhcp::MySqlHostDataSource::get4(), isc::dhcp::MySqlHostDataSource::get6(), isc::dhcp::MySqlHostDataSource::getAll(), isc::dhcp::MySqlHostDataSource::getAll4(), isc::dhcp::MySqlHostDataSource::getAll6(), isc::dhcp::MySqlHostDataSource::getAllbyHostname4(), isc::dhcp::MySqlHostDataSource::getAllbyHostname6(), isc::dhcp::MySqlLeaseExchange::getColumnsInError(), isc::dhcp::MySqlHostDataSourceImpl::getHost(), isc::dhcp::MySqlLeaseMgr::getLease4(), isc::dhcp::MySqlLeaseMgr::getLease6(), isc::dhcp::MySqlLease4Exchange::getLeaseData(), isc::dhcp::MySqlLeaseMgr::getLeases4(), isc::dhcp::MySqlLeaseMgr::getLeases6(), isc::dhcp::MySqlHostDataSource::getPage4(), isc::dhcp::MySqlHostDataSource::getPage6(), isc::dhcp::MySqlLeaseStatsQuery::start(), and isc::dhcp::MySqlLeaseMgr::updateLease4().
const int isc::db::MYSQL_DEFAULT_CONNECTION_TIMEOUT = 5 |
Definition at line 29 of file mysql_connection.cc.
Referenced by isc::db::MySqlConnection::openDatabase().
const uint32_t isc::db::MYSQL_SCHEMA_VERSION_MAJOR = 9 |
Definition at line 55 of file mysql_constants.h.
Referenced by isc::dhcp::MySqlLeaseMgr::getDBVersion(), isc::dhcp::MySqlHostDataSourceImpl::MySqlHostDataSourceImpl(), and isc::dhcp::MySqlLeaseMgr::MySqlLeaseMgr().
const uint32_t isc::db::MYSQL_SCHEMA_VERSION_MINOR = 6 |
Definition at line 56 of file mysql_constants.h.
Referenced by isc::dhcp::MySqlLeaseMgr::getDBVersion(), isc::dhcp::MySqlHostDataSourceImpl::MySqlHostDataSourceImpl(), and isc::dhcp::MySqlLeaseMgr::MySqlLeaseMgr().
const size_t isc::db::OID_BOOL = 16 |
Definition at line 59 of file pgsql_connection.h.
const size_t isc::db::OID_BYTEA = 17 |
Definition at line 60 of file pgsql_connection.h.
const size_t isc::db::OID_INT2 = 21 |
Definition at line 62 of file pgsql_connection.h.
const size_t isc::db::OID_INT4 = 23 |
Definition at line 63 of file pgsql_connection.h.
const size_t isc::db::OID_INT8 = 20 |
Definition at line 61 of file pgsql_connection.h.
const size_t isc::db::OID_NONE = 0 |
Constants for PostgreSQL data types These are defined by PostgreSQL in <catalog/pg_type.h>, but including this file is extraordinarily convoluted, so we'll use these to fill-in.
Definition at line 58 of file pgsql_connection.h.
const size_t isc::db::OID_TEXT = 25 |
Definition at line 64 of file pgsql_connection.h.
const size_t isc::db::OID_TIMESTAMP = 1114 |
Definition at line 66 of file pgsql_connection.h.
const size_t isc::db::OID_VARCHAR = 1043 |
Definition at line 65 of file pgsql_connection.h.
const uint32_t isc::db::PG_SCHEMA_VERSION_MAJOR = 6 |
Define PostgreSQL backend version: 6.2.
Definition at line 22 of file pgsql_connection.h.
Referenced by isc::dhcp::PgSqlLeaseMgr::getDBVersion(), isc::dhcp::PgSqlHostDataSourceImpl::PgSqlHostDataSourceImpl(), and isc::dhcp::PgSqlLeaseMgr::PgSqlLeaseMgr().
const uint32_t isc::db::PG_SCHEMA_VERSION_MINOR = 2 |
Definition at line 23 of file pgsql_connection.h.
Referenced by isc::dhcp::PgSqlLeaseMgr::getDBVersion(), isc::dhcp::PgSqlHostDataSourceImpl::PgSqlHostDataSourceImpl(), and isc::dhcp::PgSqlLeaseMgr::PgSqlLeaseMgr().
const int isc::db::PGSQL_DEFAULT_CONNECTION_TIMEOUT = 5 |
Definition at line 39 of file pgsql_connection.cc.
Referenced by isc::db::PgSqlConnection::openDatabase().
const size_t isc::db::PGSQL_MAX_PARAMETERS_IN_QUERY = 32 |
Definition at line 29 of file pgsql_connection.h.