Module khepri_export_erlang

Khepri import/export callback module using Erlang terms formatted as plain text as its external format.

Description

Khepri import/export callback module using Erlang terms formatted as plain text as its external format.

The exported file could be read using file:consult/1 to get back the list of backup items.

This callback module takes a filename or an opened file descriptor as its private data passed to khepri:export/4 and khepri:import/3.

Example:
ok = khepri:put(StoreId, "/:stock/:wood/Oak", 100).
ok = khepri:put(StoreId, "/:stock/:wood/Mapple", 55).
ok = khepri:export(StoreId, khepri_export_erlang, "export.erl").
Content of export.erl:
{put,[stock,wood,<<"Mapple">>],{p_data,55},#{},#{}}.
{put,[stock,wood,<<"Oak">>],{p_data,100},#{},#{}}.

Generated by EDoc