-implement missing select_serial_by_table_ statements

This commit is contained in:
Christian Grothoff 2022-10-10 08:49:47 +02:00
parent d0debc467e
commit 3a4515c029
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -77,6 +77,22 @@ TEH_PG_lookup_serial_by_table (void *cls,
" ORDER BY wire_target_serial_id DESC"
" LIMIT 1;");
break;
case TALER_EXCHANGEDB_RT_LEGITIMIZATION_PROCESSES:
XPREPARE ("select_serial_by_table_legitimization_processes",
"SELECT"
" legitimization_process_serial_id AS serial"
" FROM legitimization_processes"
" ORDER BY legitimization_process_serial_id DESC"
" LIMIT 1;");
break;
case TALER_EXCHANGEDB_RT_LEGITIMIZATION_REQUIREMENTS:
XPREPARE ("select_serial_by_table_legitimization_requiremetns",
"SELECT"
" legitimization_requirement_serial_id AS serial"
" FROM legitimization_requirements"
" ORDER BY legitimization_requirement_serial_id DESC"
" LIMIT 1;");
break;
case TALER_EXCHANGEDB_RT_RESERVES:
XPREPARE ("select_serial_by_table_reserves",
"SELECT"
@ -101,6 +117,30 @@ TEH_PG_lookup_serial_by_table (void *cls,
" ORDER BY close_uuid DESC"
" LIMIT 1;");
break;
case TALER_EXCHANGEDB_RT_RESERVES_OPEN_REQUESTS:
XPREPARE ("select_serial_by_table_reserves_open_requests",
"SELECT"
" open_request_uuid AS serial"
" FROM reserves_open_requests"
" ORDER BY open_request_uuid DESC"
" LIMIT 1;");
break;
case TALER_EXCHANGEDB_RT_RESERVES_OPEN_DEPOSITS:
XPREPARE ("select_serial_by_table_reserves_open_deposits",
"SELECT"
" open_request_uuid AS serial"
" FROM reserves_open_deposits"
" ORDER BY open_request_uuid DESC"
" LIMIT 1;");
break;
case TALER_EXCHANGEDB_RT_RESERVES_CLOSE_REQUESTS:
XPREPARE ("select_serial_by_table_reserves_close_requests",
"SELECT"
" close_request_uuid AS serial"
" FROM reserves_close_requests"
" ORDER BY close_request_uuid DESC"
" LIMIT 1;");
break;
case TALER_EXCHANGEDB_RT_RESERVES_OUT:
XPREPARE ("select_serial_by_table_reserves_out",
"SELECT"