sqlobject-cvs Mailing List for SQLObject (Page 113)
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: <sub...@co...> - 2006-11-20 19:35:46
|
Author: phd
Date: 2006-11-20 12:35:42 -0700 (Mon, 20 Nov 2006)
New Revision: 2102
Modified:
SQLObject/docs/FAQ.txt
SQLObject/docs/News.txt
Log:
Note should go first - a note in the end of a section floats to the next section.
Reformatted the example so the code doesn't overlap the note.
Modified: SQLObject/docs/FAQ.txt
===================================================================
--- SQLObject/docs/FAQ.txt 2006-11-20 19:31:31 UTC (rev 2101)
+++ SQLObject/docs/FAQ.txt 2006-11-20 19:35:42 UTC (rev 2102)
@@ -107,6 +107,19 @@
How can I define my own intermediate table in my Many-to-Many relationship?
---------------------------------------------------------------------------
+.. note::
+ In User and Role, SQLRelatedJoin is used with createRelatedTable=False
+ so the intermediate table is not created automatically. We also set the
+ intermediate table name with intermediateTable='user_roles'.
+ UserRoles is the definition of our intermediate table.
+ UserRoles creates a unique index to make sure we don't have duplicate
+ data in the database.
+ We also added an extra field called active which has a boolean value.
+ The active column might be used to activate/deactivate a given role for
+ a user in this example.
+ Another common field to add in this an intermediate table might be a sort
+ field.
+
We'll expand on the User and Role example and define our own UserRoles class which
will be the intermediate table for the User and Role Many-to-Many relationship.
@@ -116,11 +129,15 @@
... class sqlmeta:
... table = "user_table"
... username = StringCol(alternateID=True, length=20)
- ... roles = SQLRelatedJoin('Role', intermediateTable='user_roles', createRelatedTable=False)
+ ... roles = SQLRelatedJoin('Role',
+ ... intermediateTable='user_roles',
+ ... createRelatedTable=False)
>>> class Role(SQLObject):
... name = StringCol(alternateID=True, length=20)
- ... users = SQLRelatedJoin('User', intermediateTable='user_roles', createRelatedTable=False)
+ ... users = SQLRelatedJoin('User',
+ ... intermediateTable='user_roles',
+ ... createRelatedTable=False)
>>> class UserRoles(SQLObject):
... class sqlmeta:
@@ -130,20 +147,7 @@
... active = BoolCol(notNull=True, default=False)
... unique = index.DatabaseIndex(user, role, unique=True)
-.. note::
- In User and Role, SQLRelatedJoin is used with createRelatedTable=False
- so the intermediate table is not created automatically. We also set the
- intermediate table name with intermediateTable='user_roles'.
- UserRoles is the definition of our intermediate table.
- UserRoles creates a unique index to make sure we don't have duplicate
- data in the database.
- We also added an extra field called active which has a boolean value.
- The active column might be used to activate/deactivate a given role for
- a user in this example.
- Another common field to add in this an intermediate table might be a sort
- field.
-
How Does Inheritance Work?
--------------------------
Modified: SQLObject/docs/News.txt
===================================================================
--- SQLObject/docs/News.txt 2006-11-20 19:31:31 UTC (rev 2101)
+++ SQLObject/docs/News.txt 2006-11-20 19:35:42 UTC (rev 2102)
@@ -97,6 +97,8 @@
SQLObject 0.7.2
===============
+Released 20 Nov 2006.
+
Features & Interface
--------------------
|
|
From: <sub...@co...> - 2006-11-20 19:31:52
|
Author: phd
Date: 2006-11-20 12:31:31 -0700 (Mon, 20 Nov 2006)
New Revision: 2101
Modified:
SQLObject/branches/0.7-bugfix/docs/FAQ.txt
Log:
Note should go first - a note in the end of a section floats to the next section.
Modified: SQLObject/branches/0.7-bugfix/docs/FAQ.txt
===================================================================
--- SQLObject/branches/0.7-bugfix/docs/FAQ.txt 2006-11-20 18:42:58 UTC (rev 2100)
+++ SQLObject/branches/0.7-bugfix/docs/FAQ.txt 2006-11-20 19:31:31 UTC (rev 2101)
@@ -107,6 +107,19 @@
How can I define my own intermediate table in my Many-to-Many relationship?
---------------------------------------------------------------------------
+.. note::
+ In User and Role, SQLRelatedJoin is used with createRelatedTable=False
+ so the intermediate table is not created automatically. We also set the
+ intermediate table name with intermediateTable='user_roles'.
+ UserRoles is the definition of our intermediate table.
+ UserRoles creates a unique index to make sure we don't have duplicate
+ data in the database.
+ We also added an extra field called active which has a boolean value.
+ The active column might be used to activate/deactivate a given role for
+ a user in this example.
+ Another common field to add in this an intermediate table might be a sort
+ field.
+
We'll expand on the User and Role example and define our own UserRoles class which
will be the intermediate table for the User and Role Many-to-Many relationship.
@@ -130,20 +143,7 @@
... active = BoolCol(notNull=True, default=False)
... unique = index.DatabaseIndex(user, role, unique=True)
-.. note::
- In User and Role, SQLRelatedJoin is used with createRelatedTable=False
- so the intermediate table is not created automatically. We also set the
- intermediate table name with intermediateTable='user_roles'.
- UserRoles is the definition of our intermediate table.
- UserRoles creates a unique index to make sure we don't have duplicate
- data in the database.
- We also added an extra field called active which has a boolean value.
- The active column might be used to activate/deactivate a given role for
- a user in this example.
- Another common field to add in this an intermediate table might be a sort
- field.
-
How Does Inheritance Work?
--------------------------
|
|
From: <sub...@co...> - 2006-11-20 18:43:09
|
Author: ianb
Date: 2006-11-20 11:42:58 -0700 (Mon, 20 Nov 2006)
New Revision: 2100
Modified:
SQLObject/branches/0.7-bugfix/docs/FAQ.txt
SQLObject/branches/0.7-bugfix/docs/News.txt
Log:
Added 'How can I define my own intermediate table in my Many-to-Many relationship?' to FAQ.
Modified: SQLObject/branches/0.7-bugfix/docs/FAQ.txt
===================================================================
--- SQLObject/branches/0.7-bugfix/docs/FAQ.txt 2006-11-20 15:35:16 UTC (rev 2099)
+++ SQLObject/branches/0.7-bugfix/docs/FAQ.txt 2006-11-20 18:42:58 UTC (rev 2100)
@@ -103,6 +103,47 @@
.. _SQLBuilder: SQLBuilder.html
.. _example: SQLObject.html#how-can-i-join-a-table-with-itself
+
+How can I define my own intermediate table in my Many-to-Many relationship?
+---------------------------------------------------------------------------
+
+We'll expand on the User and Role example and define our own UserRoles class which
+will be the intermediate table for the User and Role Many-to-Many relationship.
+
+Example::
+
+ >>> class User(SQLObject):
+ ... class sqlmeta:
+ ... table = "user_table"
+ ... username = StringCol(alternateID=True, length=20)
+ ... roles = SQLRelatedJoin('Role', intermediateTable='user_roles', createRelatedTable=False)
+
+ >>> class Role(SQLObject):
+ ... name = StringCol(alternateID=True, length=20)
+ ... users = SQLRelatedJoin('User', intermediateTable='user_roles', createRelatedTable=False)
+
+ >>> class UserRoles(SQLObject):
+ ... class sqlmeta:
+ ... table = "user_roles"
+ ... user = ForeignKey('User', notNull=True, cascade=True)
+ ... role = ForeignKey('Role', notNull=True, cascade=True)
+ ... active = BoolCol(notNull=True, default=False)
+ ... unique = index.DatabaseIndex(user, role, unique=True)
+
+.. note::
+ In User and Role, SQLRelatedJoin is used with createRelatedTable=False
+ so the intermediate table is not created automatically. We also set the
+ intermediate table name with intermediateTable='user_roles'.
+ UserRoles is the definition of our intermediate table.
+ UserRoles creates a unique index to make sure we don't have duplicate
+ data in the database.
+ We also added an extra field called active which has a boolean value.
+ The active column might be used to activate/deactivate a given role for
+ a user in this example.
+ Another common field to add in this an intermediate table might be a sort
+ field.
+
+
How Does Inheritance Work?
--------------------------
Modified: SQLObject/branches/0.7-bugfix/docs/News.txt
===================================================================
--- SQLObject/branches/0.7-bugfix/docs/News.txt 2006-11-20 15:35:16 UTC (rev 2099)
+++ SQLObject/branches/0.7-bugfix/docs/News.txt 2006-11-20 18:42:58 UTC (rev 2100)
@@ -35,6 +35,12 @@
* A bug fix that allows to use SQLObject with DateTime from Zope.
+Documentation Added
+-------------------
+
+Added "How can I define my own intermediate table in my Many-to-Many relationship?" to FAQ.
+
+
SQLObject 0.7.1
===============
|
|
From: <sub...@co...> - 2006-11-20 15:35:26
|
Author: phd Date: 2006-11-20 08:35:16 -0700 (Mon, 20 Nov 2006) New Revision: 2099 Modified: SQLObject/branches/0.7-bugfix/docs/download.txt Log: 0.7.1 => 0.7.2. Modified: SQLObject/branches/0.7-bugfix/docs/download.txt =================================================================== --- SQLObject/branches/0.7-bugfix/docs/download.txt 2006-11-20 15:33:44 UTC (rev 2098) +++ SQLObject/branches/0.7-bugfix/docs/download.txt 2006-11-20 15:35:16 UTC (rev 2099) @@ -4,18 +4,18 @@ The latest releases are always available on the `Python Cheese Shop <http://cheeseshop.python.org/pypi/SQLObject>`_. -* `SQLObject 0.7.1 - <http://cheeseshop.python.org/packages/source/S/SQLObject/SQLObject-0.7.1.tar.gz>`_ +* `SQLObject 0.7.2 + <http://cheeseshop.python.org/packages/source/S/SQLObject/SQLObject-0.7.2.tar.gz>`_ (source package in ``tar.gz`` format) -* `0.7.1 Python 2.4 egg - <http://cheeseshop.python.org/packages/2.4/S/SQLObject/SQLObject-0.7.1-py2.4.egg>`_ +* `0.7.2 Python 2.4 egg + <http://cheeseshop.python.org/packages/2.4/S/SQLObject/SQLObject-0.7.2-py2.4.egg>`_ (`easy_install-friendly <http://peak.telecommunity.com/DevCenter/EasyInstall>`__ egg package) -* `0.7.1 Python 2.3 egg - <http://cheeseshop.python.org/packages/2.3/S/SQLObject/SQLObject-0.7.1-py2.3.egg>`_ +* `0.7.2 Python 2.3 egg + <http://cheeseshop.python.org/packages/2.3/S/SQLObject/SQLObject-0.7.2-py2.3.egg>`_ (`easy_install-friendly <http://peak.telecommunity.com/DevCenter/EasyInstall>`__ egg package) |
|
From: <sub...@co...> - 2006-11-20 15:34:01
|
Author: phd Date: 2006-11-20 08:33:44 -0700 (Mon, 20 Nov 2006) New Revision: 2098 Modified: SQLObject/tags/0.7.2/docs/download.txt Log: 0.7.1 => 0.7.2. Modified: SQLObject/tags/0.7.2/docs/download.txt =================================================================== --- SQLObject/tags/0.7.2/docs/download.txt 2006-11-20 15:30:32 UTC (rev 2097) +++ SQLObject/tags/0.7.2/docs/download.txt 2006-11-20 15:33:44 UTC (rev 2098) @@ -4,18 +4,18 @@ The latest releases are always available on the `Python Cheese Shop <http://cheeseshop.python.org/pypi/SQLObject>`_. -* `SQLObject 0.7.1 - <http://cheeseshop.python.org/packages/source/S/SQLObject/SQLObject-0.7.1.tar.gz>`_ +* `SQLObject 0.7.2 + <http://cheeseshop.python.org/packages/source/S/SQLObject/SQLObject-0.7.2.tar.gz>`_ (source package in ``tar.gz`` format) -* `0.7.1 Python 2.4 egg - <http://cheeseshop.python.org/packages/2.4/S/SQLObject/SQLObject-0.7.1-py2.4.egg>`_ +* `0.7.2 Python 2.4 egg + <http://cheeseshop.python.org/packages/2.4/S/SQLObject/SQLObject-0.7.2-py2.4.egg>`_ (`easy_install-friendly <http://peak.telecommunity.com/DevCenter/EasyInstall>`__ egg package) -* `0.7.1 Python 2.3 egg - <http://cheeseshop.python.org/packages/2.3/S/SQLObject/SQLObject-0.7.1-py2.3.egg>`_ +* `0.7.2 Python 2.3 egg + <http://cheeseshop.python.org/packages/2.3/S/SQLObject/SQLObject-0.7.2-py2.3.egg>`_ (`easy_install-friendly <http://peak.telecommunity.com/DevCenter/EasyInstall>`__ egg package) |
|
From: <sub...@co...> - 2006-11-20 15:30:33
|
Author: phd
Date: 2006-11-20 08:30:32 -0700 (Mon, 20 Nov 2006)
New Revision: 2097
Modified:
SQLObject/tags/0.7.2/docs/News.txt
SQLObject/tags/0.7.2/setup.py
Log:
Released SQLObject 0.7.2.
Modified: SQLObject/tags/0.7.2/docs/News.txt
===================================================================
--- SQLObject/tags/0.7.2/docs/News.txt 2006-11-20 15:29:03 UTC (rev 2096)
+++ SQLObject/tags/0.7.2/docs/News.txt 2006-11-20 15:30:32 UTC (rev 2097)
@@ -10,6 +10,8 @@
SQLObject 0.7.2
===============
+Released 20 Nov 2006.
+
Features & Interface
--------------------
Modified: SQLObject/tags/0.7.2/setup.py
===================================================================
--- SQLObject/tags/0.7.2/setup.py 2006-11-20 15:29:03 UTC (rev 2096)
+++ SQLObject/tags/0.7.2/setup.py 2006-11-20 15:30:32 UTC (rev 2097)
@@ -19,7 +19,7 @@
DistributionMetadata.download_url = None
setup(name="SQLObject",
- version="0.7.2b1",
+ version="0.7.2",
description="Object-Relational Manager, aka database wrapper",
long_description="""\
SQLObject is a popular *Object Relational Manager* for providing an
|
|
From: <sub...@co...> - 2006-11-20 15:29:07
|
Author: phd Date: 2006-11-20 08:29:03 -0700 (Mon, 20 Nov 2006) New Revision: 2096 Modified: SQLObject/branches/0.7-bugfix/docs/News.txt Log: Released SQLObject 0.7.2. Modified: SQLObject/branches/0.7-bugfix/docs/News.txt =================================================================== --- SQLObject/branches/0.7-bugfix/docs/News.txt 2006-11-20 15:25:54 UTC (rev 2095) +++ SQLObject/branches/0.7-bugfix/docs/News.txt 2006-11-20 15:29:03 UTC (rev 2096) @@ -10,6 +10,8 @@ SQLObject 0.7.2 =============== +Released 20 Nov 2006. + Features & Interface -------------------- |
|
From: <sub...@co...> - 2006-11-20 15:26:06
|
Author: phd Date: 2006-11-20 08:25:54 -0700 (Mon, 20 Nov 2006) New Revision: 2095 Added: SQLObject/tags/0.7.2/ Log: SQLObject 0.7.2. Copied: SQLObject/tags/0.7.2 (from rev 2094, SQLObject/tags/0.7.2b1) |
|
From: <sub...@co...> - 2006-11-17 22:10:35
|
Author: rflosi
Date: 2006-11-17 15:10:29 -0700 (Fri, 17 Nov 2006)
New Revision: 2093
Modified:
SQLObject/docs/FAQ.txt
Log:
added 'How can I define my own intermediate table in my Many-to-Many relationship?' example to FAQ
Modified: SQLObject/docs/FAQ.txt
===================================================================
--- SQLObject/docs/FAQ.txt 2006-11-15 16:38:58 UTC (rev 2092)
+++ SQLObject/docs/FAQ.txt 2006-11-17 22:10:29 UTC (rev 2093)
@@ -103,6 +103,47 @@
.. _SQLBuilder: SQLBuilder.html
.. _example: SQLObject.html#how-can-i-join-a-table-with-itself
+
+How can I define my own intermediate table in my Many-to-Many relationship?
+---------------------------------------------------------------------------
+
+We'll expand on the User and Role example and define our own UserRoles class which
+will be the intermediate table for the User and Role Many-to-Many relationship.
+
+Example::
+
+ >>> class User(SQLObject):
+ ... class sqlmeta:
+ ... table = "user_table"
+ ... username = StringCol(alternateID=True, length=20)
+ ... roles = SQLRelatedJoin('Role', intermediateTable='user_roles', createRelatedTable=False)
+
+ >>> class Role(SQLObject):
+ ... name = StringCol(alternateID=True, length=20)
+ ... users = SQLRelatedJoin('User', intermediateTable='user_roles', createRelatedTable=False)
+
+ >>> class UserRoles(SQLObject):
+ ... class sqlmeta:
+ ... table = "user_roles"
+ ... user = ForeignKey('User', notNull=True, cascade=True)
+ ... role = ForeignKey('Role', notNull=True, cascade=True)
+ ... active = BoolCol(notNull=True, default=False)
+ ... unique = index.DatabaseIndex(user, role, unique=True)
+
+.. note::
+ In User and Role, SQLRelatedJoin is used with createRelatedTable=False
+ so the intermediate table is not created automatically. We also set the
+ intermediate table name with intermediateTable='user_roles'.
+ UserRoles is the definition of our intermediate table.
+ UserRoles creates a unique index to make sure we don't have duplicate
+ data in the database.
+ We also added an extra field called active which has a boolean value.
+ The active column might be used to activate/deactivate a given role for
+ a user in this example.
+ Another common field to add in this an intermediate table might be a sort
+ field.
+
+
How Does Inheritance Work?
--------------------------
|
|
From: <sub...@co...> - 2006-11-15 16:38:49
|
Author: phd Date: 2006-11-15 09:38:58 -0700 (Wed, 15 Nov 2006) New Revision: 2092 Modified: home/phd/SQLObject/paramstyles/sqlobject/include/update-paramstyles Log: Fixed the URL to the SF CVS. Modified: home/phd/SQLObject/paramstyles/sqlobject/include/update-paramstyles =================================================================== --- home/phd/SQLObject/paramstyles/sqlobject/include/update-paramstyles 2006-11-15 16:38:04 UTC (rev 2091) +++ home/phd/SQLObject/paramstyles/sqlobject/include/update-paramstyles 2006-11-15 16:38:58 UTC (rev 2092) @@ -3,7 +3,7 @@ echo cd `dirname $0` cd `dirname $0` echo wget http://ppa.sourceforge.net/DBSingleStyle.py -wget -O DBSingleStyle.py.tmp1 'http://cvs.sourceforge.net/viewcvs.py/*checkout*/ppa/misc/DBSingleStyle.py' +wget -O DBSingleStyle.py.tmp1 'http://ppa.cvs.sourceforge.net/*checkout*/ppa/misc/DBSingleStyle.py' echo DBSingleStyle.py echo '#! /usr/bin/env python |
|
From: <sub...@co...> - 2006-11-15 16:38:06
|
Author: phd
Date: 2006-11-15 09:38:04 -0700 (Wed, 15 Nov 2006)
New Revision: 2091
Modified:
home/phd/SQLObject/paramstyles/sqlobject/sqlite/sqliteconnection.py
Log:
Fixed a minor bug.
Modified: home/phd/SQLObject/paramstyles/sqlobject/sqlite/sqliteconnection.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/sqlite/sqliteconnection.py 2006-11-14 21:42:23 UTC (rev 2090)
+++ home/phd/SQLObject/paramstyles/sqlobject/sqlite/sqliteconnection.py 2006-11-15 16:38:04 UTC (rev 2091)
@@ -174,7 +174,7 @@
def _executeRetry(self, conn, cursor, query):
try:
- DBAPI._executeRetry(self, conn, c, query)
+ DBAPI._executeRetry(self, conn, cursor, query)
except self.module.OperationalError, e:
raise OperationalError(ErrorMessage(e))
except self.module.IntegrityError, e:
|
|
From: comprehensive <atl...@ya...> - 2006-11-15 11:50:10
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2900.2963" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <div align="left"> <p><font face=Arial = >car is OBD I compliant, you can use any EPA or CARB approved OBD I converter</font><BR><BR><IMG alt="" hspace=0 src="cid:P0XIFFDS67L90GS79FEW" align=baseline border=0><BR><font face=Arial = >Fluidyne radiators have a 16 psi cap, but higher pressure caps are also available for greater Do you dress like those pop girls?</font><BR><font face=Arial = >I like it because of the artistic valueTsuchiya, passionately known as the drift king, hugs Suzuki, the commentating voice of the D1 Moving on</font><BR><BR><font face=Arial = >I went really early in the morning but I turned back and went home after I found out the event was sold out.It's more rewarding for meFew import labels could compete with Honda's little four-banger, despite VTEC's front-wheel-</font><BR><font face=Arial = >between OBD I and OBD II cats is bigger than you might think.Every man's dream: a beautiful, naked woman that you get to pose any way you want! You know how the Japanese are into that kind of bubblegum pop? I'm very similar</font><BR><BR><font face=Arial = >We asked Taka Aono (the former SCCA Solo2 champion, and Formula Drift and Drift Association member) what the advantages are when using a rear tower brace</font><BR><font face=Arial = >I like guys who are smart and realI used to work as a counselor at a probation house for girls</font></p> </div> </BODY></HTML> |
|
From: SourceForge.net <no...@so...> - 2006-11-14 12:04:45
|
Bugs item #1592786, was opened at 2006-11-08 17:20 Message generated for change (Comment added) made by jayhem You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1592786&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: None Status: Open Resolution: Invalid Priority: 5 Private: No Submitted By: Jayhem (jayhem) Assigned to: Nobody/Anonymous (nobody) Summary: so-sqlite data corruption during updates Initial Comment: I'm hitting a bug when using SO with turbogears 1.1b with an sqlite database. When I do several successive updates to a table (which are very slow btw), data gets corrupted in the interface, select() returns invalid objects, as if objects were pulled from a cache that was out of synch with the db. >From this point, successive select() without any updates in-between can return different values, randomly selecting one of the previsouly set values. I have created a simple test-case (on turbogears) Just launch it and change some values. Usually after 10-20 changes, the corruption appears. I have tried this same testcase with MySQL and do not hit this problem. Note that dev.cfg declares sqlobject.dburi="notrans_sqlite:///..." file: model.py ====================================================== from sqlobject import * from turbogears.database import PackageHub hub = PackageHub("bug") __connection__ = hub class Item(SQLObject): data = UnicodeCol(length=40) def loaddb(): hub.begin() Item.dropTable(ifExists=True, cascade=True) hub.commit() Item.createTable(ifNotExists=True) for i in range(20): Item(data = str(i)) hub.commit() loaddb() file: controllers.py ====================================================== import turbogears from turbogears.controllers import RootController, expose from model import Item class Root(RootController): @expose(template="bug.templates.index") def index(self): items = Item.select() return dict(items = items) @expose(template="bug.templates.index") def change(self, id): item = Item.get(id) item.data += str(id) items = Item.select() return dict(items = items) file: index.kid ====================================================== <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'"> <head> <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> <title>Items</title> </head> <body> <ul py:for="i in items"> <li>${i.data} <a href="/change/${i.id}">[edit]</a></li> </ul> </body> </html> ---------------------------------------------------------------------- >Comment By: Jayhem (jayhem) Date: 2006-11-14 12:04 Message: Logged In: YES user_id=1640652 You are right. the bug does not seem to cause data corruption in the database (i.e it's not a db related issue), it just causes random results to be returned from queries. Simply switching the database to MySQL solves the problem, which confirms the bug is not in the db. An even more annoying issue, which I think is related, is the extremely slow inserts/updates into sqlite, and frequent error messages telling me the db is locked. I am new to turbogears, sqlobject, sqlite and python, so I'm sorry I won't have time to work on a SqlObject-only testcase. Let me know if I can do anything to help fix this. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-11-13 16:59 Message: Logged In: YES user_id=4799 Our company has been using SQLObject with SQLite for three rather large commercial programs. Neither of our developers, testers or users ever experienced data loss. Are you sure the problem is not TG-related? Please write an SQLObject-only test. In any case I cannot run your program - I don't have TG and not going to install it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1592786&group_id=74338 |
|
From: <sub...@co...> - 2006-11-13 17:33:50
|
Author: ianb
Date: 2006-11-13 10:33:55 -0700 (Mon, 13 Nov 2006)
New Revision: 2084
Modified:
SQLObject/tags/0.7.2b1/setup.cfg
SQLObject/tags/0.7.2b1/setup.py
Log:
updated version
Modified: SQLObject/tags/0.7.2b1/setup.cfg
===================================================================
--- SQLObject/tags/0.7.2b1/setup.cfg 2006-11-13 17:23:39 UTC (rev 2083)
+++ SQLObject/tags/0.7.2b1/setup.cfg 2006-11-13 17:33:55 UTC (rev 2084)
@@ -1,7 +1,3 @@
-[egg_info]
-tag_build = a
-tag_svn_revision = true
-
[pudge]
title = SQLObject
dest = docs/html
Modified: SQLObject/tags/0.7.2b1/setup.py
===================================================================
--- SQLObject/tags/0.7.2b1/setup.py 2006-11-13 17:23:39 UTC (rev 2083)
+++ SQLObject/tags/0.7.2b1/setup.py 2006-11-13 17:33:55 UTC (rev 2084)
@@ -19,7 +19,7 @@
DistributionMetadata.download_url = None
setup(name="SQLObject",
- version="0.7.2",
+ version="0.7.2b1",
description="Object-Relational Manager, aka database wrapper",
long_description="""\
SQLObject is a popular *Object Relational Manager* for providing an
|
|
From: <sub...@co...> - 2006-11-13 17:23:39
|
Author: phd Date: 2006-11-13 10:23:39 -0700 (Mon, 13 Nov 2006) New Revision: 2083 Added: SQLObject/tags/0.7.2b1/ Log: SQLObject 0.7.2 beta 1. Copied: SQLObject/tags/0.7.2b1 (from rev 2082, SQLObject/branches/0.7-bugfix) |
|
From: SourceForge.net <no...@so...> - 2006-11-13 17:15:01
|
Patches item #1578414, was opened at 2006-10-16 22:32 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1578414&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: None Group: None Status: Open Resolution: Invalid Priority: 5 Private: No Submitted By: ptwobrussell (ptwobrussell) Assigned to: Oleg Broytmann (phd) Summary: exception called b/c pgdb.Binary('') fails Initial Comment: Patch is located inline below. Apparently, you need to specialize the check because no Binary() method exists as of pgdb v3.6+ (possibly earlier too, I don't know). dbconnection.orig is the original file and dbconnection.py is the updated file that now works --- dbconnection.py.orig 2006-10-16 14:09:01.000000000 -0400 +++ dbconnection.py 2006-10-16 14:10:58.000000000 -0400 @@ -213,7 +213,10 @@ self._pool = [] self._poolLock = threading.Lock() DBConnection.__init__(self, **kw) - self._binaryType = type(self.module.Binary('')) + if self.usePygresql: + self._binaryType = type(self.module.BINARY) + else: + self._binaryType = type(self.module.Binary('')) def _runWithConnection(self, meth, *args): conn = self.getConnection() ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-11-13 20:14 Message: Logged In: YES user_id=4799 Please don't take this to the personal level. It is the patch that's invalid, not you. But the patch is invalid and cannot be applied. Either you are going to work on it further, or it will wait until someone (including me) finds time to work on it. ---------------------------------------------------------------------- Comment By: ptwobrussell (ptwobrussell) Date: 2006-11-11 17:42 Message: Logged In: YES user_id=1622325 Ok, apparently I'm an idiot. At any rate, without the change above, I wasn't able to to use SQLObject. I don't know what this means in the grand scheme of things for how to fix the issue I ran across. I was just trying to be helpful and point out that something wasn't working properly and (naively) suggest the steps I took to fix it. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-11-10 17:18 Message: Logged In: YES user_id=4799 First, the patch is invalid. self.usePygresql is defined only in PostgresConnection, hence that "if" will fail for any other connection class. Then, the absence of Binary() means Pygresql doesn't implement DB API 2.0 specification properly. Third, there are more calls to Binary() in the SQLObject. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1578414&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-11-13 17:12:23
|
Patches item #1578415, was opened at 2006-10-16 22:34 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1578415&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: None Group: None Status: Open Resolution: Invalid Priority: 5 Private: No Submitted By: ptwobrussell (ptwobrussell) Assigned to: Oleg Broytmann (phd) Summary: exception called b/c of issue with millisecs in date string Initial Comment: A patch to fix an issue caused when pgdb returns a date/time string that contains milliseconds in it: col.py.orig is the original file. col.py is the updated file Patch is inline below: --- col.py.orig 2006-10-16 14:11:30.000000000 -0400 +++ col.py 2006-10-16 14:13:28.000000000 -0400 @@ -941,7 +941,8 @@ else: return datetime.time(value.hour, value.minute, int(value.second)) try: - stime = time.strptime(value, self.format) + #postgres might return a time value with milliseconds. strip it or else change the format string + stime = time.strptime(value[value.rfind('.')], self.format) except: raise validators.Invalid("expected an date/time string of the '%s' format in the DateTimeCol '%s', got %s %r instead" % \ (self.format, self.name, type(value), value), value, state) ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-11-13 20:12 Message: Logged In: YES user_id=4799 Even with the colon the patch is invalid. It cuts the last digit if there is no a dot. See: > python Python 2.4.4 (#1, Oct 23 2006, 18:00:38) [GCC 3.4.4 20050314 (prerelease) (Debian 3.4.3-13sarge1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> s = "20:55" >>> s[:s.find('.')] '20:5' The problem you are trying to solve is a real problem but IWBN if you produce a patch that works for other people. ---------------------------------------------------------------------- Comment By: ptwobrussell (ptwobrussell) Date: 2006-11-11 17:37 Message: Logged In: YES user_id=1622325 Yea, basically, this approach just chops off the "." and everything after it. Sorry about that. Don't know how the ":" didn't make it through. I generated the patch from my working copy. Weird. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-11-10 17:22 Message: Logged In: YES user_id=4799 value[value.rfind('.')]? There have to be a colon somewhere: value[:value.rfind('.')], I suppose? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1578415&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-11-13 16:59:42
|
Bugs item #1592786, was opened at 2006-11-08 20:20 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1592786&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: None Status: Open >Resolution: Invalid Priority: 5 Private: No Submitted By: Jayhem (jayhem) Assigned to: Nobody/Anonymous (nobody) Summary: so-sqlite data corruption during updates Initial Comment: I'm hitting a bug when using SO with turbogears 1.1b with an sqlite database. When I do several successive updates to a table (which are very slow btw), data gets corrupted in the interface, select() returns invalid objects, as if objects were pulled from a cache that was out of synch with the db. >From this point, successive select() without any updates in-between can return different values, randomly selecting one of the previsouly set values. I have created a simple test-case (on turbogears) Just launch it and change some values. Usually after 10-20 changes, the corruption appears. I have tried this same testcase with MySQL and do not hit this problem. Note that dev.cfg declares sqlobject.dburi="notrans_sqlite:///..." file: model.py ====================================================== from sqlobject import * from turbogears.database import PackageHub hub = PackageHub("bug") __connection__ = hub class Item(SQLObject): data = UnicodeCol(length=40) def loaddb(): hub.begin() Item.dropTable(ifExists=True, cascade=True) hub.commit() Item.createTable(ifNotExists=True) for i in range(20): Item(data = str(i)) hub.commit() loaddb() file: controllers.py ====================================================== import turbogears from turbogears.controllers import RootController, expose from model import Item class Root(RootController): @expose(template="bug.templates.index") def index(self): items = Item.select() return dict(items = items) @expose(template="bug.templates.index") def change(self, id): item = Item.get(id) item.data += str(id) items = Item.select() return dict(items = items) file: index.kid ====================================================== <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'"> <head> <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> <title>Items</title> </head> <body> <ul py:for="i in items"> <li>${i.data} <a href="/change/${i.id}">[edit]</a></li> </ul> </body> </html> ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-11-13 19:59 Message: Logged In: YES user_id=4799 Our company has been using SQLObject with SQLite for three rather large commercial programs. Neither of our developers, testers or users ever experienced data loss. Are you sure the problem is not TG-related? Please write an SQLObject-only test. In any case I cannot run your program - I don't have TG and not going to install it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1592786&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-11-13 16:56:07
|
Bugs item #1495030, was opened at 2006-05-25 19:48 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1495030&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: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: sql drop fails with soClasses Initial Comment: sqlobject-admin sql create respects soClasses, but sqlobject-admin drop tries to drop the tables in the same order instead of in the reverse order. See http://trac.turbogears.org/turbogears/ticket/882 for an example and possible patch. Arthur Clune (pu...@cl...) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1495030&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-11-13 16:55:26
|
Bugs item #1460100, was opened at 2006-03-28 19:57 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1460100&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: None Group: None >Status: Closed >Resolution: Works For Me Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) >Assigned to: Oleg Broytmann (phd) Summary: orderBy: datetime.datetime cannot be compared with None Initial Comment: When datetime.datetime is used for DateTimeCols: Using defaultOrder with a DateTimeCol fails when there is an empty DateTimeCol (None). This does not happen with the mx modules. "can't compare datetime.time to NoneType" ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-11-13 19:55 Message: Logged In: YES user_id=4799 I cannot reproduce the problem. The following program works fine for me. #! /usr/local/bin/python from sqlobject import * __connection__ = "sqlite:/:memory:?debug=1" class Test(SQLObject): class sqlmeta: defaultOrder = "dt" name = StringCol(default=None) dt = DateTimeCol(default=None) from datetime import datetime Test.createTable() Test(name="test1") Test(name="test2", dt=datetime(1967, 12, 21)) Test(dt=datetime(1984, 5, 21)) print list(Test.select()) "can't compare datetime.time to NoneType" raised if one tries to list(Test.select()).sort(key=attrgetter("dt")), but that's not an SQLObject-related problem. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1460100&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-11-13 16:42:08
|
Bugs item #1432190, was opened at 2006-02-15 17:22 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1432190&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: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: BjLindqvist (sonderblade) Assigned to: Oleg Broytmann (phd) Summary: Table creation order for foreign key constraints Initial Comment: Note: I had to apply my patch in https://sourceforge.net/tracker/index.php?func=detail&aid=1432176&group_id=74338&atid=540674 otherwise the foreign key constrains would be completely ignored. I have a simple model.py file containing my two tables like this: class Network(SQLObject): name = StringCol(alternateID = True, length = 80) class Channel(SQLObject): network = ForeignKey("Network", notNull = True) name = StringCol() Using "tg-admin sql sql" produces a listing like this: CREATE TABLE channel ( id INT PRIMARY KEY AUTO_INCREMENT, network_id INT NOT NULL, name TEXT ); CREATE TABLE network ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(80) NOT NULL UNIQUE ); ALTER TABLE channel ADD CONSTRAINT channel_network_id_exists FOREIGN KEY (network_id) REFERENCES network (id); Creating these two tables manually work: Network.createTable() Channel.createTable() But when I try to create them using "tg-admin sql create" (which just wraps "sqlobject-admin create") I get the following exception: Traceback (most recent call last): File "/usr/bin/tg-admin", line 7, in ? sys.exit( File "/usr/lib/python2.4/site-packages/TurboGears-0.9a0dev_r778-py2.4.egg/turbogears/command/base.py", line 269, in main command.run() File "/usr/lib/python2.4/site-packages/TurboGears-0.9a0dev_r778-py2.4.egg/turbogears/command/base.py", line 129, in run command.the_runner.run(sys.argv) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1596-py2.4.egg/sqlobject/manager/command.py", line 100, in run runner.run() File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1596-py2.4.egg/sqlobject/manager/command.py", line 231, in run self.command() File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1596-py2.4.egg/sqlobject/manager/command.py", line 583, in command tableConstraints = soClass.createTable() File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1596-py2.4.egg/sqlobject/main.py", line 1372, in createTable conn.query(constraint) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1596-py2.4.egg/sqlobject/dbconnection.py", line 314, in query return self._runWithConnection(self._query, s) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1596-py2.4.egg/sqlobject/dbconnection.py", line 228, in _runWithConnection val = meth(conn, *args) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1596-py2.4.egg/sqlobject/dbconnection.py", line 311, in _query self._executeRetry(conn, conn.cursor(), s) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1596-py2.4.egg/sqlobject/mysql/mysqlconnection.py", line 66, in _executeRetry return cursor.execute(query) File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 137, in execute self.errorhandler(self, exc, value) File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 33, in defaulterrorhandler raise errorclass, errorvalue _mysql_exceptions.OperationalError: (1005, "Can't create table './test/#sql-1cf0_b9.frm' (errno: 150)") The problem is because sqlobject creates the Channel table before the Network table and therefore the query (despite the order that "tg-admin sql sql" seem to suggest): ALTER TABLE channel ADD CONSTRAINT channel_network_id_exists FOREIGN KEY (network_id) REFERENCES network (id); is executed before the Network table has been created. I think the problem can be solved by making it so all constraint statements are executed after the create table statements are executed. ---------------------------------------------------------------------- Comment By: Toshio Kuratomi (abadger1999) Date: 2006-09-09 22:06 Message: Logged In: YES user_id=944205 Or perhaps I'll paste it inline... There doesn't seem to be a way for a mere commenter to attach a file. Also note: The turbogears bug suggests that the patch will also fix the problem with dropping tables reported in this SQLObject Bug: http://sourceforge.net/tracker/index.php?func=detail&aid=1495030&group_id=74338&atid=540672 ---BEGIN TEST CASE--- from sqlobject import * from turbogears.database import PackageHub hub = PackageHub('packagedb') __connection__ = hub class Collection(SQLObject): name = StringCol(length=128, notNone=True) class Branch(SQLObject): collection = ForeignKey('Collection') ---END TEST CASE--- ---------------------------------------------------------------------- Comment By: Toshio Kuratomi (abadger1999) Date: 2006-09-09 22:02 Message: Logged In: YES user_id=944205 This problem affects postgresql as well so I doubt that https://sourceforge.net/tracker/index.php?func=detail&aid=1432176&group_id=74338&atid=540674 will help it. Also, that patch looks like it is aimed at getting foreign keys to work in mysql (otherwise they're ignored.) There is a patch in the TurboGears trac that addresses this issue: Bug: http://trac.turbogears.org/turbogears/ticket/279 Patch: http://trac.turbogears.org/turbogears/attachment/ticket/279/command.patch The patch orders the table creations so that tables with foreign keys are created after the tables they reference. I've tested this patch successfully with a simple model from TurboGears which I'll attach. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-05-23 17:22 Message: Logged In: YES user_id=4799 The patch https://sourceforge.net/tracker/index.php?func=detail&aid=1432176&group_id=74338&atid=540674 was applied. Does it help? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1432190&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-11-13 16:35:18
|
Bugs item #1424667, was opened at 2006-02-05 20:57 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1424667&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: None Group: None >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Karl Bartel (karlb) >Assigned to: Oleg Broytmann (phd) Summary: 'maximum recursion depth exceeded' when __len__ is defined Initial Comment: class BugListEntry(SQLObject): bug_list = ForeignKey('BugList') class BugList(SQLObject): entries = MultipleJoin('BugListEntry') def __len__(self): return len(self.entries) When I'm calling 'BugList()' I get a 'RuntimeError: maximum recursion depth exceeded'. Is this a bug in SQLObject, or am I doing something wrong? It works fine when I'm removing the '__len__' method. I'm using SQLObject as a part of TurboGears 8.8 with an SQLite database. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-02-06 22:14 Message: Logged In: YES user_id=4799 I cannot reproduce it. The program doesn't raise an exception. Can you write a complete test program (without TG) and show the exception it raises? BTW, look at the FAQ in the repository: http://svn.colorstudy.com/SQLObject/docs/FAQ.txt to understand the reasons why there is no __len__. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1424667&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-11-13 16:34:25
|
Bugs item #1356102, was opened at 2005-11-14 01:13 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1356102&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: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: stan pinte (stanpinte) Assigned to: Oleg Broytmann (phd) Summary: INSERT fails without error Initial Comment: I have an INSERT that fails with no apparent reason from the database... (in that case postgres 8.0) 1/QueryIns: INSERT INTO log (id, message, state, operation, mtime) VALUES (5, 'Station: None', 'Error', 'ImportData', '2005-11-13 23:51:43') 1/COMMIT : auto 2/QueryOne: SELECT mtime, operation, state, message FROM log WHERE id = 5 2/QueryR : SELECT mtime, operation, state, message FROM log WHERE id = 5 2/COMMIT : auto Traceback (most recent call last): ... raise SQLObjectNotFound, "The object %s by the ID %s does not exist" % (self.__class__.__name__, self.id) sqlobject.main.SQLObjectNotFound: The object log by the ID 5 does not exist any idea? thanks a lot, Stan. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2005-11-18 23:58 Message: Logged In: YES user_id=4799 Can you create a short test program that demonstrates the problem? Attach it to this report... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1356102&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-11-13 16:33:06
|
Bugs item #1344338, was opened at 2005-11-01 01:28 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1344338&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: MySQL Group: SQLObject release (specify) >Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Andy Dustman (adustman) Assigned to: Oleg Broytmann (phd) Summary: 0.7.0: autoCommit from URI wrong type Initial Comment: In dbconnection.py, when the URI is parsed, there is no special treatment or type conversion of the autoCommit parameter, so it is always stored as a string. In the MySQL case (mysql.mysqlconnection), this causes the call to conn.autocommit() to always, since that API function requires an integer (booleans work too). A workaround for this is to change conn.autocommit(self.autoCommit) to conn.autocommit(int(self.autoCommit)), though only works if an integer is used as a parameter; it fails if True or False is used. Note that sybase support has this sequence in SybaseConnection.__init__(): autoCommit = kw.get('autoCommit') if autoCommit: autoCommmit = int(autoCommit) else: autoCommit = None kw['autoCommit'] = autoCommit DBAPI.__init__(self, **kw) A similar block of code would also work for MySQLdb. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-01-12 19:28 Message: Logged In: YES user_id=4799 Fixed at the revision 1499. Please try and report if it works for you. ---------------------------------------------------------------------- Comment By: Andy Dustman (adustman) Date: 2006-01-03 16:38 Message: Logged In: YES user_id=71372 Either will work. The Python C API turns bool into int. Actual boolean values would be more readable. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-01-03 15:32 Message: Logged In: YES user_id=4799 Documentation for MySQLdb says "Set the autocommit mode. True values enable; False value disable." What are those True and False - bools or ints? Should I write conn.autocommit(int(self.autoCommit)) or conn.autocommit(bool(self.autoCommit)) ? ---------------------------------------------------------------------- Comment By: Mike Kent (mrmakent) Date: 2005-12-09 20:11 Message: Logged In: YES user_id=1401261 I just ran into this same problem using SQLObject with TurboGears. Passing autoCommit as an empty string: mysql://server:port/db?autoCommit=&debug= as the previous commenter suggested did NOT work; I got the same TypeError exception. ---------------------------------------------------------------------- Comment By: Andy Dustman (adustman) Date: 2005-11-03 00:05 Message: Logged In: YES user_id=71372 That doesn't work; I tried it previously. It results in SQLObject trying to do conn.autocommit(''), which still results in a TypeError. Even though '' == False, it is not an integer, and thismethod requires an integer (or boolean). ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2005-11-02 23:42 Message: Logged In: YES user_id=4799 Pass autoCommit as an empty string: mysql://server:port/db?autoCommit=&debug= ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1344338&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-11-13 16:26:03
|
Bugs item #1094171, was opened at 2005-01-01 22:59 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1094171&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 from repository >Status: Closed >Resolution: Out of Date Priority: 5 Private: No Submitted By: Wichert Akkerman (wichert) Assigned to: Oleg Broytmann (phd) Summary: unicode queries break Initial Comment: When trying to store unicode data in a database I get an exception with the backtrace below. Tested using current SVN trunk. File "./parse", line 10, in StoreChannels nc[xid]=tvguide.database.Channel.byXid(xid) File "<string>", line 1, in <lambda> File "/usr/local/lib/python2.3/site-packages/sqlobject/main.py", line 961, in _SO_fetchAlternateID value) File "/usr/local/lib/python2.3/site-packages/sqlobject/dbconnection.py", line 400, in _SO_selectOneAlt return self.queryOne("SELECT %s FROM %s WHERE %s = %s" % File "/usr/local/lib/python2.3/site-packages/sqlobject/dbconnection.py", line 230, in queryOne return self._runWithConnection(self._queryOne, s) File "/usr/local/lib/python2.3/site-packages/sqlobject/dbconnection.py", line 125, in _runWithConnection val = meth(conn, *args) File "/usr/local/lib/python2.3/site-packages/sqlobject/dbconnection.py", line 223, in _queryOne self._executeRetry(conn, c, s) File "/usr/local/lib/python2.3/site-packages/sqlobject/dbconnection.py", line 196, in _executeRetry return cursor.execute(query) TypeError: argument 1 must be str, not unicode ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-01-12 15:57 Message: Logged In: YES user_id=4799 Call me stupid, but I see xid = sqlobject.StringCol(length=32, varchar=True, alternateID=True) xid *IS* StringCol in my eyes! Are my eyes lying? Well, it is a known problem in SQLObject: if you do .select(), .selectBy() or .by*() you have to convert unicode to string yourself: Channel.byXid(xid.encode(dbEncoding)) even for UnicodeColumns. ---------------------------------------------------------------------- Comment By: Wichert Akkerman (wichert) Date: 2006-01-12 15:24 Message: Logged In: YES user_id=15420 This code did use a UnicodeCol. The class definition used is: class Channel(sqlobject.SQLObject): xid = sqlobject.StringCol(length=32, varchar=True, alternateID=True) name = sqlobject.UnicodeCol(length=64, varchar=True, notNone=True) programs = sqlobject.MultipleJoin("Program") xid is not StringCol here, which is correct it is only allowed to store ASCII data. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2005-06-17 15:18 Message: Logged In: YES user_id=4799 Use UnicodeCol to convert unicode to DB strings. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2005-03-01 18:12 Message: Logged In: YES user_id=4799 What type is xid column? Can you provide a test program? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1094171&group_id=74338 |