Use official sext instead of copy

This commit is contained in:
Ulf Wiger
2018-02-06 14:30:17 +01:00
parent 6c9f5b565f
commit 3fccd1cd4f
6 changed files with 11 additions and 1108 deletions
+2 -2
View File
@@ -3,8 +3,8 @@
{description, "RocksDB backend plugin for Mnesia"},
{vsn, "1.0"},
{modules, [mnesia_rocksdb, mnesia_rocksdb_app,
mnesia_rocksdb_params, mnesia_rocksdb_sext,
mnesia_rocksdb_sup, mnesia_rocksdb_tuning]},
mnesia_rocksdb_params, mnesia_rocksdb_sup,
mnesia_rocksdb_tuning]},
{registered, []},
{mod, {mnesia_rocksdb_app, []}},
{env, []},
+3 -3
View File
@@ -1538,7 +1538,7 @@ keypat([{HeadPat,Gs,_}|_], KeyPos) when is_tuple(HeadPat) ->
KP = element(KeyPos, HeadPat),
KeyVars = extract_vars(KP),
Guards = relevant_guards(Gs, KeyVars),
Pfx = mnesia_rocksdb_sext:prefix(KP),
Pfx = sext:prefix(KP),
{Pfx, [{KP, Guards, [true]}]};
keypat(_, _) ->
{<<>>, [{'_',[],[true]}]}.
@@ -1574,10 +1574,10 @@ keypos(Tab) when is_atom(Tab) ->
2.
encode_key(Key) ->
mnesia_rocksdb_sext:encode(Key).
sext:encode(Key).
decode_key(CodedKey) ->
case mnesia_rocksdb_sext:partial_decode(CodedKey) of
case sext:partial_decode(CodedKey) of
{full, Result, _} ->
Result;
_ ->
File diff suppressed because it is too large Load Diff