anchor.diff:  -module(pulsedb_realtime).
  --export([subscribe/2, unsubscribe/1]).
  +-export([subscribe/2, unsubscribe/1, clean_query/1]).
   -export([start_link/0, init/1, terminate/2, handle_info/2, handle_call/3]).
   
   -record(subscriptions, 
  
positive.code: find_subscription(Pid, Tag, Pids) ->
    lists:partition(fun ({Pid0,Tag0,_}) ->
                      Pid0 == Pid andalso Tag0 == Tag
                    end, Pids).
negative.code:   clients=[] % query_key, {Name,Query}, pids
    }).
  
  subscribe(Query0, Tag) ->
    Query = clean_query(Query0),
    gen_server:call(?MODULE, {subscribe, self(), Query, Tag}).
  
  
  