[rt-users] Where does QueryBuilder refer tables?

Ruslan Zakirov ruslan.zakirov at gmail.com
Wed Jul 27 12:09:24 EDT 2005


On 7/27/05, Ahalya_Nathan at mudnebr.com <Ahalya_Nathan at mudnebr.com> wrote:
>  
> Hi Ruslan, 
> The documentation that you gave was very helpful but i am kindoff trying to
> understand this piece of code in the Tickets_Overlay_SQL.pm program., 
>  
>   $self->SUPER::Limit( FIELD           => 'EffectiveId', 
>                      ENTRYAGGREGATOR => 'AND', 
>                      OPERATOR        => '=', 
>                      QUOTEVALUE      => 0, 
>                      VALUE           => 'main.id' 
>  
> Could you tell me how this works? What does "main" imply to be? Is the Limit
> function used for retrieving information from the database. 
Base class where Limit lives is DBIx::SearchBuilder, see its docs.
Limit method limits colection of records with some condition.
In code you quote RT adds condition to Tickets select and select would
be looking something like:
SELECT main.* FROM Tickets main, ... WHERE main.EffectiveId = main.id ...

This is required step when you want select Ticket(s) by some condition
and also tickets that was merged.


>  
> Regards,
>  Ahalya Nathan
>  Senior Programmer / Analyst
>  Information Technology, Metropolitan Utilities District 
>  (402) 449-8218 phone
>  (402) 449-8131 fax
>  ahalya_nathan at mudnebr.com 
>  
>  
>  
>  Ruslan Zakirov <ruslan.zakirov at gmail.com> 
> 
> 07/26/2005 06:11 PM 
>  
> Please respond to
>  Ruslan Zakirov <ruslan.zakirov at gmail.com> 
>  
>  
> To "Ahalya_Nathan at mudnebr.com" <Ahalya_Nathan at mudnebr.com> 
>  
> cc rt-users at lists.bestpractical.com,
> rt-users-bounces at lists.bestpractical.com 
>  
> Subject Re: [rt-users] Where does QueryBuilder refer tables? 
>  
>  
>  
>  
>  
> On 7/27/05, Ahalya_Nathan at mudnebr.com <Ahalya_Nathan at mudnebr.com> wrote:
>  >  
>  > Hi all, 
>  >  
>  > Could anyone tell me how or which program refers tickets or other tables
> to
>  > display the resultset for Query Builder?. I have been trying to figure
> out
>  > how it refers the tables to display the resultset but no luck so far. 
>  >  
>  > It will be very helpful if anyone could give me a suggestion. 
>  http://wiki.bestpractical.com/index.cgi?ObjectModel
>  http://wiki.bestpractical.com/index.cgi?GlobalObjects
>  lib/RT/Tickets*.pm
>  
>  This is only I can say.
>  > 
>  >  
>  >  Regards,
>  >  Ahalya Nathan
>  >  Senior Programmer / Analyst
>  >  Information Technology, Metropolitan Utilities District 
>  >  (402) 449-8218 phone
>  >  (402) 449-8131 fax
>  >  ahalya_nathan at mudnebr.com 
>  > _______________________________________________
>  >
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>  > 
>  > Be sure to check out the RT Wiki at http://wiki.bestpractical.com
>  > 
>  > 
>  
>  
>  -- 
>  Best regards, Ruslan.
>  
>  


-- 
Best regards, Ruslan.



More information about the rt-users mailing list