On May 26, 2014 4:39:16 PM GMT+05:30, Atul Pratap Singh atulpratapsingh05@gmail.com wrote:
Yeah, I made a console, you can type queries, execute queries, and check logs on it. When you type a query, press ctrl+enter you'll see the result comes
out
replace your currect page, AJAX.requestHandler will take this job,
For executing and fetching query results, please also take a look at existing system in sql.js where custom handler is written for #sqlqueryform.ajax. So I think you could just pass the query to this existing system and page replacing will happen.
About pushing subsequent sql result pages to AJAX.cache, I think it is not required and is not done right now. We currently push to AJAX.cache when user switches between different tabs etc. and not for subsequent sql result pages.
but console only shows query string, I need handle response data, so
I can put results
on console logs, and errors and other messages. Thanks :)
So console div would be out of page_content and will not be removed/replaced as queries get executed from the console. For this also, I think you can write a custom handler.
Also, you can update console success/error messages from the sqlqueryform handler itself as you get the response.