Yes, there's only limited support for 'or's in the general-query. As
Reagan points out you can do this as two micro-service queries that
then return both sets of results and as Mike C points out the specific-
query can be used for more.
There's also limited support for 'OR's on the same column:
iquest "SELECT DATA_PATH WHERE DATA_PATH like '%x1%' || like '%y2%' ";
will work.
The general-query provides a simplified interface to ICAT SQL queries,
and is used quite a bit in iRODS both internally (server calls) and
via clients (ils, iquest, etc). Callers do not need to know the
structure of the ICAT schema or SQL, and the needed SQL with
appropriate access control conditions is dynamically generated on each
call. But it does not provide the full flexibility of SQL.
As Mike C pointed out, the specific-query is a good alternative in
these cases. The admin can (carefully) define the SQL to be run and
then clients can execute it. You could define the query as you want
and set it up via 'iadmin asq' (add specific query) and then execute
it via 'iquest --sql', for example.
- Wayne -
On Aug 30, 6:19 am, "Conway, Mike" <
michael_con...@unc.edu> wrote:
> Hey Amine,
>
> When you are doing iquest, you are using something called 'General Query', or GenQuery for short. This is an abstraction layer above SQL and has the advantage of having policies applied at invocation time. The drawback is that it is somewhat limited (including the approach of supporting implicit ANDs in queries.
>
> I'm interested to see myself whether any 'OR' facility has been added to GenQuery, and Wayne or Mike may jump in with some insights there. The need for richer queries using the full range of SQL has been a common request, and for this reason Wayne implemented something called 'specific query'. This was also just added to Jargon. There are iadmin commands that a rods admin can use to specify parameterized sql statements under an alias, then one may use iquest with the —sql option to supply this alias and bind parameters. Jargon also has services to maintain, query, and execute these specific queries.
>
> I think specific query might help your use case, it's really an important development for those that maintain rich metadata in iRODS.
>
> Cheers,
> MC
>
> ---------------------
> Mike Conway
> Interface and Java API/Integration Developer –
DICEwww.irods.org
>
> skype:michael.c.conway
> LinkedIn:
http://www.linkedin.com/pub/mike-conway/5/78a/231
>