diff options
author | Thomas Markwalder <tmark@isc.org> | 2022-01-11 16:44:41 +0100 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2022-01-18 18:04:10 +0100 |
commit | 4d1ade7ea3dce83e090610acb03b63e8517295bf (patch) | |
tree | 54eb676528f9f7e04d4092ac308e3d7aec7f8f2c /src/lib/pgsql/pgsql_connection.h | |
parent | [#2254] fixed compilation warnings (diff) | |
download | kea-4d1ade7ea3dce83e090610acb03b63e8517295bf.tar.xz kea-4d1ade7ea3dce83e090610acb03b63e8517295bf.zip |
[#95] All Queries - CRUD for servers
src/hooks/dhcp/pgsql_cb/Makefile.am
New files:
pgsql_query_macros.h pgsql_cb_dhcp4.cc pgsql_cb_dhcp4.h
src/hooks/dhcp/pgsql_cb/pgsql_cb_dhcp4.*
Initial implementation - includes CRUD for servers
src/hooks/dhcp/pgsql_cb/pgsql_cb_impl.*
PgSqlConfigBackendImpl::getStatement()
PgSqlConfigBackendImpl::selectQuery()
PgSqlConfigBackendImpl::insertQuery()
PgSqlConfigBackendImpl::updateDeleteQuery()
PgSqlConfigBackendImpl::createAuditRevision()
PgSqlConfigBackendImpl::getRecentAuditEntries()
PgSqlConfigBackendImpl::deleteFromTable()
PgSqlConfigBackendImpl::getLastInsertId()
PgSqlConfigBackendImpl::createInputRelayBinding()
PgSqlConfigBackendImpl::createOptionValueBinding()
PgSqlConfigBackendImpl::getServer()
PgSqlConfigBackendImpl::getServers()
PgSqlConfigBackendImpl::createUpdateServer()
PgSqlConfigBackendImpl::attachElementToServers()
PgSqlConfigBackendImpl::addRelayBinding()
PgSqlConfigBackendImpl::addOptionValueBinding()
PgSqlConfigBackendImpl::addRequiredClassesBinding()
PgSqlConfigBackendImpl::addOptionValueBinding()
src/hooks/dhcp/pgsql_cb/pgsql_cb_messages.mes
New messages
src/hooks/dhcp/pgsql_cb/tests/Makefile.am
New file:pgsql_cb_dhcp4_unittest.cc
src/hooks/dhcp/pgsql_cb/tests/pgsql_cb_dhcp4_unittest.cc
New file
src/lib/config_backend/base_config_backend.h
src/lib/config_backend/tests/config_backend_mgr_unittest.cc
src/lib/database/backend_selector.h
src/lib/database/backend_selector.cc
src/lib/database/tests/backend_selector_unittest.cc
"pgsql" -> "postgresql"
BackendSelector::Type::PGSQL -> BackendSelector::Type::POSTGRESQL
src/lib/pgsql/pgsql_connection.cc
Added NULL_KEY
PgSqlConnection::checkStatementError() - throws DuplicateEntry and NullKeyError
src/lib/pgsql/pgsql_connection.h
Added NULL_KEY
Upped PGSQL_MAX_PARAMETERS_IN_QUERY to 128;
src/lib/pgsql/pgsql_exchange.*
PsqlBindArray::popBack() - new function
Cleaned up AddOptional functions
PsqlBindArray::add(const ConstElementPtr& value) - new
Diffstat (limited to 'src/lib/pgsql/pgsql_connection.h')
-rw-r--r-- | src/lib/pgsql/pgsql_connection.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/pgsql/pgsql_connection.h b/src/lib/pgsql/pgsql_connection.h index 1de441f87c..2de244e73d 100644 --- a/src/lib/pgsql/pgsql_connection.h +++ b/src/lib/pgsql/pgsql_connection.h @@ -1,4 +1,4 @@ -// Copyright (C) 2016-2021 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2016-2022 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 @@ -25,7 +25,7 @@ const uint32_t PGSQL_SCHEMA_VERSION_MINOR = 0; // @todo This allows us to use an initializer list (since we can't // require C++11). It's unlikely we'd go past this many a single // statement. -const size_t PGSQL_MAX_PARAMETERS_IN_QUERY = 32; +const size_t PGSQL_MAX_PARAMETERS_IN_QUERY = 128; /// @brief Define a PostgreSQL statement. /// @@ -199,6 +199,8 @@ class PgSqlConnection : public db::DatabaseConnection { public: /// @brief Define the PgSql error state for a duplicate key error. static const char DUPLICATE_KEY[]; + /// @brief Define the PgSql error state for a null foreign key error. + static const char NULL_KEY[]; /// @brief Function invoked to process fetched row. typedef std::function<void(PgSqlResult&, int)> ConsumeResultRowFun; |