2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[#2869] Checkpoint: added statements

This commit is contained in:
Francis Dupont
2023-05-24 10:17:05 +02:00
parent e87c11fe28
commit a4ea9faff5
4 changed files with 118 additions and 0 deletions

View File

@@ -477,6 +477,40 @@ tagged_statements = { {
"SELECT leases "
"FROM lease6_stat_by_client_class "
"WHERE client_class = ? AND lease_type = ?"},
{MySqlLeaseMgr::WIPE_RELAY_ID6,
"DELETE FROM lease6_relay_id"},
{MySqlLeaseMgr::WIPE_REMOTE_ID6,
"DELETE FROM lease6_remote_id"},
{MySqlLeaseMgr::DELETE_RELAY_ID6,
"DELETE FROM lease6_relay_id WHERE lease_addr = ?"},
{MySqlLeaseMgr::DELETE_REMOTE_ID6,
"DELETE FROM lease6_remote_id WHERE lease_addr = ?"},
{MySqlLeaseMgr::ADD_RELAY_ID6,
"INSERT INTO lease6_relay_id(relay_id, lease_addr) "
"VALUES (?, ?)"},
{MySqlLeaseMgr::ADD_REMOTE_ID6,
"INSERT INTO lease6_remote_id(remote_id, lease_addr) "
"VALUES (?, ?)"},
{MySqlLeaseMgr::GET_RELAY_ID6,
"SELECT lease_addr FROM lease6_relay_id "
"WHERE relay_id = ? AND lease_addr > ? "
"ORDER BY lease_addr "
"LIMIT ?"},
{MySqlLeaseMgr::GET_REMOTE_ID6,
"SELECT lease_addr FROM lease6_remote_id "
"WHERE remote_id = ? AND lease_addr > ? "
"ORDER BY lease_addr "
"LIMIT ?"},
{MySqlLeaseMgr::GET_RELAY_ID6_LINK,
"SELECT lease_addr FROM lease6_relay_id "
"WHERE relay_id = ? AND lease_addr BETWEEN ? AND ? "
"ORDER BY lease_addr "
"LIMIT ?"},
{MySqlLeaseMgr::GET_REMOTE_ID6_LINK,
"SELECT lease_addr FROM lease6_remote_id "
"WHERE remote_id = ? AND lease_addr BETWEEN ? AND ? "
"ORDER BY lease_addr "
"LIMIT ?"},
} }; // tagged_statements
} // namespace