[OPEN-ILS-DEV] How to query coded_value_map via OSRF
Daniel Wells
dbwells at gmail.com
Wed Jul 10 22:55:00 EDT 2019
Hello Ken,
The second argument to PCRUD should be an Evergreen JSON-style where
clause. Are you simply trying to get them all? I am actually not sure if
there is a canonical way to do that, but one thing you could do is use a
where clause which is always true, such as id != NULL, i.e.:
https://ulysses.calvin.edu/osrf-gateway-v1?service=open-ils.pcrud&method=open-ils.pcrud.search.ccvm¶m=%22ANONYMOUS%22¶m={%22id%22:{%22!=%22:null}}
You can adjust the conditions in that last JSON argument to suit if you are
just trying to get a specific set of CCVMs.
Sincerely,
Dan
On Wed, Jul 10, 2019 at 10:27 PM Ken Cox <kenstir at gmail.com> wrote:
> Jason,
>
> Thank you, that is a great hint, but I'm not close enough to get it
> yet. In the past I've looked at OSRF methods registered in perl
> modules, and they were wrapped with some decorations that told me how
> they were supposed to be called (__PACKAGE__->register_method and look
> at the params array). In this case (sub init_ro_object_cache) I don't
> recognize any methods being registered at all. I tried to
>
> srfsh# introspect open-ils.pcrud "open-ils.pcrud.search.ccvm"
>
> but it didn't provide any help. I tried calling it in a lot of
> different ways but all I get is
>
>
> https://gapines.org/osrf-gateway-v1?service=open-ils.pcrud&method=open-ils.pcrud.search.ccvm¶m=%22ANONYMOUS%22¶m=*
> {"payload":[],"debug": "osrfMethodException : Severe query error --
> see error log for more details","status":500}
>
> One more clue please?
>
> Thanks,
> Ken
>
>
> On Wed, Jul 10, 2019 at 6:52 AM Jason Stephenson <jason at sigio.com> wrote:
> >
> > On 7/9/19 8:34 PM, Ken Cox wrote:
> > > Is there a way to query the coded_value_map via OSRF? I want to list
> > > the search_format and icon_format values for use in the mobile app. I
> > > see a call to ctx.search_ccvm in coded_value_selector.tt2, but I can't
> > > find that code anywhere. I am swinging wildly using pcrud but haven't
> > > hit anything yet, and could use a clue.
> >
> > ctx.search_ccvm is added, along with a bunch of methods, in a loop
> > beginning at line 77 of
> > Open-ILS/src/perlmods/lib/OpenILS/WWW/EGcatLoader/Util.pm. It's doing a
> > CStoreEditor search.
> >
> > Since ccvm has a pcrud controller, you should be able to achieve a
> > similar search with open-ils.pcrud.search.ccvm.
> >
> > HtH,
> > Jason
> >
> > >
> > > Thanks,
> > > Ken
> > >
>
>
>
> --
> -Ken
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20190710/242dc7da/attachment.html>
More information about the Open-ils-dev
mailing list