anchor.diff:    end.
   
   fold_by_id(DbId, Fun, AccIn, Opts, #{ db := Db}) ->
  -  Prefix = << 100, 0, DbId/binary >>,
  +  Prefix = << DbId/binary, 0, 0, 50 >>,
     {ok, Snapshot} = erocksdb:snapshot(Db),
     ReadOptions = [{snapshot, Snapshot}],
     IncludeDoc = proplists:get_value(include_doc, Opts, false),
  
positive.code: 
  
  get_update_seq(Db, DbId) ->
    {ok, SeqBin} = erocksdb:get(Db, meta_key(DbId, <<"update_seq">>), []),
    binary_to_integer(SeqBin).
  
  write_doc(DbId, DocId, LastSeq, DocInfo, Body, #{ db := Db}) ->
  
negative.code:     not_found ->
        DbId = barrel_lib:uniqid(),
        Batch =  [
                   {put, << 0, 0, 0, 0 >>, integer_to_binary(?VERSION)},
                   {put, DbKey, DbId},
                   {put, meta_key(DbId, 0), integer_to_binary(0)}
        ],
        ok = erocksdb:write(Db,Batch, [{sync, true}]),
        {DbId, 0}
    end.
  
  clean_db(Name, DbId, #{db := Db}) ->
    DbKey = << 0, 0, 0, 100, (barrel_lib:to_binary(Name))/binary >>,
    ok = erocksdb:delete(Db, DbKey, [{sync, true}]),
    spawn(fun() -> clean_db1(Db, DbId) end),
    ok.
  
  all_dbs(#{db := Db}) ->
    Fun = fun
            ( << 0, 0, 0, 100, Name/binary >>, _, Acc) -> {ok, [Name | Acc]};
            (_, _, _Acc) -> stop
          end,
    AllDbs = fold_prefix(Db, << 0, 0, 0, 100 >>, Fun, []),
    lists:usort(AllDbs).
  
  clean_db1(Db, DbId) ->
    (catch clean_db_prefix(Db, DbId)),
    ok.
  
  clean_db_prefix(Db, Prefix) ->
  