Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Re: identifierAttributes in sources.xml

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Re: identifierAttributes in sources.xml


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Scott Koranda <>, grouper-users <>
  • Subject: RE: [grouper-users] Re: identifierAttributes in sources.xml
  • Date: Fri, 31 Aug 2012 05:01:43 +0000
  • Accept-language: en-US


> from
> subject s
> where
> {inclause}
> </param-value>
> </param>
> <param>
> <param-name>inclause</param-name>
> <param-value>
> s.subjectid = ?
> </param-value>
> </param>
>
> I take that to mean that the '?' in the value for the inclause
> will be replaced by whatever string is being used for a
> search.
>
> I am guessing that it's a requirement that the '?' has to be
> in the value of the inclause and not in the value for the sql
> or the substitution will not happen.
>
> Is that correct?

Right, basically we want to bulk query for multiple IDs or identifiers, so it
will end up doing:

Query where (s.subjectid = 'abc' or s.subjectid = 'bcd') etc... can query 100
or 200 at a time with bind vars...

>
> I see later, however, this:
>
> <search>
> <searchType>search</searchType>
> <param>

...

> select subjectid from subject where lower(name) like
> concat('%',concat(?,'%')) union
> select subjectid from subjectattribute where searchvalue like
> concat('%',concat(?,'%')))
> </param-value>
> </param>
> </search>
>
> In that example the '?' is not in a inclause but in the value
> for the sql itself.
>
> Why the difference?
>

Right, there is less of a need (or no need?) to bulk search for the freeform
search for subjects as opposed to by ID or Identifier. Also, that query
typically has the bind var used in multiple places since you query multiple
cols for the search, so it is less conducive to the OR'ed "inclause". Ok?
:)

Thanks,
Chris



Archive powered by MHonArc 2.6.16.

Top of Page