aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_lookup_serial_by_table.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-04-15 23:43:20 +0200
committerChristian Grothoff <christian@grothoff.org>2023-04-15 23:43:20 +0200
commit136d2b2e70852628c18245e85fd9c6821f810557 (patch)
treea6e0ca6a0e5efabf2ad12142626d2d59e1d3c889 /src/exchangedb/pg_lookup_serial_by_table.c
parent376de032b514b9f85f9b6ec3a8616aa418a2a413 (diff)
downloadexchange-136d2b2e70852628c18245e85fd9c6821f810557.tar.xz
implement more of lookup_records_by_table
Diffstat (limited to 'src/exchangedb/pg_lookup_serial_by_table.c')
-rw-r--r--src/exchangedb/pg_lookup_serial_by_table.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/exchangedb/pg_lookup_serial_by_table.c b/src/exchangedb/pg_lookup_serial_by_table.c
index 7e150cd28..d2554af2e 100644
--- a/src/exchangedb/pg_lookup_serial_by_table.c
+++ b/src/exchangedb/pg_lookup_serial_by_table.c
@@ -390,6 +390,60 @@ TEH_PG_lookup_serial_by_table (void *cls,
" LIMIT 1;");
statement = "select_serial_by_table_profit_drains";
break;
+ case TALER_EXCHANGEDB_RT_AML_STAFF:
+ XPREPARE ("select_serial_by_table_aml_staff",
+ "SELECT"
+ " aml_staff_uuid AS serial"
+ " FROM aml_staff"
+ " ORDER BY aml_staff_uuid DESC"
+ " LIMIT 1;");
+ statement = "select_serial_by_table_aml_staff";
+ break;
+ case TALER_EXCHANGEDB_RT_AML_HISTORY:
+ XPREPARE ("select_serial_by_table_aml_history",
+ "SELECT"
+ " aml_history_serial_id AS serial"
+ " FROM aml_history"
+ " ORDER BY aml_history_serial_id DESC"
+ " LIMIT 1;");
+ statement = "select_serial_by_table_aml_history";
+ break;
+ case TALER_EXCHANGEDB_RT_KYC_ATTRIBUTES:
+ XPREPARE ("select_serial_by_table_kyc_attributes",
+ "SELECT"
+ " kyc_attributes_serial_id AS serial"
+ " FROM kyc_attributes"
+ " ORDER BY kyc_attributes_serial_id DESC"
+ " LIMIT 1;");
+ statement = "select_serial_by_table_kyc_attributes";
+ break;
+ case TALER_EXCHANGEDB_RT_PURSE_DELETION:
+ XPREPARE ("select_serial_by_table_purse_deletion",
+ "SELECT"
+ " purse_deletion_serial_id AS serial"
+ " FROM purse_deletion"
+ " ORDER BY purse_deletion_serial_id DESC"
+ " LIMIT 1;");
+ statement = "select_serial_by_table_purse_deletion";
+ break;
+ case TALER_EXCHANGEDB_RT_WITHDRAW_AGE_COMMITMENTS:
+ XPREPARE ("select_serial_by_table_withdraw_age_commitments",
+ "SELECT"
+ " withdraw_age_commitment_id AS serial"
+ " FROM withdraw_age_commitments"
+ " ORDER BY withdraw_age_commitment_id DESC"
+ " LIMIT 1;");
+ statement = "select_serial_by_table_withdraw_age_commitments";
+ break;
+ case TALER_EXCHANGEDB_RT_WITHDRAW_AGE_REVEALS:
+ XPREPARE ("select_serial_by_table_withdraw_age_reveals",
+ "SELECT"
+ " withdraw_age_reveals_id AS serial"
+ " FROM withdraw_age_reveals"
+ " ORDER BY withdraw_age_reveals_id DESC"
+ " LIMIT 1;");
+ statement = "select_serial_by_table_withdraw_age_reveals";
+ break;
}
if (NULL == statement)
{