Use leveled_codec types
... and exporting them. Previously types wer enot exported, and it appears dialyzer treated tham as any() when they were unexported types ??!!??
This commit is contained in:
parent
2063cacd8f
commit
6a20b2ce66
9 changed files with 222 additions and 96 deletions
|
@ -79,6 +79,8 @@
|
|||
-type manifest() :: #manifest{}.
|
||||
-type manifest_entry() :: #manifest_entry{}.
|
||||
|
||||
-export_type([manifest/0, manifest_entry/0]).
|
||||
|
||||
%%%============================================================================
|
||||
%%% API
|
||||
%%%============================================================================
|
||||
|
@ -306,7 +308,8 @@ switch_manifest_entry(Manifest, ManSQN, SrcLevel, Entry) ->
|
|||
get_manifest_sqn(Manifest) ->
|
||||
Manifest#manifest.manifest_sqn.
|
||||
|
||||
-spec key_lookup(manifest(), integer(), tuple()) -> false|manifest_entry().
|
||||
-spec key_lookup(manifest(), integer(), leveled_codec:ledger_key())
|
||||
-> false|manifest_entry().
|
||||
%% @doc
|
||||
%% For a given key find which manifest entry covers that key at that level,
|
||||
%% returning false if there is no covering manifest entry at that level.
|
||||
|
@ -320,7 +323,10 @@ key_lookup(Manifest, LevelIdx, Key) ->
|
|||
Key)
|
||||
end.
|
||||
|
||||
-spec range_lookup(manifest(), integer(), tuple(), tuple()) -> list().
|
||||
-spec range_lookup(manifest(),
|
||||
integer(),
|
||||
leveled_codec:ledger_key(),
|
||||
leveled_codec:ledger_key()) -> list().
|
||||
%% @doc
|
||||
%% Return a list of manifest_entry pointers at this level which cover the
|
||||
%% key query range.
|
||||
|
@ -331,7 +337,10 @@ range_lookup(Manifest, LevelIdx, StartKey, EndKey) ->
|
|||
end,
|
||||
range_lookup_int(Manifest, LevelIdx, StartKey, EndKey, MakePointerFun).
|
||||
|
||||
-spec merge_lookup(manifest(), integer(), tuple(), tuple()) -> list().
|
||||
-spec merge_lookup(manifest(),
|
||||
integer(),
|
||||
leveled_codec:ledger_key(),
|
||||
leveled_codec:ledger_key()) -> list().
|
||||
%% @doc
|
||||
%% Return a list of manifest_entry pointers at this level which cover the
|
||||
%% key query range, only all keys in the files should be included in the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue