diff options
Diffstat (limited to 'src/exchangedb/pg_insert_global_fee.c')
-rw-r--r-- | src/exchangedb/pg_insert_global_fee.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/exchangedb/pg_insert_global_fee.c b/src/exchangedb/pg_insert_global_fee.c index c08fc23bb..e78cd0b83 100644 --- a/src/exchangedb/pg_insert_global_fee.c +++ b/src/exchangedb/pg_insert_global_fee.c @@ -28,21 +28,24 @@ enum GNUNET_DB_QueryStatus TEH_PG_insert_global_fee (void *cls, - struct GNUNET_TIME_Timestamp start_date, - struct GNUNET_TIME_Timestamp end_date, - const struct TALER_GlobalFeeSet *fees, - struct GNUNET_TIME_Relative purse_timeout, - struct GNUNET_TIME_Relative history_expiration, - uint32_t purse_account_limit, - const struct TALER_MasterSignatureP *master_sig) + struct GNUNET_TIME_Timestamp start_date, + struct GNUNET_TIME_Timestamp end_date, + const struct TALER_GlobalFeeSet *fees, + struct GNUNET_TIME_Relative purse_timeout, + struct GNUNET_TIME_Relative history_expiration, + uint32_t purse_account_limit, + const struct TALER_MasterSignatureP *master_sig) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_timestamp (&start_date), GNUNET_PQ_query_param_timestamp (&end_date), - TALER_PQ_query_param_amount (&fees->history), - TALER_PQ_query_param_amount (&fees->account), - TALER_PQ_query_param_amount (&fees->purse), + TALER_PQ_query_param_amount (pg->conn, + &fees->history), + TALER_PQ_query_param_amount (pg->conn, + &fees->account), + TALER_PQ_query_param_amount (pg->conn, + &fees->purse), GNUNET_PQ_query_param_relative_time (&purse_timeout), GNUNET_PQ_query_param_relative_time (&history_expiration), GNUNET_PQ_query_param_uint32 (&purse_account_limit), @@ -59,14 +62,14 @@ TEH_PG_insert_global_fee (void *cls, uint32_t pal; qs = TEH_PG_get_global_fee (pg, - start_date, - &sd, - &ed, - &wx, - &pt, - &he, - &pal, - &sig); + start_date, + &sd, + &ed, + &wx, + &pt, + &he, + &pal, + &sig); if (qs < 0) return qs; if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qs) @@ -113,24 +116,21 @@ TEH_PG_insert_global_fee (void *cls, return GNUNET_DB_STATUS_SUCCESS_NO_RESULTS; } - /* Used in #postgres_insert_global_fee */ + /* Used in #postgres_insert_global_fee */ PREPARE (pg, "insert_global_fee", "INSERT INTO global_fee " "(start_date" ",end_date" - ",history_fee_val" - ",history_fee_frac" - ",account_fee_val" - ",account_fee_frac" - ",purse_fee_val" - ",purse_fee_frac" + ",history_fee" + ",account_fee" + ",purse_fee" ",purse_timeout" ",history_expiration" ",purse_account_limit" ",master_sig" ") VALUES " - "($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12);"); + "($1, $2, $3, $4, $5, $6, $7, $8, $9);"); return GNUNET_PQ_eval_prepared_non_select (pg->conn, "insert_global_fee", params); |