Sessions: filter, monthly sums, paging (#8278)

This commit is contained in:
Michael Geers 2023-06-14 08:57:09 +02:00 • committed by GitHub
parent 10ba256787
commit e600d8dc71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 742 additions and 226 deletions

23
tests/sessions.sql Normal file
View file

@ -0,0 +1,23 @@
DROP TABLE IF EXISTS `sessions`;
CREATE TABLE `sessions` (
`id` integer,
`created` datetime,
`finished` datetime,
`loadpoint` text,
`identifier` text,
`vehicle` text,
`meter_start_kwh` real,
`meter_end_kwh` real,
`charged_kwh` real,
`odometer` real,
`solar_percentage` real,
`price` real,
`price_per_kwh` real,
`co2_per_kwh` real,
PRIMARY KEY (`id`)
);
INSERT INTO `sessions` VALUES (1,'2023-05-02 08:00:00.0+02:00','2023-05-02 12:00:00.0+02:00','Carport',NULL,'blauer e-Golf',NULL,NULL,10,NULL,100,2,0.2,NULL);
INSERT INTO `sessions` VALUES (2,'2023-05-02 08:00:00.0+02:00','2023-05-02 12:00:00.0+02:00','Carport',NULL,'blauer e-Golf',NULL,NULL,2.5,NULL,88.21,0.75,0.3,NULL);
INSERT INTO `sessions` VALUES (3,'2023-05-03 16:00:00.0+02:00','2023-05-03 20:00:00.0+02:00','Carport',NULL,'weißes Model 3',NULL,NULL,2.5,NULL,50,0.25,0.1,NULL);
INSERT INTO `sessions` VALUES (4,'2023-05-04 22:00:00.0+02:00','2023-05-05 06:00:00.0+02:00','Garage',NULL,'weißes Model 3',NULL,NULL,5,NULL,0,2.5,0.5,NULL);