Commit 64cb34ec authored by Marcin Siodelski's avatar Marcin Siodelski

[#93,!56] Addressed review comments.

parent 52dad7c3
......@@ -121,11 +121,17 @@ public:
void getGlobalParameters4(const StatementIndex& index,
const MySqlBindingCollection& in_bindings,
StampedValueCollection& parameters) {
// The following parameters from the dhcp4_global_parameter table are
// returned:
// - id
// - name - parameter name
// - value - parameter value
// - modification_ts - modification timestamp.
MySqlBindingCollection out_bindings = {
MySqlBinding::createInteger<uint64_t>(),
MySqlBinding::createString(128),
MySqlBinding::createString(65536),
MySqlBinding::createTimestamp()
MySqlBinding::createInteger<uint64_t>(), // id
MySqlBinding::createString(GLOBAL_PARAMETER_NAME_BUF_LENGTH), // name
MySqlBinding::createString(GLOBAL_PARAMETER_VALUE_BUF_LENGTH), // value
MySqlBinding::createTimestamp() // modification_ts
};
conn_.selectQuery(index, in_bindings, out_bindings,
......@@ -1974,7 +1980,7 @@ TaggedStatementArray tagged_statements = { {
},
// Retrieves all global options.
{ MySqlConfigBackendDHCPv4Impl::GET_ALL_OPTIONS4,
{ MySqlConfigBackendDHCPv4Impl::GET_ALL_OPTIONS4,
"SELECT"
" option_id,"
" code,"
......
......@@ -21,6 +21,13 @@ namespace data {
/// which stores configuration in the database and must be able
/// to recognize recently modified objects to fetch incremental
/// changes.
///
/// @note This class is not derived from @c Element and should not
/// be confused with the classes being derived from @c Element class.
/// Those classes are used to represent JSON structures, whereas this
/// class represents data fetched from the database.
///
/// @todo Find a better name for @c StamepedElement.
class StampedElement {
public:
......
......@@ -52,6 +52,9 @@ constexpr unsigned long OPTION_ENCAPSULATE_BUF_LENGTH = 128;
constexpr unsigned long OPTION_RECORD_TYPES_BUF_LENGTH = 512;
constexpr unsigned long GLOBAL_PARAMETER_NAME_BUF_LENGTH = 128;
constexpr unsigned long GLOBAL_PARAMETER_VALUE_BUF_LENGTH = 65536;
//*}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment