Em Terça 23 Maio 2006 07:36, Kevin Dangoor escreveu:
>
> Yeah, this should definitely be done with SQL. You're only doing a
> single join, so it seems like it should be doable with SQLObject.

It is doable.  The solution I posted worked but just for instantiated data.  
Also, this algorithm could be changed a little so that it becomes more 
efficient, even for this unefficient code. :-)

My original idea here was to fetch all users and check if there's some 
visit_key still active for them.  If I worked the other way -- fetched active 
visit_keys and then looked for users -- it would be better.

But, nothing as fast and as efficient as a view or a stored procedure, of 
course... 

> Were you unable to retrieve the TG_Visit *class* or the TG_Visit data?
> It seems like you should be able to use that existing one.

*class*.  I couldn't find what to import, but then I found it later.  Sorry 
for not updating this post.  I had identity on my mind and was trying to 
import "turbogears.visit.soprovider" instead of "turbogears.visit.sovisit".  
Yes, I was reading the directory listing.  And yes, I read it wrong (Alberto, 
if you say something about blindness you'd better start using protection on 
your pants! ;-)).  Importing from the correct module works :-)  (Too bad, we 
should open a ticket for TG 2.0 to make self-fixing code based on 
mind-reading...  I bet it would rock ;-))

-- 
Jorge Godoy      <[EMAIL PROTECTED]>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk
-~----------~----~----~----~------~----~------~--~---

Reply via email to