summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/pgsql_connection.h
diff options
context:
space:
mode:
authorAndrei Pavel <andrei.pavel@qualitance.com>2017-08-17 20:04:29 +0200
committerAndrei Pavel <andrei.pavel@qualitance.com>2017-08-17 20:04:29 +0200
commit529d15326887b3513413567e497118b3db2c24f3 (patch)
tree8b66b262349433802bd52e920bb4783baac57cb3 /src/lib/dhcpsrv/pgsql_connection.h
parentAdded mysql_execute_script (diff)
parent[master] Added ChangeLog 1288 for trac 5315. (diff)
downloadkea-529d15326887b3513413567e497118b3db2c24f3.tar.xz
kea-529d15326887b3513413567e497118b3db2c24f3.zip
Merge branch 'isc-master' into minor-changes
Diffstat (limited to 'src/lib/dhcpsrv/pgsql_connection.h')
-rw-r--r--src/lib/dhcpsrv/pgsql_connection.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/lib/dhcpsrv/pgsql_connection.h b/src/lib/dhcpsrv/pgsql_connection.h
index 8e7fe884c8..35e1644d64 100644
--- a/src/lib/dhcpsrv/pgsql_connection.h
+++ b/src/lib/dhcpsrv/pgsql_connection.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2017 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
@@ -12,18 +12,22 @@
#include <boost/scoped_ptr.hpp>
#include <vector>
-
+#include <stdint.h>
namespace isc {
namespace dhcp {
+/// @brief Define PostgreSQL backend version: 3.0
+const uint32_t PG_SCHEMA_VERSION_MAJOR = 3;
+const uint32_t PG_SCHEMA_VERSION_MINOR = 1;
+
// Maximum number of parameters that can be used a statement
// @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;
-/// @brief Define a PostgreSQL statement
+/// @brief Define a PostgreSQL statement.
///
/// Each statement is associated with an index, which is used to reference the
/// associated prepared statement.
@@ -47,8 +51,9 @@ struct PgSqlTaggedStatement {
/// @{
/// @brief Constants for PostgreSQL data types
-/// This are defined by PostgreSQL in <catalog/pg_type.h>, but including
+/// 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.
+/// @{
const size_t OID_NONE = 0; // PostgreSQL infers proper type
const size_t OID_BOOL = 16;
const size_t OID_BYTEA = 17;
@@ -60,7 +65,7 @@ const size_t OID_VARCHAR = 1043;
const size_t OID_TIMESTAMP = 1114;
/// @}
-/// @brief RAII wrapper for Posgtresql Result sets
+/// @brief RAII wrapper for PostgreSQL Result sets
///
/// When a Postgresql statement is executed, the results are returned
/// in pointer allocated structure, PGresult*. Data and status information