ColdBox3.8.0/CF10 - Query and SubQuery Ideas


I am migrating an existing application to ColdBox (a bit of a learning curve). The existing application uses stored procedure to retrieve data from MS SQL for searches. Then for filters, same stored procedure is called passing different parameters. With that said, the DB is being hit as many times as filters are selected. I would like to hit the DB once and then subquery of the returned results.

I saw a QueryHelper containing methods that might be useful for what I’m trying to do; however, there are no examples. Could someone shred some lights on how best to achieve the above function quickly and effiencinetly in ColdBox?

We are not using beans…so no ORM and such… simply using a Service class to make the stored procedure call.

I appreciate your thoughts.

Hi Tuannie,

You can check QueryHelper Plugin have some useful methods for filtering the data.

read your post wrong.

for me, looking at the plugin methods really explains what they do since they just write the QoQ for you.

Thank you Aaron and Sana for your reply. Being a newbie to coldbox, reading the API doesn’t help me to setup how to use them. I am more of a “learn-by-example” type…so I was hoping for some example code to get me started.

Thanks again for your time.

i dont think there are examples for that plugin.

to me, it is very simple to read. take a look at the methods.