anchor.diff:              ?assertEqual(ok, close(SKey, SR7))
           end,
   
  -        SR8 = exec(SKey,query8, 100, IsSec, "select col1, col2 from def where col1 < '4' order by col2 desc;"),
  +        SR8 = exec(SKey,query8, 100, IsSec, "select col1 as c1, col2 from def where col1 < '4' order by col2 desc;"),
           ?Log("SortSpec8 ~p~n", [SR8#stmtResult.sortSpec]),
           ?Log("StmtCols8 ~p~n", [SR8#stmtResult.stmtCols]),
           ?Log("SortSpec8 ~p~n", [SR8#stmtResult.sortSpec]),
  
positive.code:         , update_cursor_prepare/4   %% stateful creation of update plan (stored in state)
          , update_cursor_execute/4   %% stateful execution of update plan (fetch aborted first)
          , filter_and_sort/5         %% apply FilterSpec and SortSpec and return new SQL and SortFun
          , fetch_recs/5              %% simulation of synchronous fetch
          , fetch_recs_sort/5         %% simulation of synchronous fetch followed by a lists:sort
          , fetch_recs_async/4        %% async streaming fetch
  
negative.code: fetch_close(SKey, Pid, IsSec) when is_pid(Pid) ->
      gen_server:call(Pid, {fetch_close, IsSec, SKey}).
  
  filter_and_sort(SKey, StmtResult, FilterSpec, SortSpec, IsSec) ->
      filter_and_sort(SKey, StmtResult, FilterSpec, SortSpec, [], IsSec).
  
  filter_and_sort(SKey, #stmtResult{stmtRef=Pid}, FilterSpec, SortSpec, Cols, IsSec) ->
      filter_and_sort(SKey, Pid, FilterSpec, SortSpec, Cols, IsSec);    
  filter_and_sort(SKey, Pid, FilterSpec, SortSpec, Cols, IsSec) when is_pid(Pid) ->
      gen_server:call(Pid, {filter_and_sort, IsSec, FilterSpec, SortSpec, Cols, SKey}).
  
  update_cursor_prepare(SKey, #stmtResult{stmtRef=Pid}, IsSec, ChangeList) ->
      update_cursor_prepare(SKey, Pid, IsSec, ChangeList);
  