anchor.diff:          , audit_readGT/4    %% (User, Channel, TS1, Limit)          read audit info after Timestamp1, resturn a list of maps with Limit results or less
           , audit_readGT/5    %% (User, Channel, Item, TS1, Limit)    read audit info after Timestamp1, return Limit results or less
           , hist_read/3       %% (User, Channel, KeyList)             return history list as maps for given keys
  -        , search_deleted/5  %% (User,s Channel, Ckey1, Ckey2, Text) from key at or after CKey1 to last key before CKey2, finds {K,V} with text in V
  +        , search_deleted/6  %% (User,s Channel, Ckey1, Ckey2, Text) from key at or after CKey1 to last key before CKey2, finds {K,V} with text in V
           , search_deleted_clients/6
           , search_deleted_objects/6
           , remove/3          %% (User, Channel, RowList)             delete a resource will fail if it was modified, rows should be in map format
  
positive.code:         ?assertEqual([History1, History2, History3], HistResult),
  
          %% Search history for test
          HistSearchResult1 = search_deleted(system, ?Channel, <<"test">>, [], maps:get(ckey, Map3),5),
          ?assertEqual(3, length(HistSearchResult1)),
  
          %% Search for 150
          HistSearchResult2 = search_deleted(system, ?Channel, <<"150">>, [], maps:get(ckey, Map3),5),
          ?assertEqual(1, length(HistSearchResult2)),
          ?assertEqual([{maps:get(ckey, Map3), maps:get(cvalue, Map3Upd)}], HistSearchResult2),
  
          %% Search history for limit
          HistSearchResult3 = search_deleted(system, ?Channel, <<"test">>, [], maps:get(ckey, Map3),2),
          ?assertEqual(2, length(HistSearchResult3)),
  
          %% Using sext encoded Keys
          EncodedKeys = [imem_datatype:term_to_binterm(maps:get(ckey, Map1))
  
negative.code:         _ -> NextKey = imem_meta:next(Table, term_key_to_binterm(Key ++ <<255>>)),
              find_next_clients(Table, ClientKey, NextKey, EndKey)
      end;
  find_next_clients(Table, ClientKey , Key, _KeyBin, EndKey) ->
      NextKey = imem_meta:next(Table, term_key_to_binterm(lists:sublist(Key, 2) ++ <<255>>)),
      find_next_clients(Table, ClientKey, NextKey, EndKey).
  
  