Ok, so you plan to display query results in the console itself. I misunderstood some details from your proposal and thought that query results will be displayed in the main panel and query logs in the console. My previous reply was according to that understanding. Also, please tell me about the following details..On May 30, 2014 6:15:51 PM GMT+05:30, Edward Cheng <c4150221@gmail.com> wrote:
>2014-05-30 19:08 GMT+08:00 Atul Pratap Singh
><atulpratapsingh05@gmail.com>:
>
>> Edward,
>>
>> On Fri, May 30, 2014 at 2:02 PM, Edward Cheng <c4150221@gmail.com>
>wrote:
>>
>>> I'm writting AJAX part now.
>>> Have a look at this commit:
>>>
>>>
>https://github.com/WhaleWatching/phpmyadmin/commit/a382070ee42b72474842d20e805ae2a087e4b8c7
>>> See my comment on it:
>>> For get response data I add a param, run between requestHandler
>and
>>> responseHandler.
>>>
>>
>> As I understand, this mid-handler is your responsehandler that
>> subsequently makes a call to the generic responsehandler of ajax.js.
>So it
>> is not a real custom handler (that requests + handles response
>independent
>> of the generic one)
>>
>> Also, as I understand from your code, the proposed console would
>store a
>> log of run queries and on running a query from console, the results
>will be
>> displayed in the same way as happens when running a query from SQL
>tab.
>> Right ?
>>
>Sometimes people'll run queries on console while they're browsing
>other pages, not SQL tab.
>
>>
>> As per this understanding, you need a real custom handler because
>> executing SQL and handling its response in PMA involves many custom
>checks
>> and calls not only at response stage but also at request stage. For
>ex:-
>> -
>>
>> checkSqlQuery()
>>
>Sorry I don't get this :), just run it if some errors we
>can wait response to tell users
>
>> - bookmark handling
>>
>>
>Bookmark handling will use another functions and send another
>AJAX request, old way is not good enough.
>
>> -
>>
>> reloading navigation for certain queries
>>
>
>
>reloading navigation, global handlers take this job is better
>
>> - refreshing main panel for certain queries
>>
>Do you main #page_content ?
>
>> - triggering grid edit for results
>> etc. see in sql.js near $("#sqlqueryform.ajax").live('submit',
>function
>> (event) {
>>
>I have noticed this handler.
>
>>
>> Or did you plan to duplicate above checks and calls into your
>midhandler?
>>
>>
>No, midhandler just get result and append to console
>corresponding message(e.g. shows under query string "SELECT
>* FROM `mysql`.`user`")
>
- I am still unclear about warnings etc. that we display for certain queries like DROP, will we warn the user when executing such queries from console? Or would it be totally like mysql console?
- Also in case user puts a USE query in console, do we change the selected database and update the navigation and main panel? Same will be required for ALTER queries etc.. Here I am pointing to the overall relation and synchronization between console and rest of the application.
- And would you store the sql query logs only or the sql results history as well? I think as the results may change at any time, storing queries only should be fine.
--
Atul Pratap Singh
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Phpmyadmin-devel mailing list
Phpmyadmin-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel