anchor.diff:  
   -spec handle_call(term(), pid() | {pid(), term()}, #state{}) -> {reply, term(), #state{}}.
   %% @private
  -handle_call(get_qbufs, _From, State) ->
  -    do_get_qbufs(State);
  -
  -handle_call(get_total_size, _From, State) ->
  -    do_get_total_size(State);
  -
   handle_call({get_or_create_qbuf, SQL, NSubqueries, OrigDDL, Options}, _From, State) ->
       do_get_or_create_qbuf(SQL, NSubqueries, OrigDDL, Options, State);
   
   handle_call({delete_qbuf, QBufRef}, _From, State) ->
       do_delete_qbuf(QBufRef, State);
  -
  -handle_call({qbuf_exists, QBufRef}, _From, State) ->
  -    do_qbuf_exists(QBufRef, State);
  -
  -handle_call({get_qbuf_size, QBufRef}, _From, State) ->
  -    do_get_qbuf_size(QBufRef, State);
  -
  -handle_call({get_qbuf_orig_query, QBufRef}, _From, State) ->
  -    do_get_qbuf_orig_query(QBufRef, State);
  -
  -handle_call({is_qbuf_ready, QBufRef}, _From, State) ->
  -    do_is_qbuf_ready(QBufRef, State);
   
   handle_call({batch_put, QBufRef, Data}, _From, State) ->
       do_batch_put(QBufRef, Data, State);
  
positive.code: %% @doc Dispose of this query buffer (do nothing if it does not exist).
  delete_qbuf(QBufRef) ->
      gen_server:call(?SERVER, {delete_qbuf, QBufRef}).
  
  -spec get_qbufs() -> [{qbuf_ref(), proplists:proplist()}].
  %% @doc List active qbufs, with properties
  get_qbufs() ->
      gen_server:call(?SERVER, get_qbufs).
  
  -spec qbuf_exists(qbuf_ref()) -> boolean().
  %% @doc Check if there is a query buffer for this Query.
  qbuf_exists(QBufRef) ->
      gen_server:call(?SERVER, {qbuf_exists, QBufRef}).
  
  -spec is_qbuf_ready(qbuf_ref()) -> boolean().
  %% @doc Check if results are ready for this Query.
  is_qbuf_ready(QBufRef) ->
      gen_server:call(?SERVER, {is_qbuf_ready, QBufRef}).
  
  -spec get_qbuf_orig_query(qbuf_ref()) -> {ok, ?SQL_SELECT{}} | {error, bad_qbuf_ref}.
  %% @doc Get the original SQL used when this qbuf was created.
  get_qbuf_orig_query(QBufRef) ->
      gen_server:call(?SERVER, {get_qbuf_orig_query, QBufRef}).
  
  -spec get_qbuf_size(qbuf_ref()) ->
                             {ok, non_neg_integer()} | {error, bad_qbuf_ref}.
  %% @doc Report the qbuf total size (not the size of the files backing this buffer).
  get_qbuf_size(QBufRef) ->
      gen_server:call(?SERVER, {get_qbuf_size, QBufRef}).
  
  -spec get_total_size() -> non_neg_integer().
  %% @doc Compute the total size of all temp tables.
  get_total_size() ->
      gen_server:call(?SERVER, get_total_size).
  
  -spec batch_put(qbuf_ref(), [data_row()]) ->
                         ok | {error, bad_qbuf_ref|overfull}.
  
negative.code:             State9 = State0#state{qbufs = lists:keyreplace(
                                              QBufRef, 1, QBufs0, {QBufRef, QBuf9})},
              {reply, ok, State9}
      end.
  
  
  