Formatting improvements
This commit is contained in:
parent
63bae181e3
commit
a2f863804d
@ -214,7 +214,6 @@ register(Alias) ->
|
|||||||
default_alias() ->
|
default_alias() ->
|
||||||
rocksdb_copies.
|
rocksdb_copies.
|
||||||
|
|
||||||
|
|
||||||
%% ----------------------------------------------------------------------------
|
%% ----------------------------------------------------------------------------
|
||||||
%% DEBUG API
|
%% DEBUG API
|
||||||
%% ----------------------------------------------------------------------------
|
%% ----------------------------------------------------------------------------
|
||||||
@ -676,7 +675,8 @@ lookup(Alias, Tab, Key) ->
|
|||||||
Enc = encode_key(Key),
|
Enc = encode_key(Key),
|
||||||
{Ref, Type} = call(Alias, Tab, get_ref),
|
{Ref, Type} = call(Alias, Tab, get_ref),
|
||||||
case Type of
|
case Type of
|
||||||
bag -> lookup_bag(Ref, Key, Enc, keypos(Tab));
|
bag ->
|
||||||
|
lookup_bag(Ref, Key, Enc, keypos(Tab));
|
||||||
_ ->
|
_ ->
|
||||||
case ?rocksdb:get(Ref, Enc, []) of
|
case ?rocksdb:get(Ref, Enc, []) of
|
||||||
{ok, EncVal} ->
|
{ok, EncVal} ->
|
||||||
@ -1208,8 +1208,7 @@ do_insert(K, V, #st{ets = Ets, ref = Ref, type = bag, maintain_size = true} = St
|
|||||||
do_insert(K, V, #st{ref = Ref, maintain_size = false} = St) ->
|
do_insert(K, V, #st{ref = Ref, maintain_size = false} = St) ->
|
||||||
return_catch(fun() -> db_put(Ref, K, V, [], St) end);
|
return_catch(fun() -> db_put(Ref, K, V, [], St) end);
|
||||||
do_insert(K, V, #st{ets = Ets, ref = Ref, maintain_size = true} = St) ->
|
do_insert(K, V, #st{ets = Ets, ref = Ref, maintain_size = true} = St) ->
|
||||||
IsNew =
|
IsNew = case ?rocksdb:get(Ref, K, []) of
|
||||||
case ?rocksdb:get(Ref, K, []) of
|
|
||||||
{ok, _} ->
|
{ok, _} ->
|
||||||
false;
|
false;
|
||||||
_ ->
|
_ ->
|
||||||
@ -1292,8 +1291,7 @@ do_delete(Key, #st{ets = Ets, ref = Ref, maintain_size = true} = St) ->
|
|||||||
end.
|
end.
|
||||||
|
|
||||||
do_delete_bag(Sz, Key, Ref, TSz, St) ->
|
do_delete_bag(Sz, Key, Ref, TSz, St) ->
|
||||||
Found =
|
Found = with_iterator(
|
||||||
with_iterator(
|
|
||||||
Ref, fun(I) ->
|
Ref, fun(I) ->
|
||||||
do_delete_bag_(Sz, Key, ?rocksdb:iterator_move(I, Key),
|
do_delete_bag_(Sz, Key, ?rocksdb:iterator_move(I, Key),
|
||||||
Ref, I)
|
Ref, I)
|
||||||
@ -1453,8 +1451,7 @@ do_select(Ref, Tab, _Type, MS, AccKeys, Limit) when is_boolean(AccKeys) ->
|
|||||||
i_do_select(I, #sel{keypat = Pfx,
|
i_do_select(I, #sel{keypat = Pfx,
|
||||||
compiled_ms = MS,
|
compiled_ms = MS,
|
||||||
limit = Limit} = Sel, AccKeys, Acc) ->
|
limit = Limit} = Sel, AccKeys, Acc) ->
|
||||||
StartKey =
|
StartKey = case Pfx of
|
||||||
case Pfx of
|
|
||||||
<<>> ->
|
<<>> ->
|
||||||
<<?DATA_START>>;
|
<<?DATA_START>>;
|
||||||
_ ->
|
_ ->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user