How to make complex SQL queries in DreamFactory

Hello, I’m also novice to DreamFactory.

I like the concept of DreamFactory in Server-side.
But I trying it for our internal project, but I had one issue.
Most important is productivity, so I want know how to quickly adapt the complex sql to DreamFactory.

We have a many table and they need a many relationship per each table, so how to easily call many table in one time(ex. join)?

Please answer my question, maybe it is most important to use it.


Self reply:
Ok, I will try it to stored procedure.


1 Like

Yes, stored procedures are the best way to accomplish complex SQL logic that is not supported through the DreamFactory API calls.

I’ve setup stored procedures and have them working. Good stuff.

The DSP will automatically pick them up and create the REST API URL for the stored procedure and this can be secured through the same role based security as a table. Also Good stuff.

My question is whether stored procedures can have a have a pre-process script setup for them? I see the pre-process script for the other db entities, but the stored procedures appear to only have scripts for a “list” action. Am I missing an area where I can setup pre-processing script for stored procedures?

There’s no _proc scripting event on anything but GET _proc.list in 1.x.

Events based on particular stored procedures are now supported in 2.0.

@jeffreystables, thanks!

I currently use the Bitnami DreamFactory stack. Looking at their download site, I have the most current version of DreamFactory (1.9.4). Do you know when they typically upgrade their stacks? Or, do you have a quick link on how I can do the upgrade myself on my current Bitnami stack?

You should click on the link I provided to get 2.0. There is no upgrade path, however at some point once 2.0 is out of beta testing Bitnami will release a stack with it.

If you’re dependent on Bitnami and can’t install from GitHub, you’ll have the longest wait for 2.0 of anyone. :slight_smile:

Ok, great. Thanks for the info! (didn’t see the link in your first post)