anchor.diff:              From ! {reply_csv, FileName, Error, single}
       end,
       Priv;
  -
  -
   % unsupported gui actions
   process_cmd({Cmd, BodyJson}, _Sess, _UserId, From, Priv, _SessPid) ->
       ?Error("unsupported command ~p content ~p and priv ~p", [Cmd, BodyJson, Priv]),
       CmdBin = lists:last(Cmd),
       From ! {reply, jsx:encode([{CmdBin,[{<<"error">>, <<"command '", CmdBin/binary, "' is unsupported">>}]}])},
       Priv.
  +
  +sql_name(Name) ->
  +    %% accept {Schema,Name} and convert to Schema.Name  
  +    case re:split(Name,"[,]") of
  +        [<<${,S/binary>>,N] ->  
  +            NN0=re:replace(N,"}$","",[{return,binary}]),
  +            NN1=re:replace(NN0,"^'","",[{return,binary}]),
  +            NN2=re:replace(NN1,"'$","",[{return,binary}]),
  +            % convert "{Schema,Name}"" to "Schema.Name"
  +            <<S/binary,$.,NN2/binary>>; 
  +        _ ->
  +            Name
  +    end.
   
   % dderl_fsm like row receive interface for compatibility
   rows(Rows, {?MODULE, Pid}) -> Pid ! Rows.
  
positive.code:             end,
              Priv#priv{connections = [Connection|Connections]}
      end;
  
  process_cmd({[<<"change_conn_pswd">>], ReqBody}, _Sess, _UserId, From, #priv{connections = Connections} = Priv, _SessPid) ->
      [{<<"change_pswd">>, BodyJson}] = ReqBody,
      Connection = ?D2T(proplists:get_value(<<"connection">>, BodyJson, <<>>)),
  
negative.code:             From ! {reply, error_invalid_conn(Connection, Connections)}
      end,
      Priv;
  process_cmd({[<<"browse_data">>], ReqBody}, Sess, _UserId, From, #priv{connections = Connections} = Priv, SessPid) ->
      [{<<"browse_data">>,BodyJson}] = ReqBody,
      Statement = binary_to_term(base64:decode(proplists:get_value(<<"statement">>, BodyJson, <<>>))),
  