mud_server.db.admin_repo

Admin inspector repository operations for SQLite backend.

This module groups schema/table inspection and admin dashboard aggregate queries that were previously implemented directly in mud_server.db.database.

Functions

get_table_names()

Return sorted user-defined table names (excluding sqlite_* internals).

list_tables()

Return table metadata for admin database browsing UIs.

get_schema_map()

Return table schemas and foreign key relationships for admin tooling.

get_table_rows(table_name[, limit, offset])

Return column names and row values for a table.

get_all_users_detailed()

Return detailed, non-tombstoned account rows for the Active Users card.

get_all_users()

Return basic account rows for admin summaries.

get_character_locations(*[, world_id])

Return character location rows with names for admin displays.

get_all_sessions(*[, world_id])

Return all active (non-expired) sessions for optional world scope.

get_active_connections(*[, world_id])

Return active session rows including derived activity age seconds.

get_all_chat_messages([limit, world_id])

Return recent chat messages across all rooms for optional world scope.

Module Contents

mud_server.db.admin_repo.get_table_names()[source]

Return sorted user-defined table names (excluding sqlite_* internals).

mud_server.db.admin_repo.list_tables()[source]

Return table metadata for admin database browsing UIs.

mud_server.db.admin_repo.get_schema_map()[source]

Return table schemas and foreign key relationships for admin tooling.

mud_server.db.admin_repo.get_table_rows(table_name, limit=100, offset=0)[source]

Return column names and row values for a table.

Raises:

ValueError – If table_name does not exist in the user-visible schema.

mud_server.db.admin_repo.get_all_users_detailed()[source]

Return detailed, non-tombstoned account rows for the Active Users card.

mud_server.db.admin_repo.get_all_users()[source]

Return basic account rows for admin summaries.

mud_server.db.admin_repo.get_character_locations(*, world_id=None)[source]

Return character location rows with names for admin displays.

mud_server.db.admin_repo.get_all_sessions(*, world_id=None)[source]

Return all active (non-expired) sessions for optional world scope.

mud_server.db.admin_repo.get_active_connections(*, world_id=None)[source]

Return active session rows including derived activity age seconds.

mud_server.db.admin_repo.get_all_chat_messages(limit=100, *, world_id=None)[source]

Return recent chat messages across all rooms for optional world scope.