File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 4040 ensure_mnesia_dir /0 ,
4141
4242 on_node_up /1 ,
43- on_node_down /1
43+ on_node_down /1 ,
44+
45+ % % Helpers for diagnostics commands
46+ schema_info /1
4447 ]).
4548
4649% % Used internally in rpc calls
@@ -711,6 +714,18 @@ running_disc_nodes() ->
711714 ordsets :to_list (ordsets :intersection (ordsets :from_list (DiscNodes ),
712715 ordsets :from_list (RunningNodes ))).
713716
717+ % %--------------------------------------------------------------------
718+ % % Helpers for diagnostics commands
719+ % %--------------------------------------------------------------------
720+
721+ schema_info (Items ) ->
722+ Tables = mnesia :system_info (tables ),
723+ [info (Table , Items ) || Table <- Tables ].
724+
725+ info (Table , Items ) ->
726+ All = [{name , Table } | mnesia :table_info (Table , all )],
727+ [{Item , proplists :get_value (Item , All )} || Item <- Items ].
728+
714729% %--------------------------------------------------------------------
715730% % Internal helpers
716731% %--------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments