pipeworks_mud_mapper.services.map_db_service
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
|
Return map IDs stored in the database. |
|
Return True if the map ID exists in the database. |
|
Load a map from SQLite into a MapFile model. |
|
Persist a MapFile to SQLite (upsert + full room refresh). |
|
Delete a map and its rooms from SQLite. |
|
Return high-level database stats for UI health panels. |
|
Return per-map summary rows for UI tables. |
Module Contents
- pipeworks_mud_mapper.services.map_db_service.list_maps(db_path=None)[source]
Return map IDs stored in the database.
- pipeworks_mud_mapper.services.map_db_service.map_exists(map_id, db_path=None)[source]
Return True if the map ID exists in the database.
- pipeworks_mud_mapper.services.map_db_service.load_map(map_id, db_path=None)[source]
Load a map from SQLite into a MapFile model.
- pipeworks_mud_mapper.services.map_db_service.save_map(map_file, db_path=None)[source]
Persist a MapFile to SQLite (upsert + full room refresh).
- pipeworks_mud_mapper.services.map_db_service.delete_map(map_id, db_path=None)[source]
Delete a map and its rooms from SQLite.