gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: Stats table.


From: gnunet
Subject: [libeufin] branch master updated: Stats table.
Date: Thu, 05 Oct 2023 09:47:59 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 1f5e14e2 Stats table.
1f5e14e2 is described below

commit 1f5e14e210d1f68ec7f73454506869e020c55d3e
Author: MS <ms@taler.net>
AuthorDate: Thu Oct 5 09:41:19 2023 +0200

    Stats table.
    
    No exchange balance, and comment on the number of 'days' row.
    
    Future versions may express the exchange balance as the average
    in the timeframe, where the 'hour' timeframe gets the balance at
    the point when the row gets inserted in the database.
---
 database-versioning/libeufin-bank-0001.sql | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/database-versioning/libeufin-bank-0001.sql 
b/database-versioning/libeufin-bank-0001.sql
index 7fbf6e4e..6cb84bcc 100644
--- a/database-versioning/libeufin-bank-0001.sql
+++ b/database-versioning/libeufin-bank-0001.sql
@@ -48,7 +48,7 @@ CREATE TYPE subscriber_state_enum
   AS ENUM ('new', 'confirmed');
 
 CREATE TYPE stat_timeframe_enum
-  AS ENUM ('hour', 'day', 'month', 'year', '10years');
+  AS ENUM ('hour', 'day', 'month', 'year', 'decade');
 
 -- FIXME: comments on types (see exchange for example)!
 
@@ -404,19 +404,17 @@ CREATE TABLE IF NOT EXISTS regional_stats (
   ,cashout_volume_in_fiat taler_amount NOT NULL
   ,internal_taler_payments_count BIGINT NOT NULL
   ,internal_taler_payments_volume taler_amount NOT NULL
-  ,taler_exchange_balance taler_amount NOT NULL -- FIXME: this can't be 
accurate, as balance changes continuously.
   ,timeframe stat_timeframe_enum NOT NULL
 );
 
 COMMENT ON TABLE regional_stats IS
-  'Stores statistics about the regional currency usage.  At any given time, 
this table stores at most: 23 hour rows, 29 day rows, 11 month rows, 9 year 
rows, and any number of 10year rows';
+  'Stores statistics about the regional currency usage.  At any given time, 
this table stores at most: 24 hour rows, N day rows (with N being the highest 
day number of the current month), 12 month rows, 9 year rows, and any number of 
decade rows';
 COMMENT ON COLUMN regional_stats.cashin_count IS 'how many cashin operations 
took place in the timeframe';
 COMMENT ON COLUMN regional_stats.cashin_volume_in_fiat IS 'how much fiat 
currency was cashed in in the timeframe';
 COMMENT ON COLUMN regional_stats.cashout_count IS 'how many cashout operations 
took place in the timeframe';
 COMMENT ON COLUMN regional_stats.cashout_volume_in_fiat IS 'how much fiat 
currency was payed by the bank to customers in the timeframe';
 COMMENT ON COLUMN regional_stats.internal_taler_payments_count IS 'how many 
internal payments were made by a Taler exchange';
 COMMENT ON COLUMN regional_stats.internal_taler_payments_volume IS 'how much 
internal currency was paid by a Taler exchange';
-COMMENT ON COLUMN regional_stats.taler_exchange_balance IS 'balance of the 
Taler exchange at the given timeframe'; -- FIXME: see FIXME above.
 COMMENT ON COLUMN regional_stats.timeframe IS 'particular timeframe that this 
row accounts for';
 
 COMMIT;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]