pipeworks_mud_mapper.services.map_db_service ============================================ .. py:module:: pipeworks_mud_mapper.services.map_db_service .. autoapi-nested-parse:: SQLite storage service for mapper authoring data. This module replaces map JSON files as the authoring source of truth. Maps are stored in a single shared SQLite database, while zone exports remain JSON files for the game server. Design goals: - Keep SQLite as the canonical authoring store. - Preserve existing MapFile/MapRoom models in memory. - Use clear, explicit SQL (no ORM) to keep dependencies light. Functions --------- .. autoapisummary:: pipeworks_mud_mapper.services.map_db_service.list_maps pipeworks_mud_mapper.services.map_db_service.map_exists pipeworks_mud_mapper.services.map_db_service.load_map pipeworks_mud_mapper.services.map_db_service.save_map pipeworks_mud_mapper.services.map_db_service.delete_map pipeworks_mud_mapper.services.map_db_service.get_db_stats pipeworks_mud_mapper.services.map_db_service.get_map_overview Module Contents --------------- .. py:function:: list_maps(db_path = None) Return map IDs stored in the database. .. py:function:: map_exists(map_id, db_path = None) Return True if the map ID exists in the database. .. py:function:: load_map(map_id, db_path = None) Load a map from SQLite into a MapFile model. .. py:function:: save_map(map_file, db_path = None) Persist a MapFile to SQLite (upsert + full room refresh). .. py:function:: delete_map(map_id, db_path = None) Delete a map and its rooms from SQLite. .. py:function:: get_db_stats(db_path = None) Return high-level database stats for UI health panels. .. py:function:: get_map_overview(db_path = None) Return per-map summary rows for UI tables.