Re: PyDO1 vs PyDO2 Question:

Jacob Smullyan <[email protected]> Wed, 1 Jun 2005 11:01:12 -0400
Newsgroups gmane.comp.web.skunkweb
Message-ID <[email protected]>
On Wed, Jun 01, 2005 at 04:13:22AM -0700, Juan Carlos Leon wrote:
> One of the limitations that I have right now is to
> write my own raw SQL queries and let PyDO return the
> objects back to me. I use most of the common PyDO1
> functions .getUnique, .getSome(), getSomeWhere(),
> get.TupleWhere, etc? including all the operators.  I
> haven?t played with the latest version of PyDO2 but I
> wish to have the ability to query straight the
> database via PyDO using SQL syntax. Is there any such
> function in the latest version of PyDO2? Would "fetch"
> do that? 

In short, yes.  

Of course, in either version you can always get a cursor and do
whatever sql you want, but if you are getting data you want to put
back into PyDO objects, you used to have to do that manually.  The
fetch method automates that, and enables you to use multiple PyDO
objects and also use other columns that don't get PyDO-ized in the
same queries.  So it is pretty flexible.

Also, in PyDO2, you can pass SQL to getSome() (which coalesces and
replaces all the getTupperware methods), but only for the where clause
and anything after it.

j
-- 
Jacob Smullyan
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCnc24uqamFyFXXLIRAh1UAJ9RtKqFIUrHgXlbeze/JDWQF3pGcQCgqc0W
M0bAEgdpPKfGMn4tYr0sDJ0=
=UQIh
-----END PGP SIGNATURE-----