sqlobject-cvs Mailing List for SQLObject (Page 150)
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
(9) |
Apr
(74) |
May
(29) |
Jun
(16) |
Jul
(28) |
Aug
(10) |
Sep
(57) |
Oct
(9) |
Nov
(29) |
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(7) |
Feb
(14) |
Mar
(6) |
Apr
(3) |
May
(12) |
Jun
(34) |
Jul
(9) |
Aug
(29) |
Sep
(22) |
Oct
(2) |
Nov
(15) |
Dec
(52) |
| 2005 |
Jan
(47) |
Feb
(78) |
Mar
(14) |
Apr
(35) |
May
(33) |
Jun
(16) |
Jul
(26) |
Aug
(63) |
Sep
(40) |
Oct
(96) |
Nov
(96) |
Dec
(123) |
| 2006 |
Jan
(159) |
Feb
(144) |
Mar
(64) |
Apr
(31) |
May
(88) |
Jun
(48) |
Jul
(16) |
Aug
(64) |
Sep
(87) |
Oct
(92) |
Nov
(56) |
Dec
(76) |
| 2007 |
Jan
(94) |
Feb
(103) |
Mar
(126) |
Apr
(123) |
May
(85) |
Jun
(11) |
Jul
(130) |
Aug
(47) |
Sep
(65) |
Oct
(70) |
Nov
(12) |
Dec
(11) |
| 2008 |
Jan
(30) |
Feb
(55) |
Mar
(88) |
Apr
(20) |
May
(50) |
Jun
|
Jul
(38) |
Aug
(1) |
Sep
(9) |
Oct
(5) |
Nov
(6) |
Dec
(39) |
| 2009 |
Jan
(8) |
Feb
(16) |
Mar
(3) |
Apr
(33) |
May
(44) |
Jun
(1) |
Jul
(10) |
Aug
(33) |
Sep
(74) |
Oct
(22) |
Nov
|
Dec
(15) |
| 2010 |
Jan
(28) |
Feb
(22) |
Mar
(46) |
Apr
(29) |
May
(1) |
Jun
(1) |
Jul
(27) |
Aug
(8) |
Sep
(5) |
Oct
(33) |
Nov
(24) |
Dec
(41) |
| 2011 |
Jan
(4) |
Feb
(12) |
Mar
(35) |
Apr
(29) |
May
(19) |
Jun
(16) |
Jul
(32) |
Aug
(25) |
Sep
(5) |
Oct
(11) |
Nov
(21) |
Dec
(12) |
| 2012 |
Jan
(3) |
Feb
(4) |
Mar
(20) |
Apr
(4) |
May
(25) |
Jun
(13) |
Jul
|
Aug
|
Sep
(2) |
Oct
(25) |
Nov
(9) |
Dec
(1) |
| 2013 |
Jan
(6) |
Feb
(8) |
Mar
|
Apr
(10) |
May
(31) |
Jun
(7) |
Jul
(18) |
Aug
(33) |
Sep
(4) |
Oct
(16) |
Nov
|
Dec
(27) |
| 2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
(11) |
May
(39) |
Jun
(8) |
Jul
(11) |
Aug
(4) |
Sep
|
Oct
(27) |
Nov
|
Dec
(71) |
| 2015 |
Jan
(17) |
Feb
(47) |
Mar
(33) |
Apr
|
May
|
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(8) |
| 2016 |
Jan
(4) |
Feb
(4) |
Mar
|
Apr
|
May
(12) |
Jun
(7) |
Jul
(9) |
Aug
(31) |
Sep
(8) |
Oct
(3) |
Nov
(15) |
Dec
(1) |
| 2017 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(8) |
May
(10) |
Jun
(4) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(8) |
Nov
(4) |
Dec
(5) |
| 2018 |
Jan
(2) |
Feb
(8) |
Mar
|
Apr
(4) |
May
|
Jun
(6) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
(1) |
Feb
(16) |
Mar
(1) |
Apr
(3) |
May
(5) |
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
| 2021 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(1) |
Nov
(1) |
Dec
(4) |
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
|
| 2024 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(9) |
| 2025 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
(2) |
|
From: SourceForge.net <no...@so...> - 2005-12-07 19:27:20
|
Bugs item #1375617, was opened at 2005-12-07 13:27 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1375617&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: SQLObject release (specify) Status: Open Resolution: None Priority: 5 Submitted By: Aaron Swartz (aaronsw) Assigned to: Nobody/Anonymous (nobody) Summary: Unicode queries choke Initial Comment: Using SQLObject 0.7rc1: >>> db.Item.select(db.Item.q.title == u'foo').count() [...] TypeError: argument 1 must be str, not unicode ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1375617&group_id=74338 |
|
From: <sub...@co...> - 2005-12-07 18:32:53
|
Author: ianb Date: 2005-12-07 18:32:45 +0000 (Wed, 07 Dec 2005) New Revision: 1368 Modified: SQLObject/docs/index.comments.txt Log: Web updates Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2005-12-07 18:01:47 UTC (rev 1367) +++ SQLObject/docs/index.comments.txt 2005-12-07 18:32:45 UTC (rev 1368) @@ -1,9 +0,0 @@ -==== $(content) c ----------------------------------------- -date: 2005-12-06T21:06:44 -email: ia...@co... -id: 1 -ip: 64.81.225.227 -username: Ian Bicking - -Comment on me! Double click on any element to leave a comment here. |
|
From: <sub...@co...> - 2005-12-07 18:01:58
|
Author: ianb Date: 2005-12-07 18:01:47 +0000 (Wed, 07 Dec 2005) New Revision: 1367 Modified: SQLObject/docs/SQLObject.comments.txt Log: Web updates Modified: SQLObject/docs/SQLObject.comments.txt =================================================================== --- SQLObject/docs/SQLObject.comments.txt 2005-12-07 17:55:09 UTC (rev 1366) +++ SQLObject/docs/SQLObject.comments.txt 2005-12-07 18:01:47 UTC (rev 1367) @@ -41,12 +41,3 @@ username: Mike Kent So if you declare a column as an alternateID, unique is implied, and we don't need to explicitly declare it? -==== $(using-the-class) c ++++ c ++ ----------------------------------------- -date: 2005-12-07T10:55:08 -email: web...@co... -id: 6 -ip: 68.104.53.190 -username: Michael Bernstein - -Does this mean that the db schema can't be introspected by other tools to see the constraints? |
|
From: <sub...@co...> - 2005-12-07 17:55:19
|
Author: ianb Date: 2005-12-07 17:55:09 +0000 (Wed, 07 Dec 2005) New Revision: 1366 Modified: SQLObject/docs/SQLObject.comments.txt Log: Web updates Modified: SQLObject/docs/SQLObject.comments.txt =================================================================== --- SQLObject/docs/SQLObject.comments.txt 2005-12-07 16:29:14 UTC (rev 1365) +++ SQLObject/docs/SQLObject.comments.txt 2005-12-07 17:55:09 UTC (rev 1366) @@ -41,3 +41,12 @@ username: Mike Kent So if you declare a column as an alternateID, unique is implied, and we don't need to explicitly declare it? +==== $(using-the-class) c ++++ c ++ +---------------------------------------- +date: 2005-12-07T10:55:08 +email: web...@co... +id: 6 +ip: 68.104.53.190 +username: Michael Bernstein + +Does this mean that the db schema can't be introspected by other tools to see the constraints? |
|
From: <sub...@co...> - 2005-12-07 16:29:33
|
Author: ianb Date: 2005-12-07 16:29:14 +0000 (Wed, 07 Dec 2005) New Revision: 1365 Modified: SQLObject/docs/index.comments.txt Log: Web updates Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2005-12-07 16:14:34 UTC (rev 1364) +++ SQLObject/docs/index.comments.txt 2005-12-07 16:29:14 UTC (rev 1365) @@ -7,11 +7,3 @@ username: Ian Bicking Comment on me! Double click on any element to leave a comment here. -==== $(start) c + ----------------------------------------- -date: 2005-12-07T09:14:34 -id: 2 -ip: 81.57.124.105 -username: erwan - -comment works gretz |
|
From: <sub...@co...> - 2005-12-07 16:14:45
|
Author: ianb Date: 2005-12-07 16:14:34 +0000 (Wed, 07 Dec 2005) New Revision: 1364 Modified: SQLObject/docs/index.comments.txt Log: Web updates Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2005-12-07 16:01:13 UTC (rev 1363) +++ SQLObject/docs/index.comments.txt 2005-12-07 16:14:34 UTC (rev 1364) @@ -7,3 +7,11 @@ username: Ian Bicking Comment on me! Double click on any element to leave a comment here. +==== $(start) c + +---------------------------------------- +date: 2005-12-07T09:14:34 +id: 2 +ip: 81.57.124.105 +username: erwan + +comment works gretz |
|
From: <sub...@co...> - 2005-12-07 16:01:27
|
Author: ianb Date: 2005-12-07 16:01:13 +0000 (Wed, 07 Dec 2005) New Revision: 1363 Modified: SQLObject/docs/SQLObject.comments.txt Log: Web updates Modified: SQLObject/docs/SQLObject.comments.txt =================================================================== --- SQLObject/docs/SQLObject.comments.txt 2005-12-07 16:00:19 UTC (rev 1362) +++ SQLObject/docs/SQLObject.comments.txt 2005-12-07 16:01:13 UTC (rev 1363) @@ -41,12 +41,3 @@ username: Mike Kent So if you declare a column as an alternateID, unique is implied, and we don't need to explicitly declare it? -==== $(declaring-the-class) c ++++++++++++++++++++ ----------------------------------------- -date: 2005-12-07T09:00:19 -email: jo...@th... -id: 6 -ip: 216.18.53.90 -username: Jos - -this sucks! |
|
From: <sub...@co...> - 2005-12-07 16:00:33
|
Author: ianb Date: 2005-12-07 16:00:19 +0000 (Wed, 07 Dec 2005) New Revision: 1362 Modified: SQLObject/docs/SQLObject.comments.txt Log: Web updates Modified: SQLObject/docs/SQLObject.comments.txt =================================================================== --- SQLObject/docs/SQLObject.comments.txt 2005-12-07 15:58:34 UTC (rev 1361) +++ SQLObject/docs/SQLObject.comments.txt 2005-12-07 16:00:19 UTC (rev 1362) @@ -41,3 +41,12 @@ username: Mike Kent So if you declare a column as an alternateID, unique is implied, and we don't need to explicitly declare it? +==== $(declaring-the-class) c ++++++++++++++++++++ +---------------------------------------- +date: 2005-12-07T09:00:19 +email: jo...@th... +id: 6 +ip: 216.18.53.90 +username: Jos + +this sucks! |
|
From: <sub...@co...> - 2005-12-07 15:58:36
|
Author: ianb Date: 2005-12-07 15:58:34 +0000 (Wed, 07 Dec 2005) New Revision: 1361 Modified: SQLObject/docs/SQLObject.comments.txt Log: Web updates Modified: SQLObject/docs/SQLObject.comments.txt =================================================================== --- SQLObject/docs/SQLObject.comments.txt 2005-12-07 15:58:11 UTC (rev 1360) +++ SQLObject/docs/SQLObject.comments.txt 2005-12-07 15:58:34 UTC (rev 1361) @@ -41,12 +41,3 @@ username: Mike Kent So if you declare a column as an alternateID, unique is implied, and we don't need to explicitly declare it? -==== $(introduction) c + ----------------------------------------- -date: 2005-12-07T08:58:11 -email: jo...@th... -id: 6 -ip: 216.18.53.90 -username: Jos - -just a quick test, seems way cool. |
|
From: <sub...@co...> - 2005-12-07 15:58:18
|
Author: ianb Date: 2005-12-07 15:58:11 +0000 (Wed, 07 Dec 2005) New Revision: 1360 Modified: SQLObject/docs/SQLObject.comments.txt Log: Web updates Modified: SQLObject/docs/SQLObject.comments.txt =================================================================== --- SQLObject/docs/SQLObject.comments.txt 2005-12-07 15:52:14 UTC (rev 1359) +++ SQLObject/docs/SQLObject.comments.txt 2005-12-07 15:58:11 UTC (rev 1360) @@ -41,3 +41,12 @@ username: Mike Kent So if you declare a column as an alternateID, unique is implied, and we don't need to explicitly declare it? +==== $(introduction) c + +---------------------------------------- +date: 2005-12-07T08:58:11 +email: jo...@th... +id: 6 +ip: 216.18.53.90 +username: Jos + +just a quick test, seems way cool. |
|
From: <sub...@co...> - 2005-12-07 15:52:22
|
Author: ianb Date: 2005-12-07 15:52:14 +0000 (Wed, 07 Dec 2005) New Revision: 1359 Modified: SQLObject/docs/SQLObject.comments.txt Log: Web updates Modified: SQLObject/docs/SQLObject.comments.txt =================================================================== --- SQLObject/docs/SQLObject.comments.txt 2005-12-07 15:46:23 UTC (rev 1358) +++ SQLObject/docs/SQLObject.comments.txt 2005-12-07 15:52:14 UTC (rev 1359) @@ -32,3 +32,12 @@ username: Mike Kent If I have this correctly: For a one-to-many relationship, you use 'ForeignKey' on the 'has one' side, and you use 'MultipleJoin' on the 'has many' side. I found this to be incredibly non-intuitive and confusing. How about 'hasOneOf' and 'hasManyOf'? Or would this cause a problem with a many-to-many relationship, since both sides would use 'hasManyOf'? +==== $(col-class-specifying-columns) c ++ c +++++ c +---------------------------------------- +date: 2005-12-07T08:52:14 +email: mk...@em... +id: 5 +ip: 208.255.226.178 +username: Mike Kent + +So if you declare a column as an alternateID, unique is implied, and we don't need to explicitly declare it? |
|
From: <sub...@co...> - 2005-12-07 15:46:27
|
Author: ianb Date: 2005-12-07 15:46:23 +0000 (Wed, 07 Dec 2005) New Revision: 1358 Modified: SQLObject/docs/SQLObject.comments.txt Log: Web updates Modified: SQLObject/docs/SQLObject.comments.txt =================================================================== --- SQLObject/docs/SQLObject.comments.txt 2005-12-07 15:36:46 UTC (rev 1357) +++ SQLObject/docs/SQLObject.comments.txt 2005-12-07 15:46:23 UTC (rev 1358) @@ -23,3 +23,12 @@ username: Mike Kent It's probably just me, but I'm finding this part quite confusing. You'd use a left join to join two tables together, but this example refers to THREE tables, MyTable, Table1, and Table2. I haven't been able to grasp what's going on. +==== $(one-to-many-relationships) c ++++ +---------------------------------------- +date: 2005-12-07T08:46:22 +email: mk...@em... +id: 4 +ip: 208.255.226.178 +username: Mike Kent + +If I have this correctly: For a one-to-many relationship, you use 'ForeignKey' on the 'has one' side, and you use 'MultipleJoin' on the 'has many' side. I found this to be incredibly non-intuitive and confusing. How about 'hasOneOf' and 'hasManyOf'? Or would this cause a problem with a many-to-many relationship, since both sides would use 'hasManyOf'? |
|
From: <sub...@co...> - 2005-12-07 15:37:01
|
Author: ianb Date: 2005-12-07 15:36:46 +0000 (Wed, 07 Dec 2005) New Revision: 1357 Modified: SQLObject/docs/SQLObject.comments.txt Log: Web updates Modified: SQLObject/docs/SQLObject.comments.txt =================================================================== --- SQLObject/docs/SQLObject.comments.txt 2005-12-07 14:48:56 UTC (rev 1356) +++ SQLObject/docs/SQLObject.comments.txt 2005-12-07 15:36:46 UTC (rev 1357) @@ -14,3 +14,12 @@ username: Mike Kent To clarify a bit: There can be multple Person instances in memory at the same time. If you ask for two different Person IDs, you get references to two different Person instances. If you ask for the same Person ID multiple times, you get multiple references to the same Person instance. +==== $(left-join-and-other-joins) c ++ +---------------------------------------- +date: 2005-12-07T08:36:44 +email: mk...@em... +id: 3 +ip: 208.255.226.178 +username: Mike Kent + +It's probably just me, but I'm finding this part quite confusing. You'd use a left join to join two tables together, but this example refers to THREE tables, MyTable, Table1, and Table2. I haven't been able to grasp what's going on. |
|
From: <sub...@co...> - 2005-12-07 14:49:08
|
Author: ianb Date: 2005-12-07 14:48:56 +0000 (Wed, 07 Dec 2005) New Revision: 1356 Modified: SQLObject/docs/SQLObject.comments.txt Log: Web updates Modified: SQLObject/docs/SQLObject.comments.txt =================================================================== --- SQLObject/docs/SQLObject.comments.txt 2005-12-07 13:57:15 UTC (rev 1355) +++ SQLObject/docs/SQLObject.comments.txt 2005-12-07 14:48:56 UTC (rev 1356) @@ -5,3 +5,12 @@ ip: 210.212.228.8 s/GNU General Public License/GNU Lesser General Public License +==== $(using-the-class) c +++++++++++ +---------------------------------------- +date: 2005-12-07T07:48:55 +email: mk...@em... +id: 2 +ip: 208.255.226.178 +username: Mike Kent + +To clarify a bit: There can be multple Person instances in memory at the same time. If you ask for two different Person IDs, you get references to two different Person instances. If you ask for the same Person ID multiple times, you get multiple references to the same Person instance. |
|
From: <sub...@co...> - 2005-12-07 13:57:29
|
Author: ianb Date: 2005-12-07 13:57:15 +0000 (Wed, 07 Dec 2005) New Revision: 1355 Added: SQLObject/docs/SQLObject.comments.txt Log: Web updates Added: SQLObject/docs/SQLObject.comments.txt =================================================================== --- SQLObject/docs/SQLObject.comments.txt 2005-12-07 13:43:45 UTC (rev 1354) +++ SQLObject/docs/SQLObject.comments.txt 2005-12-07 13:57:15 UTC (rev 1355) @@ -0,0 +1,7 @@ +==== $(author-site-and-license) c +++ +---------------------------------------- +date: 2005-12-07T06:57:14 +id: 1 +ip: 210.212.228.8 + +s/GNU General Public License/GNU Lesser General Public License |
|
From: <sub...@co...> - 2005-12-07 13:43:53
|
Author: ianb Date: 2005-12-07 13:43:45 +0000 (Wed, 07 Dec 2005) New Revision: 1354 Modified: SQLObject/docs/index.comments.txt Log: Web updates Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2005-12-07 04:29:19 UTC (rev 1353) +++ SQLObject/docs/index.comments.txt 2005-12-07 13:43:45 UTC (rev 1354) @@ -6,4 +6,4 @@ ip: 64.81.225.227 username: Ian Bicking -Comment on me! Double click on any element to leave a comment here. +Comment on me! Double click on any element to leave a comment here. |
|
From: SourceForge.net <no...@so...> - 2005-12-07 11:42:13
|
Bugs item #1374419, was opened at 2005-12-06 04:35 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1374419&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Postgres Group: SQLObject from repository Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: ProgrammingError in _queryInsertID Initial Comment: Hi, i'm using SQLObject packaged with TurboGears on an existing PostgreSQL DB with the primary_key beeing a string. My model.py: -------------------------- [...] class Authreg(SQLObject): class sqlmeta: idType= StringType idName = "username" username = StringCol(alternateID = True) [...] -------------------------- Versions: The latest SQLObject from repository ('cause of the idType opportunity), python 2.4.2, PostgreSQL 7.4.9. Accessing the existing entrys works fine, changing those, too. Creating a new entry results in the following traceback. It seems, that SQLObject tries to receive a sequence from the DB although the primary_key is a StringType. Traceback: -------------------------- Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py", line 271, in run main() File "/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py", line 502, in main body = page_handler(*args, **cherrypy.request.paramMap) File "/usr/lib/python2.4/site-packages/TurboGears-0.8a4-py2.4.egg/turbogears/controllers.py", line 121, in newfunc output = func(self, *args, **kw) File "/home/project/foo/bla/bla/controllers.py", line 86, in change hash=new_hash) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1346-py2.4.egg/sqlobject/main.py", line 1248, in __init__ self._create(id, **kw) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1346-py2.4.egg/sqlobject/main.py", line 1277, in _create self._SO_finishCreate(id) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1346-py2.4.egg/sqlobject/main.py", line 1301, in _SO_finishCreate id, names, values) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1346-py2.4.egg/sqlobject/dbconnection.py", line 802, in queryInsertID return self._dbConnection._queryInsertID( File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1346-py2.4.egg/sqlobject/postgres/pgconnection.py", line 122, in _queryInsertID c.execute("SELECT NEXTVAL('%s')" % sequenceName) ProgrammingError: ERROR: relation "authreg_username_seq" does not exist SELECT NEXTVAL('authreg_username_seq') -------------------------- Ruben Lang ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-12-07 03:42 Message: Logged In: NO Hi, i think i know my fault. I'm using non-integer keys, and i'm not passing the id keyword to the constructor, instead i passed username (since this is my column used as key). Now i got to redesign a few things. Sorry for bothering you, Ruben Lang ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1374419&group_id=74338 |
|
From: <sub...@co...> - 2005-12-07 04:29:30
|
Author: ianb Date: 2005-12-07 04:29:19 +0000 (Wed, 07 Dec 2005) New Revision: 1353 Modified: SQLObject/docs/index.comments.txt Log: Web updates Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2005-12-07 04:07:22 UTC (rev 1352) +++ SQLObject/docs/index.comments.txt 2005-12-07 04:29:19 UTC (rev 1353) @@ -6,4 +6,4 @@ ip: 64.81.225.227 username: Ian Bicking -Comment on me! Double click on any element to leave a comment here. +Comment on me! Double click on any element to leave a comment here. |
|
From: <sub...@co...> - 2005-12-07 04:07:30
|
Author: ianb Date: 2005-12-07 04:07:22 +0000 (Wed, 07 Dec 2005) New Revision: 1352 Added: SQLObject/docs/index.comments.txt Log: Web Updates Added: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2005-12-06 16:47:42 UTC (rev 1351) +++ SQLObject/docs/index.comments.txt 2005-12-07 04:07:22 UTC (rev 1352) @@ -0,0 +1,9 @@ +==== $(content) c +---------------------------------------- +date: 2005-12-06T21:06:44 +email: ia...@co... +id: 1 +ip: 64.81.225.227 +username: Ian Bicking + +Comment on me! Double click on any element to leave a comment here. |
|
From: <sub...@co...> - 2005-12-06 16:47:51
|
Author: phd
Date: 2005-12-06 16:47:42 +0000 (Tue, 06 Dec 2005)
New Revision: 1351
Modified:
home/phd/SQLObject/paramstyles/sqlobject/joins.py
Log:
Merged patches from the revisions 1348:1350 from the trunk: a patch by Randall Smith <ra...@tn...> to fix .select().filter().
Modified: home/phd/SQLObject/paramstyles/sqlobject/joins.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/joins.py 2005-12-06 16:46:24 UTC (rev 1350)
+++ home/phd/SQLObject/paramstyles/sqlobject/joins.py 2005-12-06 16:47:42 UTC (rev 1351)
@@ -224,15 +224,18 @@
'otherCol' : self.otherColumn,
'idValue' : inst.id,
}
- results = self.otherClass.select('''\
+ clause = '''\
%(otherTable)s.%(otherID)s = %(interTable)s.%(otherCol)s and
%(interTable)s.%(joinCol)s = %(table)s.%(ID)s and
-%(table)s.%(ID)s = %(idValue)s''' % options, clauseTables=(
- options['table'],
- options['otherTable'],
- options['interTable'],
- ))
- # TODO (michelts), apply order by on the selection
+%(table)s.%(ID)s = %(idValue)s''' % options
+ results = self.otherClass.select(sqlbuilder.SQLConstant(clause),
+ clauseTables=(
+ options['table'],
+ options['otherTable'],
+ options['interTable'],
+ )
+ )
+ # TODO (michelts): apply orderBy on the selection
return results
class SQLRelatedJoin(RelatedJoin):
|
|
From: <sub...@co...> - 2005-12-06 16:46:31
|
Author: phd
Date: 2005-12-06 16:46:24 +0000 (Tue, 06 Dec 2005)
New Revision: 1350
Modified:
SQLObject/branches/0.7-bugfix/sqlobject/joins.py
Log:
Merged revs 1348:1349: a patch by Randall Smith <ra...@tn...> to fix .select().filter().
Modified: SQLObject/branches/0.7-bugfix/sqlobject/joins.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/joins.py 2005-12-06 16:45:39 UTC (rev 1349)
+++ SQLObject/branches/0.7-bugfix/sqlobject/joins.py 2005-12-06 16:46:24 UTC (rev 1350)
@@ -222,15 +222,18 @@
'otherCol' : self.otherColumn,
'idValue' : inst.id,
}
- results = self.otherClass.select('''\
+ clause = '''\
%(otherTable)s.%(otherID)s = %(interTable)s.%(otherCol)s and
%(interTable)s.%(joinCol)s = %(table)s.%(ID)s and
-%(table)s.%(ID)s = %(idValue)s''' % options, clauseTables=(
- options['table'],
- options['otherTable'],
- options['interTable'],
- ))
- # TODO (michelts), apply order by on the selection
+%(table)s.%(ID)s = %(idValue)s''' % options
+ results = self.otherClass.select(sqlbuilder.SQLConstant(clause),
+ clauseTables=(
+ options['table'],
+ options['otherTable'],
+ options['interTable'],
+ )
+ )
+ # TODO (michelts): apply orderBy on the selection
return results
class SQLRelatedJoin(RelatedJoin):
|
|
From: <sub...@co...> - 2005-12-06 16:45:45
|
Author: phd
Date: 2005-12-06 16:45:39 +0000 (Tue, 06 Dec 2005)
New Revision: 1349
Modified:
SQLObject/trunk/sqlobject/joins.py
Log:
A patch by Randall Smith <ra...@tn...> to fix .select().filter().
Modified: SQLObject/trunk/sqlobject/joins.py
===================================================================
--- SQLObject/trunk/sqlobject/joins.py 2005-12-05 19:38:20 UTC (rev 1348)
+++ SQLObject/trunk/sqlobject/joins.py 2005-12-06 16:45:39 UTC (rev 1349)
@@ -224,15 +224,18 @@
'otherCol' : self.otherColumn,
'idValue' : inst.id,
}
- results = self.otherClass.select('''\
+ clause = '''\
%(otherTable)s.%(otherID)s = %(interTable)s.%(otherCol)s and
%(interTable)s.%(joinCol)s = %(table)s.%(ID)s and
-%(table)s.%(ID)s = %(idValue)s''' % options, clauseTables=(
- options['table'],
- options['otherTable'],
- options['interTable'],
- ))
- # TODO (michelts), apply order by on the selection
+%(table)s.%(ID)s = %(idValue)s''' % options
+ results = self.otherClass.select(sqlbuilder.SQLConstant(clause),
+ clauseTables=(
+ options['table'],
+ options['otherTable'],
+ options['interTable'],
+ )
+ )
+ # TODO (michelts): apply orderBy on the selection
return results
class SQLRelatedJoin(RelatedJoin):
|
|
From: SourceForge.net <no...@so...> - 2005-12-06 16:34:43
|
Bugs item #1374599, was opened at 2005-12-06 17:34 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1374599&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: SQLite Group: SQLObject release (specify) Status: Open Resolution: None Priority: 5 Submitted By: dvd (dvd-00) Assigned to: Nobody/Anonymous (nobody) Summary: no such column with 0.7.0 Initial Comment: I'm tring SQLObject (v 0.7.0 easy-install) this is my first try: **************************************************** import sqlobject as _s class Projects(_s.SQLObject): project = _s.StringCol() flags = _s.MultipleJoin('ProjectFlags') sources = _s.MultipleJoin('ProjectSources') @staticmethod def newProject(pjname, **kwd): x = Projects(project=pjname) for name, value in kwd.items(): ProjectFlags(project=x, name=name, value=value) return x class ProjectFlags(_s.SQLObject): project = _s.ForeignKey('Projects') name = _s.StringCol() value = _s.StringCol() import os.path db_filename = os.path.abspath('xxx.db') connection = _s.connectionForURI("sqlite:/:memory:") _s.sqlhub.processConnection = connection Projects.createTable() ProjectFlags.createTable() Projects.newProject("project01", fiter="*.tiff", max_iso=4700) p = Projects.get(1) print p print p.flags **************************************************** the last line raise: pysqlite2.dbapi2.OperationalError: no such column: projects_id all works fine if I change the ProjectFlags attribute "project" in "projects" Is this the normal behavior? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1374599&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2005-12-06 12:35:39
|
Bugs item #1374419, was opened at 2005-12-06 04:35 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1374419&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Postgres Group: SQLObject from repository Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: ProgrammingError in _queryInsertID Initial Comment: Hi, i'm using SQLObject packaged with TurboGears on an existing PostgreSQL DB with the primary_key beeing a string. My model.py: -------------------------- [...] class Authreg(SQLObject): class sqlmeta: idType= StringType idName = "username" username = StringCol(alternateID = True) [...] -------------------------- Versions: The latest SQLObject from repository ('cause of the idType opportunity), python 2.4.2, PostgreSQL 7.4.9. Accessing the existing entrys works fine, changing those, too. Creating a new entry results in the following traceback. It seems, that SQLObject tries to receive a sequence from the DB although the primary_key is a StringType. Traceback: -------------------------- Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py", line 271, in run main() File "/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py", line 502, in main body = page_handler(*args, **cherrypy.request.paramMap) File "/usr/lib/python2.4/site-packages/TurboGears-0.8a4-py2.4.egg/turbogears/controllers.py", line 121, in newfunc output = func(self, *args, **kw) File "/home/project/foo/bla/bla/controllers.py", line 86, in change hash=new_hash) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1346-py2.4.egg/sqlobject/main.py", line 1248, in __init__ self._create(id, **kw) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1346-py2.4.egg/sqlobject/main.py", line 1277, in _create self._SO_finishCreate(id) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1346-py2.4.egg/sqlobject/main.py", line 1301, in _SO_finishCreate id, names, values) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1346-py2.4.egg/sqlobject/dbconnection.py", line 802, in queryInsertID return self._dbConnection._queryInsertID( File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1346-py2.4.egg/sqlobject/postgres/pgconnection.py", line 122, in _queryInsertID c.execute("SELECT NEXTVAL('%s')" % sequenceName) ProgrammingError: ERROR: relation "authreg_username_seq" does not exist SELECT NEXTVAL('authreg_username_seq') -------------------------- Ruben Lang ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1374419&group_id=74338 |
|
From: <sub...@co...> - 2005-12-05 19:38:24
|
Author: phd
Date: 2005-12-05 19:38:20 +0000 (Mon, 05 Dec 2005)
New Revision: 1348
Modified:
home/phd/SQLObject/paramstyles/sqlobject/joins.py
home/phd/SQLObject/paramstyles/sqlobject/tests/test_csvexport.py
Log:
Merged patches from the revisions 1343:1346 from the trunk
Modified: home/phd/SQLObject/paramstyles/sqlobject/joins.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/joins.py 2005-12-05 19:35:11 UTC (rev 1347)
+++ home/phd/SQLObject/paramstyles/sqlobject/joins.py 2005-12-05 19:38:20 UTC (rev 1348)
@@ -248,8 +248,15 @@
SOMultipleJoin.__init__(self, **kw)
def performJoin(self, inst):
+ if inst.sqlmeta._perConnection:
+ conn = inst._connection
+ else:
+ conn = None
pythonColumn = self.soClass.sqlmeta.style.dbColumnToPythonAttr(self.joinColumn)
- results = self.otherClass.select(getattr(self.otherClass.q, pythonColumn) == inst.id)
+ results = self.otherClass.select(
+ getattr(self.otherClass.q, pythonColumn) == inst.id,
+ connection=conn
+ )
if results.count() == 0:
if not self.makeDefault:
return None
Modified: home/phd/SQLObject/paramstyles/sqlobject/tests/test_csvexport.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/tests/test_csvexport.py 2005-12-05 19:35:11 UTC (rev 1347)
+++ home/phd/SQLObject/paramstyles/sqlobject/tests/test_csvexport.py 2005-12-05 19:38:20 UTC (rev 1348)
@@ -16,7 +16,7 @@
print s
assert result.strip() == s.strip()
-class Simple(SQLObject):
+class SimpleCSV(SQLObject):
name = StringCol()
address = StringCol()
@@ -24,8 +24,8 @@
hidden = StringCol()
hidden.noCSV = True
-class Complex(SQLObject):
-
+class ComplexCSV(SQLObject):
+
fname = StringCol()
lname = StringCol()
age = IntCol()
@@ -36,55 +36,55 @@
return self.fname + ' ' + self.lname
def _get_initials(self):
return self.fname[0] + self.lname[0]
-
+
def test_simple():
- setupClass(Simple)
- Simple(name='Bob', address='432W', hidden='boo')
- Simple(name='Joe', address='123W', hidden='arg')
+ setupClass(SimpleCSV)
+ SimpleCSV(name='Bob', address='432W', hidden='boo')
+ SimpleCSV(name='Joe', address='123W', hidden='arg')
assert_export("""\
name,Street Address
Bob,432W
Joe,123W
-""", Simple, orderBy='name')
+""", SimpleCSV, orderBy='name')
assert_export("""\
name,Street Address
Joe,123W
Bob,432W
-""", Simple, orderBy='address')
+""", SimpleCSV, orderBy='address')
assert_export("""\
name,Street Address
Joe,123W
-""", Simple.selectBy(name='Joe'))
-
+""", SimpleCSV.selectBy(name='Joe'))
+
def test_complex():
- setupClass(Complex)
- Complex(fname='John', lname='Doe', age=40)
- Complex(fname='Bob', lname='Dylan', age=60)
- Complex(fname='Harriet', lname='Tubman', age=160)
+ setupClass(ComplexCSV)
+ ComplexCSV(fname='John', lname='Doe', age=40)
+ ComplexCSV(fname='Bob', lname='Dylan', age=60)
+ ComplexCSV(fname='Harriet', lname='Tubman', age=160)
assert_export("""\
Full Name,fname,lname,age,initials
John Doe,John,Doe,40,JD
Bob Dylan,Bob,Dylan,60,BD
Harriet Tubman,Harriet,Tubman,160,HT
-""", Complex, orderBy='lname')
+""", ComplexCSV, orderBy='lname')
assert_export("""\
Full Name,fname,lname,age,initials
Bob Dylan,Bob,Dylan,60,BD
John Doe,John,Doe,40,JD
-""", Complex.select(Complex.q.lname.startswith('D'), orderBy='fname'))
+""", ComplexCSV.select(ComplexCSV.q.lname.startswith('D'), orderBy='fname'))
def test_zip():
# Just exercise tests, doesn't actually test results
- setupClass(Simple)
- Simple(name='Bob', address='432W', hidden='boo')
- Simple(name='Joe', address='123W', hidden='arg')
-
- setupClass(Complex)
- Complex(fname='John', lname='Doe', age=40)
- Complex(fname='Bob', lname='Dylan', age=60)
- Complex(fname='Harriet', lname='Tubman', age=160)
- s = export_csv_zip([Simple, Complex])
+ setupClass(SimpleCSV)
+ SimpleCSV(name='Bob', address='432W', hidden='boo')
+ SimpleCSV(name='Joe', address='123W', hidden='arg')
+
+ setupClass(ComplexCSV)
+ ComplexCSV(fname='John', lname='Doe', age=40)
+ ComplexCSV(fname='Bob', lname='Dylan', age=60)
+ ComplexCSV(fname='Harriet', lname='Tubman', age=160)
+ s = export_csv_zip([SimpleCSV, ComplexCSV])
assert isinstance(s, str) and s
- s = export_csv_zip([Simple.selectBy(name='Bob'),
- (Complex, list(Complex.selectBy(fname='John')))])
-
+ s = export_csv_zip([SimpleCSV.selectBy(name='Bob'),
+ (ComplexCSV, list(ComplexCSV.selectBy(fname='John')))])
+
|