skeleton logic for new auditordb functions

This commit is contained in:
Christian Grothoff 2022-11-02 12:25:42 +01:00
parent 821c87ccbd
commit 34f46382f0
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
19 changed files with 664 additions and 19 deletions

View File

@ -0,0 +1,34 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_delete_purse_info.c
* @brief Implementation of the delete_purse_info function for Postgres
* @author Christian Grothoff
*/
#include "platform.h"
#include "taler_error_codes.h"
#include "taler_dbevents.h"
#include "taler_pq_lib.h"
#include "pg_delete_purse_info.h"
#include "pg_helper.h"
enum GNUNET_DB_QueryStatus
TAH_PG_delete_purse_info (
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_MasterPublicKeyP *master_pub)
{
}

View File

@ -0,0 +1,44 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_delete_purse_info.h
* @brief implementation of the delete_purse_info function for Postgres
* @author Christian Grothoff
*/
#ifndef PG_DELETE_PURSE_INFO_H
#define PG_DELETE_PURSE_INFO_H
#include "taler_util.h"
#include "taler_json_lib.h"
#include "taler_auditordb_plugin.h"
/**
* Delete information about a purse.
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param purse_pub public key of the reserve
* @param master_pub master public key of the exchange
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
TAH_PG_delete_purse_info (
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_MasterPublicKeyP *master_pub);
#endif

View File

@ -0,0 +1,37 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_get_purse_info.c
* @brief Implementation of the get_purse_info function for Postgres
* @author Christian Grothoff
*/
#include "platform.h"
#include "taler_error_codes.h"
#include "taler_dbevents.h"
#include "taler_pq_lib.h"
#include "pg_get_purse_info.h"
#include "pg_helper.h"
enum GNUNET_DB_QueryStatus
TAH_PG_get_purse_info (
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_MasterPublicKeyP *master_pub,
uint64_t *rowid,
struct TALER_Amount *balance,
struct GNUNET_TIME_Timestamp *expiration_date)
{
}

View File

@ -0,0 +1,49 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_get_purse_info.h
* @brief implementation of the get_purse_info function for Postgres
* @author Christian Grothoff
*/
#ifndef PG_GET_PURSE_INFO_H
#define PG_GET_PURSE_INFO_H
#include "taler_util.h"
#include "taler_json_lib.h"
#include "taler_auditordb_plugin.h"
/**
* Get information about a purse.
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param purse_pub public key of the purse
* @param master_pub master public key of the exchange
* @param[out] rowid which row did we get the information from
* @param[out] balance set to balance of the purse
* @param[out] expiration_date expiration date of the purse
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
TAH_PG_get_purse_info (
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_MasterPublicKeyP *master_pub,
uint64_t *rowid,
struct TALER_Amount *balance,
struct GNUNET_TIME_Timestamp *expiration_date);
#endif

View File

@ -0,0 +1,33 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_get_purse_summary.c
* @brief Implementation of the get_purse_summary function for Postgres
* @author Christian Grothoff
*/
#include "platform.h"
#include "taler_error_codes.h"
#include "taler_dbevents.h"
#include "taler_pq_lib.h"
#include "pg_get_purse_summary.h"
#include "pg_helper.h"
enum GNUNET_DB_QueryStatus
TAH_PG_get_purse_summary (void *cls,
const struct TALER_MasterPublicKeyP *master_pub,
struct TALER_AUDITORDB_PurseBalance *sum)
{
}

View File

@ -0,0 +1,43 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_get_purse_summary.h
* @brief implementation of the get_purse_summary function for Postgres
* @author Christian Grothoff
*/
#ifndef PG_GET_PURSE_SUMMARY_H
#define PG_GET_PURSE_SUMMARY_H
#include "taler_util.h"
#include "taler_json_lib.h"
#include "taler_auditordb_plugin.h"
/**
* Get summary information about all purses.
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param master_pub master public key of the exchange
* @param[out] sum purse balances summary to initialize
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
TAH_PG_get_purse_summary (void *cls,
const struct TALER_MasterPublicKeyP *master_pub,
struct TALER_AUDITORDB_PurseBalance *sum);
#endif

View File

@ -0,0 +1,36 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_insert_purse_info.c
* @brief Implementation of the insert_purse_info function for Postgres
* @author Christian Grothoff
*/
#include "platform.h"
#include "taler_error_codes.h"
#include "taler_dbevents.h"
#include "taler_pq_lib.h"
#include "pg_insert_purse_info.h"
#include "pg_helper.h"
enum GNUNET_DB_QueryStatus
TAH_PG_insert_purse_info (
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_MasterPublicKeyP *master_pub,
const struct TALER_Amount *balance,
struct GNUNET_TIME_Timestamp expiration_date)
{
}

View File

@ -0,0 +1,47 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_insert_purse_info.h
* @brief implementation of the insert_purse_info function for Postgres
* @author Christian Grothoff
*/
#ifndef PG_INSERT_PURSE_INFO_H
#define PG_INSERT_PURSE_INFO_H
#include "taler_util.h"
#include "taler_json_lib.h"
#include "taler_auditordb_plugin.h"
/**
* Insert information about a purse. There must not be an
* existing record for the purse.
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param purse_pub public key of the purse
* @param master_pub master public key of the exchange
* @param balance balance of the purse
* @param expiration_date expiration date of the purse
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
TAH_PG_insert_purse_info (
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_MasterPublicKeyP *master_pub,
const struct TALER_Amount *balance,
struct GNUNET_TIME_Timestamp expiration_date);
#endif

View File

@ -0,0 +1,34 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_insert_purse_summary.c
* @brief Implementation of the insert_purse_summary function for Postgres
* @author Christian Grothoff
*/
#include "platform.h"
#include "taler_error_codes.h"
#include "taler_dbevents.h"
#include "taler_pq_lib.h"
#include "pg_insert_purse_summary.h"
#include "pg_helper.h"
enum GNUNET_DB_QueryStatus
TAH_PG_insert_purse_summary (
void *cls,
const struct TALER_MasterPublicKeyP *master_pub,
const struct TALER_AUDITORDB_PurseBalance *sum)
{
}

View File

@ -0,0 +1,45 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_insert_purse_summary.h
* @brief implementation of the insert_purse_summary function for Postgres
* @author Christian Grothoff
*/
#ifndef PG_INSERT_PURSE_SUMMARY_H
#define PG_INSERT_PURSE_SUMMARY_H
#include "taler_util.h"
#include "taler_json_lib.h"
#include "taler_auditordb_plugin.h"
/**
* Insert information about all purses. There must not be an
* existing record for the @a master_pub.
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param master_pub master public key of the exchange
* @param sum purse balance summary to store
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
TAH_PG_insert_purse_summary (
void *cls,
const struct TALER_MasterPublicKeyP *master_pub,
const struct TALER_AUDITORDB_PurseBalance *sum);
#endif

View File

@ -0,0 +1,35 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_select_purse_expired.c
* @brief Implementation of the select_purse_expired function for Postgres
* @author Christian Grothoff
*/
#include "platform.h"
#include "taler_error_codes.h"
#include "taler_dbevents.h"
#include "taler_pq_lib.h"
#include "pg_select_purse_expired.h"
#include "pg_helper.h"
enum GNUNET_DB_QueryStatus
TAH_PG_select_purse_expired (
void *cls,
const struct TALER_MasterPublicKeyP *master_pub,
TALER_AUDITORDB_ExpiredPurseCallback cb,
void *cb_cls)
{
}

View File

@ -0,0 +1,45 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_select_purse_expired.h
* @brief implementation of the select_purse_expired function for Postgres
* @author Christian Grothoff
*/
#ifndef PG_SELECT_PURSE_EXPIRED_H
#define PG_SELECT_PURSE_EXPIRED_H
#include "taler_util.h"
#include "taler_json_lib.h"
#include "taler_auditordb_plugin.h"
/**
* Get information about expired purses.
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param master_pub master public key of the exchange
* @param cb function to call on expired purses
* @param cb_cls closure for @a cb
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
TAH_PG_select_purse_expired (
void *cls,
const struct TALER_MasterPublicKeyP *master_pub,
TALER_AUDITORDB_ExpiredPurseCallback cb,
void *cb_cls);
#endif

View File

@ -10,12 +10,12 @@ do
then
cat pg_template.c | sed -e s/template/$n/g -e s/TEMPLATE/$NCAPS/g > pg_$n.c
cat pg_template.h | sed -e s/template/$n/g -e s/TEMPLATE/$NCAPS/g > pg_$n.h
echo " plugin->$n\n = &TEH_PG_$n;" >> tmpl.c
echo " plugin->$n\n = &TAH_PG_$n;" >> tmpl.c
echo "#include \"pg_$n.h\"" >> tmpl.inc
echo " pg_$n.h pg_$n.c \\" >> tmpl.am
fi
done
echo "Add lines from tmpl.am to Makefile.am"
echo "Add lines from tmpl.inc to plugin_exchangedb_postgres.c at the beginning"
echo "Add lines from tmpl.c to plugin_exchangedb_postgres.c at the end"
echo "Add lines from tmpl.inc to plugin_auditordb_postgres.c at the beginning"
echo "Add lines from tmpl.c to plugin_auditordb_postgres.c at the end"

View File

@ -0,0 +1,36 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_update_purse_info.c
* @brief Implementation of the update_purse_info function for Postgres
* @author Christian Grothoff
*/
#include "platform.h"
#include "taler_error_codes.h"
#include "taler_dbevents.h"
#include "taler_pq_lib.h"
#include "pg_update_purse_info.h"
#include "pg_helper.h"
enum GNUNET_DB_QueryStatus
TAH_PG_update_purse_info (
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_MasterPublicKeyP *master_pub,
const struct TALER_Amount *balance)
{
}

View File

@ -0,0 +1,47 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_update_purse_info.h
* @brief implementation of the update_purse_info function for Postgres
* @author Christian Grothoff
*/
#ifndef PG_UPDATE_PURSE_INFO_H
#define PG_UPDATE_PURSE_INFO_H
#include "taler_util.h"
#include "taler_json_lib.h"
#include "taler_auditordb_plugin.h"
/**
* Update information about a purse. Destructively updates an
* existing record, which must already exist.
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param purse_pub public key of the purse
* @param master_pub master public key of the exchange
* @param balance new balance for the purse
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
TAH_PG_update_purse_info (
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_MasterPublicKeyP *master_pub,
const struct TALER_Amount *balance);
#endif

View File

@ -0,0 +1,35 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_update_purse_summary.c
* @brief Implementation of the update_purse_summary function for Postgres
* @author Christian Grothoff
*/
#include "platform.h"
#include "taler_error_codes.h"
#include "taler_dbevents.h"
#include "taler_pq_lib.h"
#include "pg_update_purse_summary.h"
#include "pg_helper.h"
enum GNUNET_DB_QueryStatus
TAH_PG_update_purse_summary (
void *cls,
const struct TALER_MasterPublicKeyP *master_pub,
const struct TALER_AUDITORDB_PurseBalance *sum)
{
}

View File

@ -0,0 +1,45 @@
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file auditordb/pg_update_purse_summary.h
* @brief implementation of the update_purse_summary function for Postgres
* @author Christian Grothoff
*/
#ifndef PG_UPDATE_PURSE_SUMMARY_H
#define PG_UPDATE_PURSE_SUMMARY_H
#include "taler_util.h"
#include "taler_json_lib.h"
#include "taler_auditordb_plugin.h"
/**
* Update information about all purses. Destructively updates an
* existing record, which must already exist.
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param master_pub master public key of the exchange
* @param sum purse balances summary to store
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
TAH_PG_update_purse_summary (
void *cls,
const struct TALER_MasterPublicKeyP *master_pub,
const struct TALER_AUDITORDB_PurseBalance *sum);
#endif

View File

@ -517,23 +517,23 @@ libtaler_plugin_auditordb_postgres_init (void *cls)
plugin->insert_predicted_result
= &TAH_PG_insert_predicted_result;
plugin->get_purse_info
= &TEH_PG_get_purse_info;
= &TAH_PG_get_purse_info;
plugin->delete_purse_info
= &TEH_PG_delete_purse_info;
= &TAH_PG_delete_purse_info;
plugin->update_purse_info
= &TEH_PG_update_purse_info;
= &TAH_PG_update_purse_info;
plugin->insert_purse_info
= &TEH_PG_insert_purse_info;
= &TAH_PG_insert_purse_info;
plugin->get_purse_summary
= &TEH_PG_get_purse_summary;
= &TAH_PG_get_purse_summary;
plugin->select_purse_expired
= &TEH_PG_select_purse_expired;
= &TAH_PG_select_purse_expired;
plugin->insert_purse_summary
= &TEH_PG_insert_purse_summary;
= &TAH_PG_insert_purse_summary;
plugin->update_purse_summary
= &TEH_PG_update_purse_summary;
= &TAH_PG_update_purse_summary;
return plugin;
}

View File

@ -1381,14 +1381,14 @@ struct TALER_AUDITORDB_Plugin
/**
* Insert information about all purses. There must not be an
* existing record for the @a master_pub.
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param master_pub master public key of the exchange
* @param sum purse balance summary to store
* @return transaction status code
*/
* Insert information about all purses. There must not be an
* existing record for the @a master_pub.
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param master_pub master public key of the exchange
* @param sum purse balance summary to store
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
(*insert_purse_summary)(
void *cls,