Use official sext instead of copy
This commit is contained in:
@@ -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, []},
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user