I've been looking through the SQLObject documentation, and I can't
seem to find any way to accomplish projection. In particular, I'd like
to be able to accomplish something like this:
prefectures = query("select distinct prefecture from users")
prefecture = chooseFromPrefectures(prefectures)
cities = query("select distinct city from users where
prefecture='"+prefecture"'")
city = chooseFromCities(cities)
usernames = query("select username from users where
prefecture='"+prefecture+"' and city='"+city+"'")
Is there any way of accomplishing this using SQLObject directly? The
syntax Users.select(..., distinct=True) seems to eliminate only tuples
where every field matches.
My second question has to do with row deletion: it's not clear from
the documentation how to remove a row from the table. The only thing I
could think of looked like this:
temp = User.get(4)
del(temp)
It didn't work. What is the proper syntax?
Thanks,
-Peter Goodspeed
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id?845&op,ick
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@???
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss