anchor.diff:              {noreply, State}
       end;
   handle_info({mnesia_table_event,{delete_object, _OldRecord, _ActivityId}}, State) ->
  +    imem_meta:log_to_db(debug,?MODULE,handle_info,[{mnesia_table_event,delete_object}],"tail delete"),
       % io:format(user, "~p - received mnesia subscription event ~p ~p~n", [?MODULE, delete_object, _OldRecord]),
       {noreply, State};
   handle_info({mnesia_table_event,{delete, {_Tab, _Key}, _ActivityId}}, State) ->
  +    imem_meta:log_to_db(debug,?MODULE,handle_info,[{mnesia_table_event,delete}],"tail delete"),
       % io:format(user, "~p - received mnesia subscription event ~p ~p~n", [?MODULE, delete, {_Tab, _Key}]),
       {noreply, State};
   handle_info({row, Rows0}, #state{reply=Sock, fetchCtx=FetchCtx0, statement=Stmt}=State) ->
  
positive.code:     end,
      {noreply, State#state{reply=Sock,fetchCtx=FetchCtx1}};  
  handle_cast({close, _SKey}, State) ->
      % io:format(user, "~p - received close in state ~p~n", [?MODULE, State]),
      {stop, normal, State}; 
  handle_cast(Request, State) ->
      io:format(user, "~p - received unsolicited cast ~p~nin state ~p~n", [?MODULE, Request, State]),
      {noreply, State}.
  
  handle_info({row, ?eot}, #state{reply=Sock,fetchCtx=FetchCtx0}=State) ->
      % io:format(user, "~p - received end of table in status ~p~n", [?MODULE,FetchCtx0#fetchCtx.status]),
      % io:format(user, "~p - received end of table in state~n~p~n", [?MODULE,State]),
      case FetchCtx0#fetchCtx.status of
          running ->
              send_reply_to_client(Sock, {[],true}),  
  
negative.code:             {noreply, State}
      end;        
  handle_info({mnesia_table_event,{write,Record,_ActivityId}}, #state{reply=Sock,fetchCtx=FetchCtx0,statement=Stmt}=State) ->
      imem_meta:log_to_db(debug,?MODULE,handle_info,[{mnesia_table_event,write}],"tail write"),
      %io:format(user, "~p - received mnesia subscription event ~p ~p~n", [?MODULE, write, Record]),
      #fetchCtx{status=Status,metarec=MetaRec,remaining=Remaining0,tailSpec=TailSpec}=FetchCtx0,
      case Status of
  