anchor.diff:           get_or_create_qbuf/4,  %% new Query arrives, with some Options
            get_qbuf_expiry/1,
            get_max_query_data_size/0,
  -         get_qbuf_orig_query/1, %% original query used at creation of this qbuf
  -         get_qbuf_size/1,       %% table size (as reported by leveldb:get_size, or really the file size)
  -         get_qbufs/0,           %% list all query buffer refs and is_ flags in a proplist
  -         get_total_size/0,      %% get total size of all temp tables
  -         is_qbuf_ready/1,       %% are there results ready for this Query?
  -         qbuf_exists/1,         %% is there a temp table for this Query?
            set_max_query_data_size/1,
            set_qbuf_expiry/2,
            set_ready_waiting_process/2,  %% notify a Pid when all chunks are here
  
positive.code: %%%===================================================================
  %%% do_thing functions
  %%%===================================================================
  
  do_get_qbufs(#state{qbufs = QBufs} = State) ->
      Res = [{Ref, [{orig_qry, OrigQry},
                    {is_ready, IsReady},
                    {last_accessed, LastAccessed},
                    {total_records, TotalRecords}]}
             || {Ref, #qbuf{orig_qry      = OrigQry,
                            is_ready      = IsReady,
                            last_accessed = LastAccessed,
                            total_records = TotalRecords}} <- QBufs],
      {reply, Res, State}.
  
  
  do_get_total_size(#state{total_size = TotalSize} = State) ->
      {reply, TotalSize, State}.
  
  
  do_get_or_create_qbuf(SQL, NSubqueries,
                        OrigDDL, Options,
  
negative.code:     end.
  
  
  do_batch_put(QBufRef, Data, #state{qbufs          = QBufs0,
                                     total_size     = TotalSize0,
                                     hard_watermark = HardWatermark} = State0) ->
  