mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-03 15:35:17 +00:00
[4277] Added several @todos and fixed formatting.
This commit is contained in:
@@ -2321,6 +2321,7 @@ MySqlHostDataSource::get4(const SubnetID& subnet_id,
|
|||||||
ConstHostPtr
|
ConstHostPtr
|
||||||
MySqlHostDataSource::get4(const SubnetID& subnet_id,
|
MySqlHostDataSource::get4(const SubnetID& subnet_id,
|
||||||
const asiolink::IOAddress& address) const {
|
const asiolink::IOAddress& address) const {
|
||||||
|
/// @todo: check that address is really v4, not v6.
|
||||||
|
|
||||||
// Set up the WHERE clause value
|
// Set up the WHERE clause value
|
||||||
MYSQL_BIND inbind[2];
|
MYSQL_BIND inbind[2];
|
||||||
@@ -2387,6 +2388,7 @@ MySqlHostDataSource::get6(const SubnetID& subnet_id,
|
|||||||
ConstHostPtr
|
ConstHostPtr
|
||||||
MySqlHostDataSource::get6(const asiolink::IOAddress& prefix,
|
MySqlHostDataSource::get6(const asiolink::IOAddress& prefix,
|
||||||
const uint8_t prefix_len) const {
|
const uint8_t prefix_len) const {
|
||||||
|
/// @todo: Check that prefix is v6 address, not v4.
|
||||||
|
|
||||||
// Set up the WHERE clause value
|
// Set up the WHERE clause value
|
||||||
MYSQL_BIND inbind[2];
|
MYSQL_BIND inbind[2];
|
||||||
|
@@ -1848,6 +1848,8 @@ PgSqlHostDataSource::get6(const SubnetID& subnet_id,
|
|||||||
ConstHostPtr
|
ConstHostPtr
|
||||||
PgSqlHostDataSource::get6(const asiolink::IOAddress& prefix,
|
PgSqlHostDataSource::get6(const asiolink::IOAddress& prefix,
|
||||||
const uint8_t prefix_len) const {
|
const uint8_t prefix_len) const {
|
||||||
|
/// @todo: Check that prefix is v6 address, not v4.
|
||||||
|
|
||||||
// Set up the WHERE clause value
|
// Set up the WHERE clause value
|
||||||
PsqlBindArrayPtr bind_array(new PsqlBindArray());
|
PsqlBindArrayPtr bind_array(new PsqlBindArray());
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@ class PgSqlHostDataSourceImpl;
|
|||||||
/// the PostgreSQL database. Use of this backend presupposes that a PostgreSQL
|
/// the PostgreSQL database. Use of this backend presupposes that a PostgreSQL
|
||||||
/// database is available and that the Kea schema has been created within it.
|
/// database is available and that the Kea schema has been created within it.
|
||||||
///
|
///
|
||||||
/// Reservations are uniquely identified by identifier type and value. Currently
|
/// Reservations are uniquely identified by identifier type and value.
|
||||||
/// The currently supported values are defined in @ref Host::IdentifierType
|
/// The currently supported values are defined in @ref Host::IdentifierType
|
||||||
/// as well as in host_identifier_table:
|
/// as well as in host_identifier_table:
|
||||||
///
|
///
|
||||||
|
@@ -489,15 +489,13 @@ TEST_F(PgSqlBasicsTest, byteaTest) {
|
|||||||
ASSERT_THROW(PgSqlExchange::convertFromBytea(*r, row, BYTEA_COL,
|
ASSERT_THROW(PgSqlExchange::convertFromBytea(*r, row, BYTEA_COL,
|
||||||
fetched_bytes,
|
fetched_bytes,
|
||||||
sizeof(fetched_bytes),
|
sizeof(fetched_bytes),
|
||||||
byte_count),
|
byte_count), DbOperationError);
|
||||||
DbOperationError);
|
|
||||||
|
|
||||||
// Verify that too small of a buffer throws
|
// Verify that too small of a buffer throws
|
||||||
ASSERT_THROW(PgSqlExchange::convertFromBytea(*r, 0, BYTEA_COL,
|
ASSERT_THROW(PgSqlExchange::convertFromBytea(*r, 0, BYTEA_COL,
|
||||||
fetched_bytes,
|
fetched_bytes,
|
||||||
sizeof(fetched_bytes) - 1,
|
sizeof(fetched_bytes) - 1,
|
||||||
byte_count),
|
byte_count), DbOperationError);
|
||||||
DbOperationError);
|
|
||||||
|
|
||||||
// Clean out the table
|
// Clean out the table
|
||||||
WIPE_ROWS(r);
|
WIPE_ROWS(r);
|
||||||
@@ -567,8 +565,7 @@ TEST_F(PgSqlBasicsTest, bigIntTest) {
|
|||||||
|
|
||||||
// While we here, verify that bad row throws
|
// While we here, verify that bad row throws
|
||||||
ASSERT_THROW(PgSqlExchange::getColumnValue(*r, row, BIGINT_COL,
|
ASSERT_THROW(PgSqlExchange::getColumnValue(*r, row, BIGINT_COL,
|
||||||
fetched_int),
|
fetched_int), DbOperationError);
|
||||||
DbOperationError);
|
|
||||||
|
|
||||||
// Clean out the table
|
// Clean out the table
|
||||||
WIPE_ROWS(r);
|
WIPE_ROWS(r);
|
||||||
@@ -817,8 +814,7 @@ TEST_F(PgSqlBasicsTest, varcharTest) {
|
|||||||
|
|
||||||
// While we here, verify that bad row throws
|
// While we here, verify that bad row throws
|
||||||
ASSERT_THROW(PgSqlExchange::getColumnValue(*r, row, VARCHAR_COL,
|
ASSERT_THROW(PgSqlExchange::getColumnValue(*r, row, VARCHAR_COL,
|
||||||
fetched_str),
|
fetched_str), DbOperationError);
|
||||||
DbOperationError);
|
|
||||||
|
|
||||||
// Clean out the table
|
// Clean out the table
|
||||||
WIPE_ROWS(r);
|
WIPE_ROWS(r);
|
||||||
@@ -902,8 +898,7 @@ TEST_F(PgSqlBasicsTest, timeStampTest) {
|
|||||||
|
|
||||||
// While we here, verify that bad row throws
|
// While we here, verify that bad row throws
|
||||||
ASSERT_THROW(PgSqlExchange::getColumnValue(*r, row, TIMESTAMP_COL,
|
ASSERT_THROW(PgSqlExchange::getColumnValue(*r, row, TIMESTAMP_COL,
|
||||||
fetched_str),
|
fetched_str), DbOperationError);
|
||||||
DbOperationError);
|
|
||||||
|
|
||||||
// Clean out the table
|
// Clean out the table
|
||||||
WIPE_ROWS(r);
|
WIPE_ROWS(r);
|
||||||
@@ -922,8 +917,7 @@ TEST_F(PgSqlBasicsTest, timeStampTest) {
|
|||||||
// Verify exceeding max time throws
|
// Verify exceeding max time throws
|
||||||
ASSERT_THROW(PgSqlExchange::convertToDatabaseTime(times[0],
|
ASSERT_THROW(PgSqlExchange::convertToDatabaseTime(times[0],
|
||||||
DatabaseConnection::
|
DatabaseConnection::
|
||||||
MAX_DB_TIME),
|
MAX_DB_TIME), BadValue);
|
||||||
BadValue);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}; // namespace
|
}; // namespace
|
||||||
|
Reference in New Issue
Block a user