Teddy you are wrong about having isIN  (you asked :) ) it's on the where object (reactor.query folder to see all supported methods).
 
Reactor doesn't support direct subqueries but you could have something familiar like this.

It's not as performant like having the dbserver doing the job but you at least is compatible with all db reactor supports.
You can always implement custom query's in your custom gateway but here is an example:


<cfset mytraininglist = 0>
<cfset trainingGateway = myreactorFactory.createGateway("training")>
<cfset rs = trainingGateway.getAll()>

<cfif rs.recordcount gt 0>
<cfset mytraininglist = valuelist( rs.userid)>
</cfif>


<cfset appUserGateway = myreactorFactory.createGateway("appuser")>
<cfset query = appUserGateway.createQuery()>
<cfset query.getWhere().isnotin("appuser","userid",mytraininglist)>
<cfset myRecordSet = appUserGateway.getByQuery(query)>

João Fernandes


On 8/9/06, Teddy Payne < [EMAIL PROTECTED]> wrote:
I do not believe that Reactor has a method in the query object for the IN clause, so I would recommend creating a new method in your custom gateway for that object.

If I am wrong about the IN clause, please let me know.

Teddy


On 8/9/06, Ryan Guill < [EMAIL PROTECTED]> wrote:
I dont know how you would do it in reactor, but this may help you find
it, you could rewrite that query with an exception join:

Select appUser.*
from AppUser
Exception Join training
on userid = userid



On 8/9/06, Brad Haas <[EMAIL PROTECTED]> wrote:
>
>
> How would I do this in Reactor:
>
> SELECT AppUser.*
> FROM AppUser
> WHERE UserID NOT IN
>  (SELECT UserID
>  FROM Training)
>
>
> I suspect you'd use some type of outer join, but could someone show me some
> reactor code how to accomplish this?
>
> Thanks,
> Brad
>
>
>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- --
> Reactor for ColdFusion Mailing List
> [email protected]
> Archives at:
> http://www.mail-archive.com/reactor%40doughughes.net/
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- --


--
Ryan Guill
A Deep Blue
[EMAIL PROTECTED]
www.ryanguill.com
(270) 217.2399
got google talk?  Chat me at [EMAIL PROTECTED]

Use CF and SQL? Try qBrowser - http://www.ryanguill.com/docs/

www.ryanguill.com/
The Roman Empire: www.ryanguill.com/blog/


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --




--
<cf_payne />
http://cfpayne.wordpress.com/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to