well 2 options, try ALT + 198 or... just use copy+paste :) it's a nice combo
João Fernandes
On 8/9/06, Brad Haas <[EMAIL PROTECTED]> wrote:
Thanks Joao (is there a character combo on US keyboards so I can put the accented "a" in your name?). I like this solution because it is compatible across databases. I'll give it a try and if it is not a huge performance hit I'll go with it. If its slow, I'll add a query to the gateway.Ryan, I've never seen an exception join--I'll have to look into it.Teddy, you're right about isIn not being in the query object and is only indirectly helpful on the where object in this situation. If performance is key, I think your gateway suggestion is the way to go.Thanks all,Brad
On Aug 9, 2006, at 6:01 PM, Joăo Fernandes wrote: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 FernandesOn 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.
TeddyOn 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/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
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/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
