[ic] [matches] patch?

Chris Kershaw chris at endpoint.com
Fri Dec 10 23:24:03 UTC 2010


Thomas J.M. Burton wrote:
> On 12/10/2010 3:06 PM, Chris Kershaw wrote:
>> Thomas J.M. Burton wrote:
>>> Hi all,
>>>
>>> I was just searching the maillist trying to remember how best to
>>> retrieve the number of matches resulting from a [query] and found
>>> this post by Mike Heins:
>>>
>>> http://www.icdevgroup.org/pipermail/interchange-users/2001-November/014506.html
>>>
>>>
>>>
>>> His suggestion seemed like a good idea and one that apparently isn't
>>> incorporated into the current version of IC. Just wondering if this
>>> might make it into a future release or if something better has been
>>> implemented.
>>>
>>> Thanks,
>>> Tom
>>>
>> Have you tried using type=row_count ?
>>
>> HTH,
>> Chris
>
>
> Isn't using type=row_count only helpful if you just want the row count
> and not the actual data? I need both and don't want to run duplicate
> queries in order to get it, similar to what Mike responded to in the
> post I linked to above.
>
> The question still stands. Next? :)
>
> -Tom

You could use the hashref arg and set the count to some variable. For
example:

[query
     hashref=foo
     ...
]

$Scratch->{count} = scalar @{ $Tmp->{foo} || [] }

Would this help?

Chris


-- 
Chris Kershaw
End Point Corp.
Direct Line: 919-647-9585
Fax: 866-281-1373 
http://www.endpoint.com




More information about the interchange-users mailing list