[OGo-XML-RPC] Multiple Qualifiers

Adam Tauno Williams xmlrpc@opengroupware.org
Wed, 07 Jun 2006 13:53:36 -0400


> Hm, no. I explained how the backend works. The XML-RPC API uses  
> EOQualifier objects. Should look like:
>    server.person.fetch(
>      { "qualifier":     "firstName = 'steve' AND name = 'berns'",
>        "sortOrderings": [ "name", ] });
> Maybe use 'like' instead of '='. Didn't try.

Yep, that is like what I started with.

If I -
result = server.person.fetch(
 {
  "qualifier":     "firstName = 'steve' AND name = 'berns'",
  "sortOrderings" : ["name",],
 });
- I get a : 
xmlrpclib.Fault: <Fault 0: 'UnsupportedQualifierException:
SkyPersonDataSource: EOAnd/OrQualifers are only supported with the
following operators: ( EOQualifierOperatorLike )'>


If I -
result = server.person.fetch(
  {
   "qualifier":     "firstName LIKE 'steve' AND name LIKE 'berns'",
   "sortOrderings" : ["name",],
  });
- I get a :
xmlrpclib.Fault: <Fault 0: "UnsupportedQualifierException:
SkyPersonDataSource: EOKeyValueQualifers are only supported with the
following operators: (EOQualifierOperatorLike,
EOQualifierOperatorEqual): firstName like 'steve'">

Interesting that this doesn't return an error -
result = server.person.fetch(
  {
    "qualifier":     "firstName LIKE '*steve*' AND name LIKE '*berns*'",
    "sortOrderings" : ["name",],
  });
- but it also returns no data.

Neither does this, which I know should match -
result = server.person.fetch(
 {
  "qualifier":     "firstName LIKE '*tev*' AND name LIKE '*ern*'",
  "sortOrderings" : ["name",],
 });


Do you think there might be a bug here?

Bummer.  It seems that, at least for companies (contacts & enterprises)
I can search for just about any value using a fetchSpec, including
extended attributes.  So I put together a Gtk# form so I could do
something like query-by-example... then next/prev around in the results.
It works so long as I only put a value in one field.


That and I'm still getting tweaked by bug#1598 (duplicate comment
fields): http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1598