Skip to content
Snippets Groups Projects

Resolve "Limiter la profondeur temporelle du graphique"

Merged Olivier Maury requested to merge 20-limiter-la-profondeur-temporelle-des-histogrammes into main
8 files
+ 133
75
Compare changes
  • Side-by-side
  • Inline
Files
8
+ 10
8
@@ -55,11 +55,13 @@ INSERT INTO cellpra (cell, pra, ratio)
-- period
CREATE TEMPORARY TABLE IF NOT EXISTS tmp_period (
code VARCHAR,
phase VARCHAR
phase VARCHAR,
firstday VARCHAR,
lastday VARCHAR
);
INSERT INTO tmp_period (code, phase) SELECT * FROM CSVREAD('../sql/periods.csv');
INSERT INTO period (code, name, phase)
SELECT t.code, k.id, t.phase
INSERT INTO tmp_period (code, phase, firstday, lastday) SELECT * FROM CSVREAD('../sql/periods.csv');
INSERT INTO period (code, name, phase, firstday, lastday)
SELECT t.code, k.id, t.phase, t.firstday, t.lastday
FROM tmp_period AS t
JOIN i18nkey AS k ON k.string=t.code;
@@ -90,7 +92,7 @@ CREATE TEMPORARY TABLE IF NOT EXISTS tmp_dailyvalue (
comparedvalue DOUBLE PRECISION
);
INSERT INTO tmp_dailyvalue (indicator, period, cell, date, computedvalue, comparedvalue)
SELECT * FROM CSVREAD('../sql/dailyvalues.csv');
SELECT * FROM CSVREAD('../sql/dailyvalues.csv');
INSERT INTO dailyvalue (indicator, cell, date, computedvalue, comparedvalue)
SELECT i.id, t.cell, t.date, t.computedvalue, t.comparedvalue
FROM tmp_dailyvalue AS t
@@ -107,7 +109,7 @@ CREATE TEMPORARY TABLE IF NOT EXISTS tmp_normalvalue (
computedvalue DOUBLE PRECISION
);
INSERT INTO tmp_normalvalue (indicator, period, cell, doy, computedvalue)
SELECT * FROM CSVREAD('../sql/normalvalues.csv');
SELECT * FROM CSVREAD('../sql/normalvalues.csv');
INSERT INTO normalvalue (indicator, cell, doy, computedvalue)
SELECT i.id, t.cell, t.doy, t.computedvalue
FROM tmp_normalvalue AS t
@@ -117,5 +119,5 @@ INSERT INTO normalvalue (indicator, cell, doy, computedvalue)
-- simulation
INSERT INTO simulation (date, simulationid, started, ended) VALUES
('2024-02-19', 1, '2024-02-20 12:00:00', '2024-02-20 12:30:00'),
('2024-02-20', 2, '2024-02-21 13:00:00', NULL);
\ No newline at end of file
('2024-02-19', 1, '2024-02-20 12:00:00', '2024-02-20 12:30:00'),
('2024-02-20', 2, '2024-02-21 13:00:00', NULL);
Loading