Convert Database Query to a Database Paged Query

Is there a simpler way to convert a Database Query to a Database Paged Query

I have tried to work that one out in the past but i don’t think it can be done, would be very happy to be proved wrong.

In my case i simply wanted to place a max limit on the records displayed rather than needing full paging so i just placed a limit via an app connect dataview limiting it at client side rather than server.

1 Like

Maybe the Wappler team can take a request for a conversion functionality. And this is me begging lol @George

1 Like

Good idea! Should be pretty easy to do, we just haven’t thought of it.

That is why we love your practical requests! You know as power users best what can be really useful. And are happy to implement those requests!

9 Likes

So @George any possibility to have this on the next release? I got a situation where I got to change all my queries. If this can be implemented will be great.

2 Likes

So is there a quick way to convert a database query to a database paged query? without starting from scratch, I’ve added a lot of customization to the the table and don’t want to start over.
thanks!

I don’t believe so, not right now…? @Teodor @George

oh sorry forgot about this one …

you can just open the server connect file in the editor and change:

"action": "select",

to

"action": "paged",

we will will be adding the conversion option soon.

6 Likes

Thanks George, however I figured that out some time now…lol

1 Like

This has been integrated in Wappler 2.4.5

Now you can change the database query type using a dropdown.

1 Like

This new Wappler 2.4.5 feature of “easily change the Query Type between Multiple Records, Single Record or Paged Records” sounds really interesting to me, but I’m not clear on the difference between each of these three options.

Can someone put it in context for me by replying with quick examples/scenarios of when you’d use each of the three?

Thanks!

The names are pretty much self explanatory :slight_smile:

Database Query
This step allows you to create a database query, which returns all the records which match the conditions.

Database Paged Query
This step allows you to create a database query, which can be limited to show certain number of records per page. The results can be used with paging controls on your page.

Database Single Query
This step allows you to create a database query which returns a single record. That’s really useful in cases where you filter your data and expect a single result to be always returned, like retrieving the logged in user info, or a product detail etc.

1 Like

I’ve updated to 2.4.5 but can’t find that dropdown! Can you give me a clue?

Well, select your query in the server action steps and you will see it in the properties panel :slight_smile:

That’s exactly where I looked expecting it to be there… but it’s not! Can you give me a screenshot?

1 Like

That’s where I thought it would be but it’s definitely not there for me.

11

1 Like

Weird :slight_smile:
Try uninstalling and reinstalling Wappler to see if that will help.