{"database": "lakegarda", "private": false, "path": "/lakegarda", "size": 40960, "tables": [{"name": "line", "columns": ["id", "name"], "primary_keys": ["id"], "count": 2, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [{"other_table": "service", "column": "id", "other_column": "line_id"}], "outgoing": []}, "private": false}, {"name": "passage", "columns": ["id", "service_id", "stop_id", "position", "time"], "primary_keys": ["id"], "count": 377, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": [{"other_table": "stop", "column": "stop_id", "other_column": "id"}, {"other_table": "service", "column": "service_id", "other_column": "id"}]}, "private": false}, {"name": "service", "columns": ["id", "line_id", "name"], "primary_keys": ["id"], "count": 93, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [{"other_table": "passage", "column": "id", "other_column": "service_id"}], "outgoing": [{"other_table": "line", "column": "line_id", "other_column": "id"}]}, "private": false}, {"name": "stop", "columns": ["id", "name"], "primary_keys": ["id"], "count": 27, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [{"other_table": "passage", "column": "id", "other_column": "stop_id"}], "outgoing": []}, "private": false}], "hidden_count": 0, "views": [{"name": "detailledservice", "private": false}], "queries": [{"title": "Route", "sql": "WITH a AS ( SELECT service.id as serviceid, service.name as service, stop.name as stop, passage.time FROM passage INNER JOIN service ON service.id = passage.service_id INNER JOIN stop ON stop.id = passage.stop_id WHERE stop.name LIKE :start || '%' ), b AS ( SELECT service.id as serviceid, service.name as service, stop.name as stop, passage.time FROM passage INNER JOIN service ON service.id = passage.service_id INNER JOIN stop ON stop.id = passage.stop_id WHERE stop.name LIKE :target || '%' ) SELECT a.service, a.stop as departure_stop, a.time as departure_time, b.stop as arrival_stop, b.time as arrival_time FROM a INNER JOIN b ON a.serviceid = b.serviceid WHERE a.time < b.time", "hide_sql": true, "name": "route", "private": false}, {"title": "Stop display", "sql": "select p.time, s.line_name as line, s.name as service, s.destination_name as destination from stop h  inner join passage p on p.stop_id = h.id  inner join detailledservice s on s.id = p.service_id where h.name LIKE :stop || '%' and h.id <> s.destination_id order by p.time", "hide_sql": true, "name": "stop", "private": false}], "allow_execute_sql": true, "query_ms": 4.427802981808782}