From f0db6d55d72d7985e5a8b1e5c4a874a415a1234f Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Sun, 30 Jul 2023 00:44:38 +0200 Subject: [pq] use GNUNET_PQ_get_oid_by_name consistently --- src/include/taler_pq_lib.h | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) (limited to 'src/include/taler_pq_lib.h') diff --git a/src/include/taler_pq_lib.h b/src/include/taler_pq_lib.h index fddfd2a29..4b2a1f5dd 100644 --- a/src/include/taler_pq_lib.h +++ b/src/include/taler_pq_lib.h @@ -30,31 +30,6 @@ #include #include "taler_util.h" -/** - * Enumerates the composite types that Taler defines in Postgres. - * The corresponding OIDs (which are assigned by postgres at time of - * declaration) are stored in TALER_PQ_CompositeOIDs. - */ -enum TALER_PQ_CompositeType -{ - TALER_PQ_CompositeAmount, - TALER_PQ_CompositeMAX /* MUST be last */ -}; - -/** - * The correspondence of the Composite types and their OID in Postgres - */ -extern Oid TALER_PQ_CompositeOIDs[TALER_PQ_CompositeMAX]; - -/** - * Initialize the list of OIDs in TALER_PQ_CompositeOIDs. MUST be called - * before any composite type is used in arrays-specs/-params. - * - * @return GNUNET_SYSERR on failure - */ -enum GNUNET_GenericReturnValue -TALER_PQ_load_oids_for_composite_types (struct GNUNET_PQ_Context *db); - /** * Generate query parameter for a currency, consisting of the three * components "value", "fraction" and "currency" in this order. The @@ -177,7 +152,7 @@ struct GNUNET_PQ_QueryParam TALER_PQ_query_param_array_blinded_denom_sig ( size_t num, const struct TALER_BlindedDenominationSignature *denom_sigs, - const struct GNUNET_PQ_Context *db + struct GNUNET_PQ_Context *db ); /** @@ -191,7 +166,7 @@ struct GNUNET_PQ_QueryParam TALER_PQ_query_param_array_blinded_coin_hash ( size_t num, const struct TALER_BlindedCoinHashP *coin_evs, - const struct GNUNET_PQ_Context *db); + struct GNUNET_PQ_Context *db); /** * Generate query parameter for an array of mounts @@ -332,7 +307,7 @@ TALER_PQ_result_spec_json (const char *name, */ struct GNUNET_PQ_ResultSpec TALER_PQ_result_spec_array_blinded_denom_sig ( - const struct GNUNET_PQ_Context *db, + struct GNUNET_PQ_Context *db, const char *name, size_t *num, struct TALER_BlindedDenominationSignature **denom_sigs); @@ -348,7 +323,7 @@ TALER_PQ_result_spec_array_blinded_denom_sig ( */ struct GNUNET_PQ_ResultSpec TALER_PQ_result_spec_array_blinded_coin_hash ( - const struct GNUNET_PQ_Context *db, + struct GNUNET_PQ_Context *db, const char *name, size_t *num, struct TALER_BlindedCoinHashP **h_coin_evs); @@ -364,7 +339,7 @@ TALER_PQ_result_spec_array_blinded_coin_hash ( */ struct GNUNET_PQ_ResultSpec TALER_PQ_result_spec_array_denom_hash ( - const struct GNUNET_PQ_Context *db, + struct GNUNET_PQ_Context *db, const char *name, size_t *num, struct TALER_DenominationHashP **denom_hs); @@ -381,7 +356,7 @@ TALER_PQ_result_spec_array_denom_hash ( */ struct GNUNET_PQ_ResultSpec TALER_PQ_result_spec_array_amount ( - struct GNUNET_PQ_Context *db, /* not const because we need to query dynamically */ + struct GNUNET_PQ_Context *db, const char *name, const char *currency, size_t *num, -- cgit v1.2.3