Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kea-hackathon
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
kea-hackathon
Commits
64cb34ec
Commit
64cb34ec
authored
Oct 07, 2018
by
Marcin Siodelski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[#93,!56] Addressed review comments.
parent
52dad7c3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
mysql_cb_dhcp4.cc
src/hooks/dhcp/mysql_cb/mysql_cb_dhcp4.cc
+11
-5
stamped_element.h
src/lib/cc/stamped_element.h
+7
-0
constants.h
src/lib/config_backend/constants.h
+3
-0
No files found.
src/hooks/dhcp/mysql_cb/mysql_cb_dhcp4.cc
View file @
64cb34ec
...
...
@@ -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,"
...
...
src/lib/cc/stamped_element.h
View file @
64cb34ec
...
...
@@ -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
:
...
...
src/lib/config_backend/constants.h
View file @
64cb34ec
...
...
@@ -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
;
//*}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment