return (value);
}
- /// @brief Converts a column in a row in a result set to a boolean.
+ /// @brief Fetches boolean text ('t' or 'f') as a bool.
///
/// @param r the result set containing the query results
/// @param row the row number within the result set
}
}
- /// @brief Converts a column in a row in a result set to a uint32_t.
+ /// @brief Fetches an integer text column as a uint32_t.
///
/// @param r the result set containing the query results
/// @param row the row number within the result set
}
}
- /// @brief Converts a column in a row in a result set to a int32_t.
+ /// @brief Fetches an integer text column as a int32_t.
///
/// @param r the result set containing the query results
/// @param row the row number within the result set
}
}
- /// @brief Converts a column in a row in a result set to a uint8_t.
+ /// @brief Fetches an integer text column as a uint8_t.
///
/// @param r the result set containing the query results
/// @param row the row number within the result set
}
}
- /// @brief Converts a column in a row in a result set to a Lease6::Type
+ /// @brief Fetches an integer text column as a Lease6::Type
///
/// @param r the result set containing the query results
/// @param row the row number within the result set
vector<uint8_t> duid_;
uint8_t duid_buffer_[DUID::MAX_DUID_LEN];
+ /// @brief Union for marshalling IAID into and out of the database
+ /// IAID is defined in the RFC as 4 octets, which Kea code handles as
+ /// a uint32_t. Postgresql however, offers only signed integer types
+ /// of sizes 2, 4, and 8 bytes (SMALLINT, INT, and BIGINT respectively).
+ /// IAID is used in several indexes so rather than use the BIGINT, we
+ /// use this union to safely move the value into and out of an INT column.
union Uiaid {
Uiaid(uint32_t val) : uval_(val){};
Uiaid(int32_t val) : ival_(val){};
/// @param show_err flag which governs whether or not stderr is suppressed.
void createMySQLSchema(bool show_err = false);
-/// @brief Run a MySQL SQL script against the Postgresql unit test database
+/// @brief Run a MySQL SQL script against the MySQL unit test database
///
/// Submits the given SQL script to MySQL via mysql CLI. The output of
/// stderr is suppressed unless the parameter, show_err is true. The is done