Execute custom SQL

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Execute custom SQL

Rick F.
Hi all

I need to execute a custom plain text query against our Postgresql database.
 "select product_id, internal_name, brand_name, description, small_image_url from product where page @@ plainto_tsquery('"+searchterm+"') limit 25";

What is the preferred way to do this in Ofbiz?

Thanks
Rick

Reply | Threaded
Open this post in threaded view
|

Re: Execute custom SQL

Jacques Le Roux
Administrator
Hi Rick,

Did you try https://localhost:8443/webtools/control/EntitySQLProcessor

HTH

Jacques

Le 13/09/2020 à 16:32, Rick Fleming a écrit :

> Hi all
>
> I need to execute a custom plain text query against our Postgresql database.
>   "select product_id, internal_name, brand_name, description, small_image_url from product where page @@ plainto_tsquery('"+searchterm+"') limit 25";
>
> What is the preferred way to do this in Ofbiz?
>
> Thanks
> Rick
>
Reply | Threaded
Open this post in threaded view
|

Re: Execute custom SQL

Richard Fleming-2
 Thank you Mandeep and Jacques for your kind replies
I will look in that direction ----
-Rick




    On Sunday, September 13, 2020, 11:26:12 AM MDT, Jacques Le Roux <[hidden email]> wrote:  
 
 Hi Rick,

Did you try https://localhost:8443/webtools/control/EntitySQLProcessor

HTH

Jacques

Le 13/09/2020 à 16:32, Rick Fleming a écrit :

> Hi all
>
> I need to execute a custom plain text query against our Postgresql database.
>  "select product_id, internal_name, brand_name, description, small_image_url from product where page @@ plainto_tsquery('"+searchterm+"') limit 25";
>
> What is the preferred way to do this in Ofbiz?
>
> Thanks
> Rick
>
 
Reply | Threaded
Open this post in threaded view
|

Re: Execute custom SQL

Rishi Solanki
Richard,
If you are trying to review some data then SQL fits for you. Otherwise use
delegator object to do that. There are several examples which uses the
delegator to fetch, store, remove the data from database.

Please check Find Services and CRUD services to see how it is working.
Groovy and Java engine examples best suite for you.

Best Regards,
--
Rishi Solanki
*CTO, Mindpath Technology*
Intelligent Solutions
cell: +91-98932-87847
LinkedIn <https://www.linkedin.com/in/rishi-solanki-62271b7/>


On Mon, Sep 14, 2020 at 11:29 AM Richard Fleming <[hidden email]> wrote:

>  Thank you Mandeep and Jacques for your kind replies
> I will look in that direction ----
> -Rick
>
>
>
>
>     On Sunday, September 13, 2020, 11:26:12 AM MDT, Jacques Le Roux <
> [hidden email]> wrote:
>
>  Hi Rick,
>
> Did you try https://localhost:8443/webtools/control/EntitySQLProcessor
>
> HTH
>
> Jacques
>
> Le 13/09/2020 à 16:32, Rick Fleming a écrit :
> > Hi all
> >
> > I need to execute a custom plain text query against our Postgresql
> database.
> >  "select product_id, internal_name, brand_name, description,
> small_image_url from product where page @@
> plainto_tsquery('"+searchterm+"') limit 25";
> >
> > What is the preferred way to do this in Ofbiz?
> >
> > Thanks
> > Rick
> >
>