|
From: <mic...@ya...> - 2004-06-12 23:22:40
|
Hi guys!
First sorry about my 3 identical and consecutive messages, I don't know
why but I was not receiving messages and I think the problem is with my
email, but the sending was ok :)
I read a few days a message talking about random execute of querys on
the database.
I want to execute some complex join, or a plpgsql function and the
return I want to pass to the class (i want to do this in a class
method)...
I search on the history and didn't found. How can I do this?
Example:
class Person(SQLObject):
_connection=conexao
name=StringCol(length=100)
areas=RelatedJoin('Area')
def byArea(self, *elements):
# do something with this query
query='''\
select
p.*
from person p
inner join area_person x on (x.person_id=p.id)
inner join area a on (x.area_d=a.id)
where
a.id in %s
group by
p.id, p.name
''' % tuple(elements))
class Area(SQLObject):
_connection=conexao
name=StringCol(length=100)
people=RelatedJoin('Person')
I want to filter all the people in a determined area, I can't do it
with normal SQLObject aproach, so the only way I found is this way...
I could need to run a plpgsql query in place of the listed, so I wonder
how can I run this query :)
thanks for all help!
=====
--
Michel Thadeu Sabchuk
Curitiba/PR
______________________________________________________________________
Participe da pesquisa global sobre o Yahoo! Mail:
http://br.surveys.yahoo.com/global_mail_survey_br
|