mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 05:55:28 +00:00
[#2869] Added count statements
This commit is contained in:
@@ -511,6 +511,10 @@ tagged_statements = { {
|
||||
"WHERE remote_id = ? AND lease_addr BETWEEN ? AND ? "
|
||||
"ORDER BY lease_addr "
|
||||
"LIMIT ?"},
|
||||
{MySqlLeaseMgr::COUNT_RELAY_ID6,
|
||||
"SELECT COUNT(*) FROM lease6_relay_id"},
|
||||
{MySqlLeaseMgr::COUNT_REMOTE_ID6,
|
||||
"SELECT COUNT(*) FROM lease6_remote_id"},
|
||||
} }; // tagged_statements
|
||||
|
||||
} // namespace
|
||||
|
@@ -778,6 +778,8 @@ public:
|
||||
GET_REMOTE_ID6, // Get lease6_remote_id entries
|
||||
GET_RELAY_ID6_LINK, // Get lease6_relay_id entries by link
|
||||
GET_REMOTE_ID6_LINK, // Get lease6_remote_id entries by link
|
||||
COUNT_RELAY_ID6, // Count the lease6_relay_id number of entries
|
||||
COUNT_REMOTE_ID6, // Count the lease6_remote_id number of entries
|
||||
NUM_STATEMENTS // Number of statements
|
||||
};
|
||||
|
||||
|
@@ -618,6 +618,16 @@ PgSqlTaggedStatement tagged_statements[] = {
|
||||
"ORDER BY lease_addr "
|
||||
"LIMIT $4"},
|
||||
|
||||
// COUNT_RELAY_ID6
|
||||
{ 0, { OID_NONE },
|
||||
"count_relay_id6",
|
||||
"SELECT COUNT(*) FROM lease6_relay_id"},
|
||||
|
||||
// COUNT_REMOTE_ID6
|
||||
{ 0, { OID_NONE },
|
||||
"count_remote_id6",
|
||||
"SELECT COUNT(*) FROM lease6_remote_id"},
|
||||
|
||||
// End of list sentinel
|
||||
{ 0, { 0 }, NULL, NULL }
|
||||
};
|
||||
|
@@ -754,6 +754,8 @@ public:
|
||||
GET_REMOTE_ID6, // Get lease6_remote_id entries
|
||||
GET_RELAY_ID6_LINK, // Get lease6_relay_id entries by link
|
||||
GET_REMOTE_ID6_LINK, // Get lease6_remote_id entries by link
|
||||
COUNT_RELAY_ID6, // Count the lease6_relay_id number of entries
|
||||
COUNT_REMOTE_ID6, // Count the lease6_remote_id number of entries
|
||||
NUM_STATEMENTS // Number of statements
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user