Query builder feature request

I hope this would be easy to add. In query builder it shows the entire query in SQL Syntax. Sometimes to debug I like to use phpmyadmin and test a query. Especially when I can’t test it easily through Wappler because I could be using variables that need to be set at runtime.
If the SQL section allowed me to copy the SQL statement by either highlighting it or a copy button so I could go use that statement in phpmyadmin by pasting it, that would save me from manually rewriting it in my test environment.
Hoping this would be a simple thing to implement… PLEASE

I’d vote for that if I could. :wink:

Lol. Brad. Nice way around the vote limitation. Devs like you who find a solution around every restriction are the ones to follow.

1 Like

Would so LOVE this feature.

1 Like

This is a must-have.

1 Like

yes this is a must. Even if its not BI directional and only one way from Wappler as Copy&Paste…

Have had the same issue multiple times, a simple ability to copy wouldn’t be so hard to implement I think.

Still eagerly waiting for this functionality @Teodor @George

Query builder implemented :slight_smile:

Sorry I wasn’t clear enough, I meant the ability to copy the sql query! The custom query’s are great but I am talking about copying the regular query that is generated by the wappler UI.

This has actually become more complex since this year old post

previously a query wasdisplayed in teh query builder like this (sorry about quality, had to clip an old video)

Now it is very different in the way the parameters work

(sorry posted before finished)

This one looks fairly regular to me:


But yesthe P1: tags etc, I can understand that it’s become complex. But still useful to copy I think.

I agree that copy would be useful (i voted for it) , i doubt the simple copy suggested by Paul a year ago would suffice for most users, thats all i am trying to say

1 Like

To view the query, you need to switch on ‘Debug’:


Then, you’ll be able to copy the query if you run the action file:


This doesn’t seem to work for all queries (eg not for paged queries, as far as I know). Also, you will see variables as in the example above - so you can’t simply paste the query somewhere and run the query.

If you want to copy/paste a query as it’s actually executed, you may be able to set this up - depending on your development setup. I use WAMP on a local machine, so I can see the MySQL query log and see exactly what queries are executed (and copy/paste them etc.). Very useful for debugging.

1 Like

+1 for being able to copy/paste the query. :slight_smile:

I often run into the situation where I start my query with a Database Query step.
And then I realise the options I need are not available and I need to switch it into a Database Custom Query step.
So I need to open the project folder, find then open the file of my server action, scroll down to the query, copy the query, come back to the server action panel, scroll down to the custom query step and paste… :sweat:

This would be a nice small QoL iteration. And I’m pretty sure it’s a quick one.
Make the query output field selectable.

@george pretty please? :pray:

1 Like

The query shown in the query builder is not the same as the one generated on the server. The one in Wappler only displays the query in ANSI SQL and not the SQL for the specific server.

Like for MS SQL to get the first 10 records you do

SELECT TOP 10 * FROM table

while in Wappler it shows


The query is only there to give you an idea of what kind of query it will generate, on the server it is being translated in the correct SQL dialect. Copy/paste it from Wappler on your server will not always give the same result or can throw an error.

1 Like

What about a button/icon to copy native query so we can paste in custom query?

The query is build within server connect, to get the query you need to call the server action. You get the query by using debug, it will return the query instead of executing it.

1 Like