anchor.diff:              {ok, Sql8b, SF8b} = Result8a,
               Sorted8b = [{<<"1">>,<<"1">>},{<<"10">>,<<"10">>},{<<"11">>,<<"11">>},{<<"2">>,<<"2">>},{<<"3">>,<<"3">>}],
               ?assertEqual(Sorted8b, result_tuples_sort(List8a,SR8#stmtResult.rowFun, SF8b)),
  -            Expected8b = "select col1 c1, col2 from def where col1 < '4' order by col1 asc",
  +            Expected8b = "select col1 as c1, col2 from def where col1 < '4' order by col1 asc",
               ?assertEqual(Expected8b, string:strip(binary_to_list(Sql8b))),
   
               {ok, Sql8c, SF8c} = filter_and_sort(SKey, SR8, {'and',[{1,[<<"$in$">>,<<"1">>,<<"2">>,<<"3">>]}]}, [{?MainIdx,2,<<"asc">>}], [1], IsSec),
               ?assertEqual(Sorted8b, result_tuples_sort(List8a,SR8#stmtResult.rowFun, SF8c)),
               ?LogDebug("Sql8c ~p~n", [Sql8c]),
  -            Expected8c = "select col1 c1 from def where imem.def.col1 in ('1', '2', '3') and col1 < '4' order by col1 asc",
  +            Expected8c = "select col1 as c1 from def where imem.def.col1 in ('1', '2', '3') and col1 < '4' order by col1 asc",
               ?assertEqual(Expected8c, string:strip(binary_to_list(Sql8c))),
   
               {ok, Sql8d, SF8d} = filter_and_sort(SKey, SR8, {'or',[{1,[<<"$in$">>,<<"3">>]}]}, [{?MainIdx,2,<<"asc">>},{?MainIdx,3,<<"desc">>}], [2], IsSec),
  
positive.code: 
  -include_lib("eunit/include/eunit.hrl").
  
  setup() -> 
      ?imem_test_setup,
      catch imem_meta:drop_table(def),
      catch imem_meta:drop_table(tuple_test),
      catch imem_meta:drop_table(fun_test).
  
  teardown(_SKey) -> 
      catch imem_meta:drop_table(def),
      catch imem_meta:drop_table(tuple_test),
      catch imem_meta:drop_table(fun_test),
      ?LogDebug("test teardown....~n",[]),
      ?imem_test_teardown.
  
  
  db_test_() ->
      {
          setup,
          fun setup/0,
          fun teardown/1,
          {with,inorder,[
                fun test_without_sec/1
              , fun test_with_sec/1
          ]
          }
      }.
  
  % db_test_() ->
  %     {timeout, 20000, 
  %         {
  %             setup,
  %             fun setup/0,
  %             fun teardown/1,
  %             {with, [
  %                   fun test_without_sec/1
  %                 , fun test_with_sec/1
  %             ]}
  %         }
  %     }.
      
  test_without_sec(_) -> 
      test_with_or_without_sec(false).
  
  test_with_sec(_) ->
      test_with_or_without_sec(true).
  
  test_with_or_without_sec(IsSec) ->
      try
          ClEr = 'ClientError',
          % SeEx = 'SecurityException',
  
          ?LogDebug("----------------------------------~n"),
          ?LogDebug("---TEST--- ~p ----Security ~p", [?MODULE, IsSec]),
          ?LogDebug("----------------------------------~n"),
  
          ?LogDebug("schema ~p~n", [imem_meta:schema()]),
  
negative.code:         % ?LogDebug("StmtCols8 ~p~n", [SR8#stmtResult.stmtCols]),
          % ?LogDebug("SortSpec8 ~p~n", [SR8#stmtResult.sortSpec]),
          ?assertEqual([{2,<<"desc">>}], SR8#stmtResult.sortSpec),
  
          try
              ?assertEqual(ok, fetch_async(SKey, SR8, [], IsSec)),
              List8a = receive_recs(SR8,true),
  