anchor.diff:  %%%===================================================================
   %%% Internal functions
   %%%===================================================================
  +
  +handle_req(_, State = #state{status = accumulating}) ->
  +    {prev_query_unfinished, [], State};
  +
   handle_req({execute, {QId, Qry}}, State) ->
       %% TODO make this run with multiple sub-queries
       %% TODO fix this up properly
       {ok, DDL} = get_ddl_FIXUP(),
       Queries = riak_kv_qry_compiler:compile(DDL, Qry),
       SEs = [{run_sub_query, {qry, X}, {qid, QId}} || X <- Queries],
  -    {ok, SEs, State};
  +    {ok, SEs, State#state{qid = QId,
  +                          status = accumulating,
  +                          result = []}};
  +
  +handle_req({fetch, QId}, State = #state{qid = QId2})
  +  when QId =/= QId2 ->
  +    {bad_query_id, [], State};
  +handle_req({fetch, QId}, State = #state{qid = QId,
  +                                        status = accumulating}) ->
  +    {in_progress, [], State};
  +handle_req({fetch, QId}, State = #state{qid = QId,
  +                                        result = Result}) ->
  +    {decode_results(Result), [], State#state{qid = undefined,
  +                                             status = accumulating,
  +                                             result = []}};
  +
   handle_req(_Request, State) ->
       {ok, ?NO_SIDEEFFECTS, State}.
   
  
positive.code: -define(NO_MAX_RESULTS, no_max_results).
  -define(NO_PG_SORT, undefined).
  
  -record(state, {
  	  name       :: atom(),
  	  qry = none :: none | #riak_sql_v1{}
  	 }).
  
  %%%===================================================================
  %%% OTP API
  
negative.code: 
  %% Developer API
  -export([
           execute/2,
           fetch/2
          ]).
  
  %% gen_server callbacks
  -export([
  