ConstHostPtr
MySqlHostDataSource::get4(const SubnetID& subnet_id,
const asiolink::IOAddress& address) const {
+ /// @todo: check that address is really v4, not v6.
// Set up the WHERE clause value
MYSQL_BIND inbind[2];
ConstHostPtr
MySqlHostDataSource::get6(const asiolink::IOAddress& prefix,
const uint8_t prefix_len) const {
+ /// @todo: Check that prefix is v6 address, not v4.
// Set up the WHERE clause value
MYSQL_BIND inbind[2];
ConstHostPtr
PgSqlHostDataSource::get6(const asiolink::IOAddress& prefix,
const uint8_t prefix_len) const {
+ /// @todo: Check that prefix is v6 address, not v4.
+
// Set up the WHERE clause value
PsqlBindArrayPtr bind_array(new PsqlBindArray());
/// the PostgreSQL database. Use of this backend presupposes that a PostgreSQL
/// 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
/// as well as in host_identifier_table:
///
ASSERT_THROW(PgSqlExchange::convertFromBytea(*r, row, BYTEA_COL,
fetched_bytes,
sizeof(fetched_bytes),
- byte_count),
- DbOperationError);
+ byte_count), DbOperationError);
// Verify that too small of a buffer throws
ASSERT_THROW(PgSqlExchange::convertFromBytea(*r, 0, BYTEA_COL,
fetched_bytes,
sizeof(fetched_bytes) - 1,
- byte_count),
- DbOperationError);
+ byte_count), DbOperationError);
// Clean out the table
WIPE_ROWS(r);
// While we here, verify that bad row throws
ASSERT_THROW(PgSqlExchange::getColumnValue(*r, row, BIGINT_COL,
- fetched_int),
- DbOperationError);
+ fetched_int), DbOperationError);
// Clean out the table
WIPE_ROWS(r);
// While we here, verify that bad row throws
ASSERT_THROW(PgSqlExchange::getColumnValue(*r, row, VARCHAR_COL,
- fetched_str),
- DbOperationError);
+ fetched_str), DbOperationError);
// Clean out the table
WIPE_ROWS(r);
// While we here, verify that bad row throws
ASSERT_THROW(PgSqlExchange::getColumnValue(*r, row, TIMESTAMP_COL,
- fetched_str),
- DbOperationError);
+ fetched_str), DbOperationError);
// Clean out the table
WIPE_ROWS(r);
// Verify exceeding max time throws
ASSERT_THROW(PgSqlExchange::convertToDatabaseTime(times[0],
DatabaseConnection::
- MAX_DB_TIME),
- BadValue);
+ MAX_DB_TIME), BadValue);
}
}; // namespace