Re: [Catalyst] complex search using Catalyst::Controller::DBIC::API::REST

2017-04-04 Thread Hartmaier Alexander
Have you tried using the search parameter with JSON encoded parameters as suggested before? DBI::API doesn't guess if the search parameter you've provided is a column name or a db function. Best regards, Alex On 2017-03-28 18:58, Rajesh Kumar Mallah wrote: Hi , Thanks for the response.

Re: [Catalyst] complex search using Catalyst::Controller::DBIC::API::REST

2017-03-28 Thread Rajesh Kumar Mallah
Hi , Thanks for the response. (1) The HTTP Request is: /api/rest/general/members?list_returns=holder1_balance(member_id)=21 (2) controller config is: https://pastebin.com/2iT1YSPm Error log: [2017/03/28 22:22:44]- API.pm-290: ERROR DBIx::Class::Storage::DBI::_dbh_execute(): DBI

Re: [Catalyst] complex search using Catalyst::Controller::DBIC::API::REST

2017-03-14 Thread Rajesh Kumar Mallah
Hi , How to perform below search: select member_id,holder1 from general.members where member_balance(member_id , '2017-03-14') < 0 ; there is a function on LHS of the condition Regds Mallah. > Hello Rajesh, > > C::C::DBIC::API supports that under the hood, so not sure what are you

Re: [Catalyst] complex search using Catalyst::Controller::DBIC::API::REST

2017-03-01 Thread Rajesh Kumar Mallah
Dear Petrov, Thanks i will try the JSON.stringify approach , the snippet was just for spitting out what you typed , i am not sure if it would be so easy to type out the parameters in case of complex conditions. Warm Regards Rajesh. > Hello Rajesh, > > C::C::DBIC::API supports that under the

Re: [Catalyst] complex search using Catalyst::Controller::DBIC::API::REST

2017-03-01 Thread Dimitar Petrov
Hello Rajesh, C::C::DBIC::API supports that under the hood, so not sure what are you going after. You can either use: search=JSON.stringify(object) or construct the search passing params like: search.holder.-ilike=%mis%. Both should work out of the box. Regards On Wed, Mar 1, 2017 at 10:24 AM,

Re: [Catalyst] complex search using Catalyst::Controller::DBIC::API::REST

2017-03-01 Thread Rajesh Kumar Mallah
Hi , CGI::Expand collapse_hash comes to rescue , below is a small snippet that converts the perl hash reference to the TT's dotted format using CGI::Expand. #!/usr/bin/perl -w use strict; use CGI::Expand qw(expand_hash

[Catalyst] complex search using Catalyst::Controller::DBIC::API::REST

2017-02-28 Thread Rajesh Kumar Mallah
Hi , In continuation of previous query kindly guide how to do a anchored or unanchored ilike search using Catalyst::Controller::DBIC::API::REST I have used DBIC search with lots of search conditions in past that uses SQL::Abstract, at this moment I need a guide(document) on how to convert