GtBridge.Mnesia (gt_bridge v0.17.1)

Copy Markdown View Source

I expose Mnesia table introspection to GT.

All my functions degrade gracefully when Mnesia is not running — they return empty results so view rendering doesn't fail when the user's BEAM has no Mnesia configured.

Summary

Functions

I return records from a mnesia table.

I return schema info for a mnesia table. Returns an empty map when mnesia is not running.

I return mnesia table info for the table list. Returns an empty list when mnesia is not started.

Functions

records(table, limit \\ 500)

@spec records(atom(), non_neg_integer()) :: [list()]

I return records from a mnesia table.

schema(table)

@spec schema(atom()) :: map()

I return schema info for a mnesia table. Returns an empty map when mnesia is not running.

tables()

@spec tables() :: [map()]

I return mnesia table info for the table list. Returns an empty list when mnesia is not started.