mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-02 15:05:16 +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 ? "
|
"WHERE remote_id = ? AND lease_addr BETWEEN ? AND ? "
|
||||||
"ORDER BY lease_addr "
|
"ORDER BY lease_addr "
|
||||||
"LIMIT ?"},
|
"LIMIT ?"},
|
||||||
|
{MySqlLeaseMgr::COUNT_RELAY_ID6,
|
||||||
|
"SELECT COUNT(*) FROM lease6_relay_id"},
|
||||||
|
{MySqlLeaseMgr::COUNT_REMOTE_ID6,
|
||||||
|
"SELECT COUNT(*) FROM lease6_remote_id"},
|
||||||
} }; // tagged_statements
|
} }; // tagged_statements
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@@ -778,6 +778,8 @@ public:
|
|||||||
GET_REMOTE_ID6, // Get lease6_remote_id entries
|
GET_REMOTE_ID6, // Get lease6_remote_id entries
|
||||||
GET_RELAY_ID6_LINK, // Get lease6_relay_id entries by link
|
GET_RELAY_ID6_LINK, // Get lease6_relay_id entries by link
|
||||||
GET_REMOTE_ID6_LINK, // Get lease6_remote_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
|
NUM_STATEMENTS // Number of statements
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -618,6 +618,16 @@ PgSqlTaggedStatement tagged_statements[] = {
|
|||||||
"ORDER BY lease_addr "
|
"ORDER BY lease_addr "
|
||||||
"LIMIT $4"},
|
"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
|
// End of list sentinel
|
||||||
{ 0, { 0 }, NULL, NULL }
|
{ 0, { 0 }, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
@@ -754,6 +754,8 @@ public:
|
|||||||
GET_REMOTE_ID6, // Get lease6_remote_id entries
|
GET_REMOTE_ID6, // Get lease6_remote_id entries
|
||||||
GET_RELAY_ID6_LINK, // Get lease6_relay_id entries by link
|
GET_RELAY_ID6_LINK, // Get lease6_relay_id entries by link
|
||||||
GET_REMOTE_ID6_LINK, // Get lease6_remote_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
|
NUM_STATEMENTS // Number of statements
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user