sqlobject-cvs Mailing List for SQLObject (Page 144)
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-01-11 16:58:50
|
Author: phd
Date: 2006-01-11 16:58:48 +0000 (Wed, 11 Jan 2006)
New Revision: 1484
Modified:
home/phd/SQLObject/paramstyles/sqlobject/converters.py
home/phd/SQLObject/paramstyles/sqlobject/tests/test_converters.py
Log:
Merged patches from the revisions 1482:1483 from the trunk: the patch N 1386249 - datetime.strftime() cannot handle dates before 1900.
Modified: home/phd/SQLObject/paramstyles/sqlobject/converters.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/converters.py 2006-01-11 16:57:28 UTC (rev 1483)
+++ home/phd/SQLObject/paramstyles/sqlobject/converters.py 2006-01-11 16:58:48 UTC (rev 1484)
@@ -189,20 +189,22 @@
if datetime:
def DateTimeConverter(value, db):
- return value.strftime("'%Y-%m-%d %H:%M:%S'")
+ return "'%4d-%02d-%02d %02d:%02d:%02d'" % (
+ value.year, value.month, value.day,
+ value.hour, value.minute, value.second)
registerConverter(datetime.datetime, DateTimeConverter)
+ def DateConverter(value, db):
+ return "'%4d-%02d-%02d'" % (value.year, value.month, value.day)
+
+ registerConverter(datetime.date, DateConverter)
+
def TimeConverter(value, db):
- return value.strftime("'%H:%M:%S'")
+ return "'%02d:%02d:%02d'" % (value.hour, value.minute, value.second)
registerConverter(datetime.time, TimeConverter)
- def DateConverter(value, db):
- return value.strftime("'%Y-%m-%d'")
-
- registerConverter(datetime.date, DateConverter)
-
if Decimal:
def DecimalConverter(value, db):
return value.to_eng_string()
Modified: home/phd/SQLObject/paramstyles/sqlobject/tests/test_converters.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/tests/test_converters.py 2006-01-11 16:57:28 UTC (rev 1483)
+++ home/phd/SQLObject/paramstyles/sqlobject/tests/test_converters.py 2006-01-11 16:58:48 UTC (rev 1484)
@@ -82,6 +82,15 @@
assert sqlrepr(TRUE, 'mysql') == "1"
assert sqlrepr(FALSE, 'mysql') == "0"
+def test_datetime():
+ from datetime import datetime, date, time
+ assert sqlrepr(datetime(2005, 7, 14, 13, 31, 2)) == "'2005-07-14 13:31:02'"
+ assert sqlrepr(date(2005, 7, 14)) == "'2005-07-14'"
+ assert sqlrepr(time(13, 31, 2)) == "'13:31:02'"
+ # now dates before 1900
+ assert sqlrepr(datetime(1428, 7, 14, 13, 31, 2)) == "'1428-07-14 13:31:02'"
+ assert sqlrepr(date(1428, 7, 14)) == "'1428-07-14'"
+
def test_instance():
instance = TestClass()
assert sqlrepr(instance) == repr(instance)
|
|
From: SourceForge.net <no...@so...> - 2006-01-11 16:57:51
|
Patches item #1386249, was opened at 2005-12-20 18:09 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1386249&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: Accepted Priority: 5 Submitted By: Jan-Wijbrand Kolman (j-w) >Assigned to: Oleg Broytmann (phd) Summary: Date(time) converters cannot handle dates before 1900 Initial Comment: The Date(time) converters rely on Python's datetime.strftime method. This method cannot handle dates with years < 1900. The attached patch uses 'normal' string interpolation to overcome this limitiation. A test for this fix is included in the patch. I hope this patch proofs to be useful and can be applied to the SQLObject codebase. Thx for the great library! ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-01-11 19:57 Message: Logged In: YES user_id=4799 Applied at the revision 1482 to the 0.7-branch and 1483 to the trunk. Thank you! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1386249&group_id=74338 |
|
From: <sub...@co...> - 2006-01-11 16:57:42
|
Author: phd
Date: 2006-01-11 16:57:28 +0000 (Wed, 11 Jan 2006)
New Revision: 1483
Modified:
SQLObject/trunk/sqlobject/converters.py
SQLObject/trunk/sqlobject/tests/test_converters.py
Log:
Applied the patch N 1386249 - datetime.strftime() cannot handle dates before 1900.
Modified: SQLObject/trunk/sqlobject/converters.py
===================================================================
--- SQLObject/trunk/sqlobject/converters.py 2006-01-11 16:57:07 UTC (rev 1482)
+++ SQLObject/trunk/sqlobject/converters.py 2006-01-11 16:57:28 UTC (rev 1483)
@@ -189,20 +189,22 @@
if datetime:
def DateTimeConverter(value, db):
- return value.strftime("'%Y-%m-%d %H:%M:%S'")
+ return "'%4d-%02d-%02d %02d:%02d:%02d'" % (
+ value.year, value.month, value.day,
+ value.hour, value.minute, value.second)
registerConverter(datetime.datetime, DateTimeConverter)
+ def DateConverter(value, db):
+ return "'%4d-%02d-%02d'" % (value.year, value.month, value.day)
+
+ registerConverter(datetime.date, DateConverter)
+
def TimeConverter(value, db):
- return value.strftime("'%H:%M:%S'")
+ return "'%02d:%02d:%02d'" % (value.hour, value.minute, value.second)
registerConverter(datetime.time, TimeConverter)
- def DateConverter(value, db):
- return value.strftime("'%Y-%m-%d'")
-
- registerConverter(datetime.date, DateConverter)
-
if Decimal:
def DecimalConverter(value, db):
return value.to_eng_string()
Modified: SQLObject/trunk/sqlobject/tests/test_converters.py
===================================================================
--- SQLObject/trunk/sqlobject/tests/test_converters.py 2006-01-11 16:57:07 UTC (rev 1482)
+++ SQLObject/trunk/sqlobject/tests/test_converters.py 2006-01-11 16:57:28 UTC (rev 1483)
@@ -82,6 +82,15 @@
assert sqlrepr(TRUE, 'mysql') == "1"
assert sqlrepr(FALSE, 'mysql') == "0"
+def test_datetime():
+ from datetime import datetime, date, time
+ assert sqlrepr(datetime(2005, 7, 14, 13, 31, 2)) == "'2005-07-14 13:31:02'"
+ assert sqlrepr(date(2005, 7, 14)) == "'2005-07-14'"
+ assert sqlrepr(time(13, 31, 2)) == "'13:31:02'"
+ # now dates before 1900
+ assert sqlrepr(datetime(1428, 7, 14, 13, 31, 2)) == "'1428-07-14 13:31:02'"
+ assert sqlrepr(date(1428, 7, 14)) == "'1428-07-14'"
+
def test_instance():
instance = TestClass()
assert sqlrepr(instance) == repr(instance)
|
|
From: <sub...@co...> - 2006-01-11 16:57:19
|
Author: phd
Date: 2006-01-11 16:57:07 +0000 (Wed, 11 Jan 2006)
New Revision: 1482
Modified:
SQLObject/branches/0.7-bugfix/sqlobject/converters.py
SQLObject/branches/0.7-bugfix/sqlobject/tests/test_converters.py
Log:
Applied the patch N 1386249 - datetime.strftime() cannot handle dates before 1900.
Modified: SQLObject/branches/0.7-bugfix/sqlobject/converters.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/converters.py 2006-01-09 13:20:40 UTC (rev 1481)
+++ SQLObject/branches/0.7-bugfix/sqlobject/converters.py 2006-01-11 16:57:07 UTC (rev 1482)
@@ -189,20 +189,22 @@
if datetime:
def DateTimeConverter(value, db):
- return value.strftime("'%Y-%m-%d %H:%M:%S'")
+ return "'%4d-%02d-%02d %02d:%02d:%02d'" % (
+ value.year, value.month, value.day,
+ value.hour, value.minute, value.second)
registerConverter(datetime.datetime, DateTimeConverter)
+ def DateConverter(value, db):
+ return "'%4d-%02d-%02d'" % (value.year, value.month, value.day)
+
+ registerConverter(datetime.date, DateConverter)
+
def TimeConverter(value, db):
- return value.strftime("'%H:%M:%S'")
+ return "'%02d:%02d:%02d'" % (value.hour, value.minute, value.second)
registerConverter(datetime.time, TimeConverter)
- def DateConverter(value, db):
- return value.strftime("'%Y-%m-%d'")
-
- registerConverter(datetime.date, DateConverter)
-
if Decimal:
def DecimalConverter(value, db):
return value.to_eng_string()
Modified: SQLObject/branches/0.7-bugfix/sqlobject/tests/test_converters.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/tests/test_converters.py 2006-01-09 13:20:40 UTC (rev 1481)
+++ SQLObject/branches/0.7-bugfix/sqlobject/tests/test_converters.py 2006-01-11 16:57:07 UTC (rev 1482)
@@ -82,6 +82,15 @@
assert sqlrepr(TRUE, 'mysql') == "1"
assert sqlrepr(FALSE, 'mysql') == "0"
+def test_datetime():
+ from datetime import datetime, date, time
+ assert sqlrepr(datetime(2005, 7, 14, 13, 31, 2)) == "'2005-07-14 13:31:02'"
+ assert sqlrepr(date(2005, 7, 14)) == "'2005-07-14'"
+ assert sqlrepr(time(13, 31, 2)) == "'13:31:02'"
+ # now dates before 1900
+ assert sqlrepr(datetime(1428, 7, 14, 13, 31, 2)) == "'1428-07-14 13:31:02'"
+ assert sqlrepr(date(1428, 7, 14)) == "'1428-07-14'"
+
def test_instance():
instance = TestClass()
assert sqlrepr(instance) == repr(instance)
|
|
From: SourceForge.net <no...@so...> - 2006-01-11 16:36:49
|
Patches item #1380405, was opened at 2005-12-14 15:51 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1380405&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 Submitted By: I*igo Serna (inigoserna) Assigned to: Nobody/Anonymous (nobody) Summary: enable check_same_thread option in SQLiteConnection Initial Comment: Hi there, For a project I'm writing using CherryPy + SQLObject + sqlite3 I need to pass "enable_check_same_thread = False" option to pysqlite2 in SQLiteConnection, but SQLObject 0.7rc1 doesn't allow it, so I've written this simple patch. I know this is an evil option, but I *really* need it in my project (cherrypy app is exposed to apache using mpcp-1.2) or it's the only solution I've found. Default remains safe enable_check_same_thread = True option. Patch is against SQLObject 0.7rc1. Iñigo ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-01-11 19:36 Message: Logged In: YES user_id=4799 Please instead of extending __init__() args put check_same_thread into kw, similar to 'encoding', 'mode' and 'timeout'. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1380405&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-01-11 16:27:56
|
Patches item #1385854, was opened at 2005-12-20 08:37 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1385854&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 Submitted By: Matthias Urlichs (smurf) Assigned to: Nobody/Anonymous (nobody) Summary: Fix myql support for foreign keys Initial Comment: This change restores proper support for foreign keys when using the mysql backend. (It does not force tables to InnoDB.) ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-01-11 19:27 Message: Logged In: YES user_id=4799 What change?! You've forgotten to check the checkbox before uploading a file! ;) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1385854&group_id=74338 |
|
From: <sub...@co...> - 2006-01-10 22:27:42
|
Author: test Date: 2006-01-10 15:27:38 -0700 (Tue, 10 Jan 2006) New Revision: 1486 Modified: SQLObject/docs/download.txt Log: Updated the installation/download instructions Modified: SQLObject/docs/download.txt =================================================================== --- SQLObject/docs/download.txt 2006-01-10 22:18:53 UTC (rev 1485) +++ SQLObject/docs/download.txt 2006-01-10 22:27:38 UTC (rev 1486) @@ -2,24 +2,38 @@ ++++++++++++++++++ The latest releases are always available on the `Python Cheese Shop -<http://cheeseshop.python.org/pypi/SQLObject>`_. +<http://cheeseshop.python.org/pypi/SQLObject>`_, and is installable +with `easy_install +<http://peak.telecommunity.com/DevCenter/EasyInstall>`_. -* `SQLObject 0.7rc1 - <http://cheeseshop.python.org/packages/source/S/SQLObject/SQLObject-0.7rc1.tar.gz>`_ - (source package in ``tar.gz`` format) +You can install the latest release with:: -* `0.7rc1 Python 2.4 egg - <http://cheeseshop.python.org/packages/2.4/S/SQLObject/SQLObject-0.7rc1-py2.4.egg>`_ - (`easy_install-friendly - <http://peak.telecommunity.com/DevCenter/EasyInstall>`__ egg - package) + easy_install -U SQLObject -* `0.7rc1 Python 2.3 egg - <http://cheeseshop.python.org/packages/2.3/S/SQLObject/SQLObject-0.7rc1-py2.3.egg>`_ - (`easy_install-friendly - <http://peak.telecommunity.com/DevCenter/EasyInstall>`__ egg - package) +You can install the latest version of SQLObject with:: + easy_install SQLObject==dev + +You can install the latest bug fixing branch with:: + + easy_install SQLObject==bugfix + +If you want to require a specific revision (because, for instance, you +need a bugfix that hasn't appeared in a release), you can put this in +your `setuptools +<http://peak.telecommunity.com/DevCenter/setuptools>`_ using +``setup.py`` file:: + + setup(... + install_requires=["SQLObject==bugfix,>=0.7.1dev-r1485"], + ) + +This says that you *need* revision 1485 or higher. But it also says +that you can aquire the "bugfix" version to try to get that. In fact, +when you install ``SQLObject==bugfix`` you will be installing a +specific version, and "bugfix" is just a kind of label for a way of +acquiring the version (it points to a branch in the repository). + Repository ---------- |
|
From: <sub...@co...> - 2006-01-10 22:18:59
|
Author: test
Date: 2006-01-10 15:18:53 -0700 (Tue, 10 Jan 2006)
New Revision: 1485
Modified:
SQLObject/branches/0.7-bugfix/sqlobject/sresults.py
Log:
Merged r1108:1109 from trunk (fixing .filter())
Modified: SQLObject/branches/0.7-bugfix/sqlobject/sresults.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/sresults.py 2006-01-08 13:11:34 UTC (rev 1484)
+++ SQLObject/branches/0.7-bugfix/sqlobject/sresults.py 2006-01-10 22:18:53 UTC (rev 1485)
@@ -91,7 +91,13 @@
self.clauseTables, **self.ops)
def filter(self, filter_clause):
- return self.newClause(sqlbuilder.AND(self.clause, filter_clause))
+ if filter_clause is None:
+ # None doesn't filter anything, it's just a no-op:
+ return self
+ clause = self.clause
+ if isinstance(clause, (str, unicode)):
+ clause = sqlbuilder.SQLConstant('(%s)' % self.clause)
+ return self.newClause(sqlbuilder.AND(clause, filter_clause))
def __getitem__(self, value):
if type(value) is type(slice(1)):
|
|
From: <sub...@co...> - 2006-01-09 13:24:40
|
Author: phd Date: 2006-01-09 13:20:40 +0000 (Mon, 09 Jan 2006) New Revision: 1481 Modified: home/phd/SQLObject/paramstyles/setup.py Log: Merged patches from the revisions 1477:1480 from the trunk Modified: home/phd/SQLObject/paramstyles/setup.py =================================================================== --- home/phd/SQLObject/paramstyles/setup.py 2006-01-08 08:00:57 UTC (rev 1480) +++ home/phd/SQLObject/paramstyles/setup.py 2006-01-09 13:20:40 UTC (rev 1481) @@ -107,3 +107,4 @@ -- Ian Bicking / ia...@co... / http://blog.ianbicking.org """ + \ No newline at end of file |
|
From: <sub...@co...> - 2006-01-08 13:11:36
|
Author: ianb Date: 2006-01-08 06:11:34 -0700 (Sun, 08 Jan 2006) New Revision: 1484 Modified: SQLObject/docs/index.comments.txt Log: Web updates Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2006-01-08 13:10:46 UTC (rev 1483) +++ SQLObject/docs/index.comments.txt 2006-01-08 13:11:34 UTC (rev 1484) @@ -5,9 +5,3 @@ ip: 221.221.32.12 cool! ----------------------------------------- -date: 2006-01-08T06:10:46 -id: 2 -ip: 221.221.32.12 - -cool! |
|
From: <sub...@co...> - 2006-01-08 13:10:49
|
Author: ianb Date: 2006-01-08 06:10:46 -0700 (Sun, 08 Jan 2006) New Revision: 1483 Modified: SQLObject/docs/index.comments.txt Log: Web updates Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2006-01-08 13:10:43 UTC (rev 1482) +++ SQLObject/docs/index.comments.txt 2006-01-08 13:10:46 UTC (rev 1483) @@ -5,3 +5,9 @@ ip: 221.221.32.12 cool! +---------------------------------------- +date: 2006-01-08T06:10:46 +id: 2 +ip: 221.221.32.12 + +cool! |
|
From: <sub...@co...> - 2006-01-08 13:10:48
|
Author: ianb Date: 2006-01-08 06:10:43 -0700 (Sun, 08 Jan 2006) New Revision: 1482 Modified: SQLObject/docs/index.comments.txt Log: Web updates Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2006-01-08 10:04:33 UTC (rev 1481) +++ SQLObject/docs/index.comments.txt 2006-01-08 13:10:43 UTC (rev 1482) @@ -0,0 +1,7 @@ +==== $(example) c +---------------------------------------- +date: 2006-01-08T06:10:41 +id: 1 +ip: 221.221.32.12 + +cool! |
|
From: <sub...@co...> - 2006-01-08 08:01:05
|
Author: ianb Date: 2006-01-08 08:00:57 +0000 (Sun, 08 Jan 2006) New Revision: 1480 Modified: SQLObject/trunk/setup.py Log: test Modified: SQLObject/trunk/setup.py =================================================================== --- SQLObject/trunk/setup.py 2006-01-06 23:56:16 UTC (rev 1479) +++ SQLObject/trunk/setup.py 2006-01-08 08:00:57 UTC (rev 1480) @@ -107,3 +107,4 @@ -- Ian Bicking / ia...@co... / http://blog.ianbicking.org """ + \ No newline at end of file |
|
From: <sub...@co...> - 2006-01-06 23:56:19
|
Author: ianb Date: 2006-01-06 23:56:16 +0000 (Fri, 06 Jan 2006) New Revision: 1479 Modified: SQLObject/docs/index.comments.txt Log: Web updates Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2006-01-06 23:56:11 UTC (rev 1478) +++ SQLObject/docs/index.comments.txt 2006-01-06 23:56:16 UTC (rev 1479) @@ -1,7 +0,0 @@ -==== $(example) c + ----------------------------------------- -date: 2006-01-05T07:07:30 -id: 2 -ip: 130.79.169.245 - -I agree with you, exemples are good. |
|
From: <sub...@co...> - 2006-01-06 23:56:18
|
Author: ianb Date: 2006-01-06 23:56:11 +0000 (Fri, 06 Jan 2006) New Revision: 1478 Modified: SQLObject/docs/index.comments.txt Log: Web updates Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2006-01-06 19:52:46 UTC (rev 1477) +++ SQLObject/docs/index.comments.txt 2006-01-06 23:56:11 UTC (rev 1478) @@ -1,11 +1,5 @@ ==== $(example) c + ---------------------------------------- -date: 2006-01-05T07:07:17 -id: 1 -ip: 130.79.169.245 - -I agree with you, exemples are good. ----------------------------------------- date: 2006-01-05T07:07:30 id: 2 ip: 130.79.169.245 |
|
From: SourceForge.net <no...@so...> - 2006-01-06 21:33:02
|
Bugs item #1398848, was opened at 2006-01-07 08:32 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=1398848&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: Open Resolution: None Priority: 5 Submitted By: Jim Eggleston (egg2213) Assigned to: Nobody/Anonymous (nobody) Summary: Magic attributes not in dictionary returned by asDict() Initial Comment: Revision 1477: /SQLObject/trunk 'Magic' attributes created using the _get_xxx special method are not included in the dictionary returned by sqlmeta.asDict(). This is because the magic attributes are not in sqlmeta.columns, which asDict uses to get the property names. The work around I use for now is to add the attribute names to sqlmeta.columns explicitely. I just use a string for the value. I have no idea what side effects this may cause, but it makes asDict work the way i want it to. e.g. class Person(SQLObject): firstname = StringCol(length=20, default='') lastname = StringCol(length=20, default='') ... def _get_image(self): ... Person.sqlmeta.columns['image'] = 'Magic attribute' ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1398848&group_id=74338 |
|
From: <sub...@co...> - 2006-01-06 19:52:52
|
Author: phd
Date: 2006-01-06 19:52:46 +0000 (Fri, 06 Jan 2006)
New Revision: 1477
Modified:
home/phd/SQLObject/paramstyles/sqlobject/mssql/mssqlconnection.py
Log:
Merged patches from the revisions 1475:1476 from the trunk: applied the patch N 1376898 from the SF tracker.
Modified: home/phd/SQLObject/paramstyles/sqlobject/mssql/mssqlconnection.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/mssql/mssqlconnection.py 2006-01-06 19:49:56 UTC (rev 1476)
+++ home/phd/SQLObject/paramstyles/sqlobject/mssql/mssqlconnection.py 2006-01-06 19:52:46 UTC (rev 1477)
@@ -79,7 +79,7 @@
cur = con.cursor()
cur.execute('SET ANSI_NULLS ON')
cur.execute("SELECT CAST('12345.21' AS DECIMAL(10, 2))")
- self.decimalSeparator = cur.fetchone()[0][-3]
+ self.decimalSeparator = str(cur.fetchone()[0])[-3]
cur.close()
return con
|
|
From: SourceForge.net <no...@so...> - 2006-01-06 19:50:35
|
Patches item #1376898, was opened at 2005-12-09 08:40 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1376898&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: Accepted Priority: 5 Submitted By: Michael Baltaks (mbaltaks) Assigned to: Nobody/Anonymous (nobody) Summary: Fix for svn trunk mssqlconnection.py Initial Comment: Connecting to MS SQL Server 2000 sp3a from Windows 2000 using current 2005-12-09 svn trunk SQLObject via pymssql 0.7.3 I needed to use this patch: ============================================= ====================== --- mssqlconnection.py (revision 1383) +++ mssqlconnection.py (working copy) @@ -70,7 +70,7 @@ cur = con.cursor() cur.execute('SET ANSI_NULLS ON') cur.execute("SELECT CAST('12345.21' AS DECIMAL(10, 2))") - self.decimalSeparator = cur.fetchone()[0][-3] + self.decimalSeparator = str(cur.fetchone()[0])[-3] cur.close() return con ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-01-06 22:50 Message: Logged In: YES user_id=4799 Applied at the revision 1476. Thank you! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1376898&group_id=74338 |
|
From: <sub...@co...> - 2006-01-06 19:50:02
|
Author: phd
Date: 2006-01-06 19:49:56 +0000 (Fri, 06 Jan 2006)
New Revision: 1476
Modified:
SQLObject/trunk/sqlobject/mssql/mssqlconnection.py
Log:
Applied the patch N 1376898 from the SF tracker.
Modified: SQLObject/trunk/sqlobject/mssql/mssqlconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/mssql/mssqlconnection.py 2006-01-06 19:43:31 UTC (rev 1475)
+++ SQLObject/trunk/sqlobject/mssql/mssqlconnection.py 2006-01-06 19:49:56 UTC (rev 1476)
@@ -79,7 +79,7 @@
cur = con.cursor()
cur.execute('SET ANSI_NULLS ON')
cur.execute("SELECT CAST('12345.21' AS DECIMAL(10, 2))")
- self.decimalSeparator = cur.fetchone()[0][-3]
+ self.decimalSeparator = str(cur.fetchone()[0])[-3]
cur.close()
return con
|
|
From: SourceForge.net <no...@so...> - 2006-01-06 19:43:52
|
Patches item #1371678, was opened at 2005-12-02 15:50 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1371678&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: Accepted Priority: 5 Submitted By: Alan (alanfranz) Assigned to: Nobody/Anonymous (nobody) Summary: Docs update Initial Comment: Some update to the docs, both sqlobject.txt and inheritance.txt. This patch applies against the 0.7bugfix branch. It contains both some clarifications and some corrections. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-01-06 22:43 Message: Logged In: YES user_id=4799 Applied at the revision 1474 to the 0.7-branch and rev. 1475 to the trunk. Thank you! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1371678&group_id=74338 |
|
From: <sub...@co...> - 2006-01-06 19:43:41
|
Author: phd Date: 2006-01-06 19:43:31 +0000 (Fri, 06 Jan 2006) New Revision: 1475 Modified: SQLObject/docs/Inheritance.txt SQLObject/docs/SQLObject.txt Log: Applied the patch N 1371678 from the SF tracker - Docs update. Modified: SQLObject/docs/Inheritance.txt =================================================================== --- SQLObject/docs/Inheritance.txt 2006-01-06 19:41:51 UTC (rev 1474) +++ SQLObject/docs/Inheritance.txt 2006-01-06 19:43:31 UTC (rev 1475) @@ -304,5 +304,11 @@ is no warranty that this version will work. * Thanks to Ian Bicking for SQLObject; this is a wonderful python module. +* Although all the attributes are inherited, the same does not apply + to sqlmeta data. Don't try to get a parent column via the sqlmeta.columns + dictionary of an inherited InheritableSQLObject: it will raise a KeyError. + The same applies to joins: the sqlmeta.joins list will be empty in an + inherited InheritableSQLObject if a join has been defined in the parent + class, even though the join method will work correctly. * If you have suggestion, bugs, or patch to this patch, you can contact the SQLObject team: <sqlobject-discuss at lists.sourceforge.net> Modified: SQLObject/docs/SQLObject.txt =================================================================== --- SQLObject/docs/SQLObject.txt 2006-01-06 19:41:51 UTC (rev 1474) +++ SQLObject/docs/SQLObject.txt 2006-01-06 19:43:31 UTC (rev 1475) @@ -412,6 +412,11 @@ <Address 1 ...> >>> p.addresses [<Address 1 ...>] + +.. note:: + MultipleJoin, as well as RelatedJoin, returns a list of results. + Would you prefer to get a SelectResults objects, you should use + SQLMultipleJoin and SQLRelated Join. Usage stays immutated. Many-to-Many Relationships -------------------------- @@ -473,6 +478,19 @@ a class, and its rows do not have equivalent Python objects -- this hides some of the nuisance of a many-to-many relationship. +By the way, if you want to create an intermediate table of your own, +maybe with additional columns, be aware that the standard SQLObject +methods add/removesomething may not work as expected. Assuming that +you are providing the join with the correct joinColumn and otherColumn +arguments, be aware it's not possibile to insert extra data via such +methodos, nor will they set any default value. + +Let's have an example: in the previous User/Role system, +you're creating a UserRole intermediate table, with the two columns +containing the foreign keys for the MTM relationship, and an additional +DateTimeCol defaulting to datetime.datetime.now : that column will +stay empty when adding roles with the addRole method. + You may notice that the columns have the extra keyword argument `alternateID`. If you use ``alternateID=True``, this means that the column uniquely identifies rows -- like a username uniquely identifies @@ -732,6 +750,10 @@ saying that if you're not using the ``sqlmeta`` class you're doing things in a deprecated way. +Please note: when using InheritedSQLObject, sqlmeta attributes don't +get inherited, e.g. you can't access via the sqlmeta.columns dictionary +the parent's class column objects. + Using sqlmeta ~~~~~~~~~~~~~ @@ -953,6 +975,22 @@ representation (as those commands generate SQL that is run on the database). +Undefined attributes +~~~~~~~~~~~~~~~~~~~~ + +There's one more thing worth telling, because you may something get +strange results when making a typo. SQLObject won't ever complain or +raise any error when setting a previously undefined attribute; it will +simply set it, without making any change to the database, i.e: it will +work as any other attribute you set on any Python class, it will +'forget' it is a SQLObject class. + +This may sometimes be a problem: if you have got a 'name' attribute and +you you write 'a.namme="Victor"' once, when setting it, you'll get no +error, no warning, nothing at all, and you may get crazy at understanding +why you don't get that value set in your DB. + + Reference ========= @@ -1026,6 +1064,8 @@ `CurrencyCol`: Equivalent to ``DecimalCol(size=10, precision=2)``. + WARNING: as DecimalCol MAY NOT return precise numbers, this column + may share the same behaviour. Please read the DecimalCol warning. `DateTimeCol`: A date and time (usually returned as an datetime or mxDateTime object). @@ -1040,7 +1080,12 @@ Base-10, precise number. Uses the keyword arguments `size` for number of digits stored, and `precision` for the number of digits after the decimal point. - + WARNING: it may happen that DecimalCol values, although correctly + stored in the DB, are returned as floats instead of decimals. + You should test with your database adapter, and you should try + importing the Decimal type and your DB adapter before importing + SQLObject. + `EnumCol`: One of several string values -- give the possible strings as a list, with the `enumValues` keyword argument. MySQL has a native @@ -1090,12 +1135,15 @@ but for back references and many-to-many relationships you'll use joins. -MultipleJoin: One-to-Many -~~~~~~~~~~~~~~~~~~~~~~~~~ +MultipleJoin and SQLMultipleJoin: One-to-Many +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ See `One-to-Many Relationships`_ for an example of one-to-many relationships. +MultipleJoin returns a list of results, while SQLMultipleJoin returns a +SelectResults object. + Several keyword arguments are allowed to the `MultipleJoin` constructor: .. _`Multiple Join Keywords`: @@ -1104,6 +1152,14 @@ The column name of the key that points to this table. So, if you have a table ``Product``, and another table has a column ``ProductNo`` that points to this table, then you'd use ``joinColumn="ProductNo"``. + WARNING: the argument you pass must conform to the column name in the + database, not to the column in the class. So, if you have a SQLObject + containing the 'ProductNo' column, this will probably be translated + into 'product_no_id' in the DB ( product_no is the normal uppercase- + to-lowercase + underscores SQLO Translation, the added _id is just + because the column referring to the table is probably a ForeignKey, + and SQLO translates foreign keys that way). + You should pass that parameter. `orderBy`: Like the `orderBy`_ argument to `select()`, you can specify the order that the joined objects should be returned in. `_defaultOrder` @@ -1114,24 +1170,45 @@ created automatically, and is normally implied (i.e., ``addresses = MultipleJoin(...)`` implies ``joinMethodName="addresses"``). -RelatedJoin: Many-to-Many -~~~~~~~~~~~~~~~~~~~~~~~~~ +RelatedJoin and SQLRelatedJoin: Many-to-Many +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ See `Many-to-Many Relationships`_ for examples of using many-to-many joins. +RelatedJoin returns a list of results, while SQLRelatedJoin returns a +SelectResults object. + + `RelatedJoin` has all the keyword arguments of `MultipleJoin`__, plus: __ `Multiple Join Keywords`_ `otherColumn`: - Similar to `joinColumn`, but referring to the joined class. + Similar to `joinColumn`, but referring to the joined class. Same + warning about column name. `intermediateTable`: The name of the intermediate table which references both classes. + WARNING: you should pass the database table name, not the SQLO + class representine. `addRemoveName`: In the `user/role example`__, the methods `addRole(role)` and `removeRole(role)` are created. The ``Role`` portion of these method names can be changed by giving a string value here. +`createRelatedTable`: + default: ``True``. If ``False``, then the related table won't be + automatically created; instead you must manually create it (e.g., + with explicit SQLObject classes for the joins). New in 0.7.1. +.. note:: + Let's suppose you have SQLObject-inherited classes Alpha and Beta, + and an AlphasAndBetas used for the many-to-many relationship. + AlphasAndBetas contains the alphaIndex Foreign Key column referring + to Alpha, and the betaIndex FK column referring to Beta. + if you want a 'betas' RelatedJoin in Alpha, you should add it to + Alpha passing 'Beta' (class name!) as the first parameter, then + passing 'alpha_index_id' as joinColumn, 'beta_index_id' as + otherColumn, and 'alphas_and_betas' as intermediateTable. + __ `Many-to-Many Relationships`_ An example schema that requires the use of `joinColumn`, `otherColumn`, @@ -1352,7 +1429,6 @@ class Person(SQLObject): _style = MixedCaseStyle(longID=True) - firstName = StringCol() lastName = StringCol() |
|
From: <sub...@co...> - 2006-01-06 19:41:56
|
Author: phd Date: 2006-01-06 19:41:51 +0000 (Fri, 06 Jan 2006) New Revision: 1474 Modified: SQLObject/branches/0.7-bugfix/docs/Inheritance.txt SQLObject/branches/0.7-bugfix/docs/SQLObject.txt Log: Applied the patch N 1371678 from the SF tracker - Docs update. Modified: SQLObject/branches/0.7-bugfix/docs/Inheritance.txt =================================================================== --- SQLObject/branches/0.7-bugfix/docs/Inheritance.txt 2006-01-05 16:30:37 UTC (rev 1473) +++ SQLObject/branches/0.7-bugfix/docs/Inheritance.txt 2006-01-06 19:41:51 UTC (rev 1474) @@ -304,5 +304,11 @@ is no warranty that this version will work. * Thanks to Ian Bicking for SQLObject; this is a wonderful python module. +* Although all the attributes are inherited, the same does not apply + to sqlmeta data. Don't try to get a parent column via the sqlmeta.columns + dictionary of an inherited InheritableSQLObject: it will raise a KeyError. + The same applies to joins: the sqlmeta.joins list will be empty in an + inherited InheritableSQLObject if a join has been defined in the parent + class, even though the join method will work correctly. * If you have suggestion, bugs, or patch to this patch, you can contact the SQLObject team: <sqlobject-discuss at lists.sourceforge.net> Modified: SQLObject/branches/0.7-bugfix/docs/SQLObject.txt =================================================================== --- SQLObject/branches/0.7-bugfix/docs/SQLObject.txt 2006-01-05 16:30:37 UTC (rev 1473) +++ SQLObject/branches/0.7-bugfix/docs/SQLObject.txt 2006-01-06 19:41:51 UTC (rev 1474) @@ -407,6 +407,11 @@ <Address 1 ...> >>> p.addresses [<Address 1 ...>] + +.. note:: + MultipleJoin, as well as RelatedJoin, returns a list of results. + Would you prefer to get a SelectResults objects, you should use + SQLMultipleJoin and SQLRelated Join. Usage stays immutated. Many-to-Many Relationships -------------------------- @@ -468,6 +473,19 @@ a class, and its rows do not have equivalent Python objects -- this hides some of the nuisance of a many-to-many relationship. +By the way, if you want to create an intermediate table of your own, +maybe with additional columns, be aware that the standard SQLObject +methods add/removesomething may not work as expected. Assuming that +you are providing the join with the correct joinColumn and otherColumn +arguments, be aware it's not possibile to insert extra data via such +methodos, nor will they set any default value. + +Let's have an example: in the previous User/Role system, +you're creating a UserRole intermediate table, with the two columns +containing the foreign keys for the MTM relationship, and an additional +DateTimeCol defaulting to datetime.datetime.now : that column will +stay empty when adding roles with the addRole method. + You may notice that the columns have the extra keyword argument `alternateID`. If you use ``alternateID=True``, this means that the column uniquely identifies rows -- like a username uniquely identifies @@ -727,6 +745,10 @@ saying that if you're not using the ``sqlmeta`` class you're doing things in a deprecated way. +Please note: when using InheritedSQLObject, sqlmeta attributes don't +get inherited, e.g. you can't access via the sqlmeta.columns dictionary +the parent's class column objects. + Using sqlmeta ~~~~~~~~~~~~~ @@ -948,6 +970,22 @@ representation (as those commands generate SQL that is run on the database). +Undefined attributes +~~~~~~~~~~~~~~~~~~~~ + +There's one more thing worth telling, because you may something get +strange results when making a typo. SQLObject won't ever complain or +raise any error when setting a previously undefined attribute; it will +simply set it, without making any change to the database, i.e: it will +work as any other attribute you set on any Python class, it will +'forget' it is a SQLObject class. + +This may sometimes be a problem: if you have got a 'name' attribute and +you you write 'a.namme="Victor"' once, when setting it, you'll get no +error, no warning, nothing at all, and you may get crazy at understanding +why you don't get that value set in your DB. + + Reference ========= @@ -1021,6 +1059,8 @@ `CurrencyCol`: Equivalent to ``DecimalCol(size=10, precision=2)``. + WARNING: as DecimalCol MAY NOT return precise numbers, this column + may share the same behaviour. Please read the DecimalCol warning. `DateTimeCol`: A date and time (usually returned as an datetime or mxDateTime object). @@ -1035,7 +1075,12 @@ Base-10, precise number. Uses the keyword arguments `size` for number of digits stored, and `precision` for the number of digits after the decimal point. - + WARNING: it may happen that DecimalCol values, although correctly + stored in the DB, are returned as floats instead of decimals. + You should test with your database adapter, and you should try + importing the Decimal type and your DB adapter before importing + SQLObject. + `EnumCol`: One of several string values -- give the possible strings as a list, with the `enumValues` keyword argument. MySQL has a native @@ -1085,12 +1130,15 @@ but for back references and many-to-many relationships you'll use joins. -MultipleJoin: One-to-Many -~~~~~~~~~~~~~~~~~~~~~~~~~ +MultipleJoin and SQLMultipleJoin: One-to-Many +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ See `One-to-Many Relationships`_ for an example of one-to-many relationships. +MultipleJoin returns a list of results, while SQLMultipleJoin returns a +SelectResults object. + Several keyword arguments are allowed to the `MultipleJoin` constructor: .. _`Multiple Join Keywords`: @@ -1099,6 +1147,14 @@ The column name of the key that points to this table. So, if you have a table ``Product``, and another table has a column ``ProductNo`` that points to this table, then you'd use ``joinColumn="ProductNo"``. + WARNING: the argument you pass must conform to the column name in the + database, not to the column in the class. So, if you have a SQLObject + containing the 'ProductNo' column, this will probably be translated + into 'product_no_id' in the DB ( product_no is the normal uppercase- + to-lowercase + underscores SQLO Translation, the added _id is just + because the column referring to the table is probably a ForeignKey, + and SQLO translates foreign keys that way). + You should pass that parameter. `orderBy`: Like the `orderBy`_ argument to `select()`, you can specify the order that the joined objects should be returned in. `_defaultOrder` @@ -1109,24 +1165,45 @@ created automatically, and is normally implied (i.e., ``addresses = MultipleJoin(...)`` implies ``joinMethodName="addresses"``). -RelatedJoin: Many-to-Many -~~~~~~~~~~~~~~~~~~~~~~~~~ +RelatedJoin and SQLRelatedJoin: Many-to-Many +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ See `Many-to-Many Relationships`_ for examples of using many-to-many joins. +RelatedJoin returns a list of results, while SQLRelatedJoin returns a +SelectResults object. + + `RelatedJoin` has all the keyword arguments of `MultipleJoin`__, plus: __ `Multiple Join Keywords`_ `otherColumn`: - Similar to `joinColumn`, but referring to the joined class. + Similar to `joinColumn`, but referring to the joined class. Same + warning about column name. `intermediateTable`: The name of the intermediate table which references both classes. + WARNING: you should pass the database table name, not the SQLO + class representine. `addRemoveName`: In the `user/role example`__, the methods `addRole(role)` and `removeRole(role)` are created. The ``Role`` portion of these method names can be changed by giving a string value here. +`createRelatedTable`: + default: ``True``. If ``False``, then the related table won't be + automatically created; instead you must manually create it (e.g., + with explicit SQLObject classes for the joins). New in 0.7.1. +.. note:: + Let's suppose you have SQLObject-inherited classes Alpha and Beta, + and an AlphasAndBetas used for the many-to-many relationship. + AlphasAndBetas contains the alphaIndex Foreign Key column referring + to Alpha, and the betaIndex FK column referring to Beta. + if you want a 'betas' RelatedJoin in Alpha, you should add it to + Alpha passing 'Beta' (class name!) as the first parameter, then + passing 'alpha_index_id' as joinColumn, 'beta_index_id' as + otherColumn, and 'alphas_and_betas' as intermediateTable. + __ `Many-to-Many Relationships`_ An example schema that requires the use of `joinColumn`, `otherColumn`, @@ -1347,7 +1424,6 @@ class Person(SQLObject): _style = MixedCaseStyle(longID=True) - firstName = StringCol() lastName = StringCol() |
|
From: SourceForge.net <no...@so...> - 2006-01-06 19:36:29
|
Patches item #1370261, was opened at 2005-11-30 21:13 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1370261&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: Accepted Priority: 5 Submitted By: Luke Opperman (luke_opperman) Assigned to: Nobody/Anonymous (nobody) Summary: Fix for plain/nonplain setters during create Initial Comment: Using rev 1326 (probably long before this, found it during attempting to migrate an 0.5-based app to svn version). I've attached a simple test case, the problem is in main.SQLObject.set. Flow: 1. set plain setters 2. set nonplain setters (in this case, a non-db column) 2a. in the problem scenario, these then set some db columns 2b. which in _SO_setValue add their correct values to _SO_createValues 3. set then updates _SO_createValues with the original dict, which has the default values for the db columns set by the nonplain. Not sure if there's an intentional reason to delay populating _SO_createValues, by moving self._SO_createValues.update(kw) between steps 1 and 2 the tests pass for me. This is that simple patch and the associated test. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-01-06 22:36 Message: Logged In: YES user_id=4799 It seems it's been applied already. Test was renamed to test_setters.py. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1370261&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-01-06 08:48:09
|
Bugs item #1398353, was opened at 2006-01-06 00:48 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=1398353&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: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: full path cannot work? SQLObject 0.7.0 Initial Comment: I tried the following in windows XP using SQLObject 0.7.0, the path for DB is: C:\\Documents and Settings\\guest\\My Documents\\test.db sDBPath = os.path.abspath('test.db') sqlhub.processConnection = connectionForURI('sqlite:%s' % sDBPath) it insists on having "/". -------- exception ----------------- File "c:\program files\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\dbconnection.py", line 80, in _parseURI assert rest.startswith('/'), "URIs must start with scheme:/ -- you did not include a / (in %r)" % rest AssertionError: URIs must start with scheme:/ -- you did not include a / (in 'C:\\Documents and Settings\\tambrinc\\My Documents\\test.db') ------------------------------------ sqlhub.processConnection = connectionForURI('sqlite:/%s' % sDBPath) -------- exception ----------------- File "C:\Program Files\Python24\Lib\site-packages\sqlite\main.py", line 445, in __init__ self.db = _sqlite.connect(database, mode) _sqlite.DatabaseError: unable to open database file ------------------------------------ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1398353&group_id=74338 |
|
From: <sub...@co...> - 2006-01-05 16:31:03
|
Author: test Date: 2006-01-05 16:30:37 +0000 (Thu, 05 Jan 2006) New Revision: 1473 Modified: SQLObject/docs/links.txt Log: Added two new links: reddit and stoq; moved sections around a bit Modified: SQLObject/docs/links.txt =================================================================== --- SQLObject/docs/links.txt 2006-01-05 14:07:30 UTC (rev 1472) +++ SQLObject/docs/links.txt 2006-01-05 16:30:37 UTC (rev 1473) @@ -5,6 +5,37 @@ report with the link and title <http://sourceforge.net/tracker/?atid=540672&group_id=74338&func=browse>`_. +Articles and Documentation +-------------------------- + +* `Canonical's SQLObject guide + <https://wiki.launchpad.canonical.com/SQLObjectGuide>`_. + +* `SQLObject and CherryPy + <http://www.cherrypy.org/wiki/SQLObjectThreadPerConnection>`_. + +* `SQLObject & Database Programming in Python + <http://ianbicking.org/docs/sqlobject-presentation/sqlobject-and-database-programming.html>`_; + slides from a presentation on SQLObject. + +* `Connecting databases to Python with SQLObject + <http://www-128.ibm.com/developerworks/library/os-pythonsqlo/index.html?ca=drs>`_; + an article at DeveloperWorks. + +* `Handling Form data with Formencode + SQLObject + <http://www.groovie.org/articles/2005/08/24/handling-form-data-with-formencode-sqlobject>`_; + a post by Ben Bangert about using SQLObject with `FormEncode + <http://formencode.org>`_. + +* `Translation of SQLObject documentation to Japanese + <http://www.python.jp/~ymasuda/sqlobject/SQLObject.html>`_. + +* `How to Use Database Agnostic SQL in SQLObject + <http://groovie.org/articles/2005/11/01/how-to-use-database-agnostic-sql-in-sqlobject>`_. + +* `Using SQLObject with memcached + <http://www.zachary.com/s/blog/2005/09/18/sqlobject_and_memcached,_part_1>`_. + Open Source Projects -------------------- @@ -57,36 +88,12 @@ * `My Newspaper <http://inigo.katxi.org/devel/mynewspaper/>`_, a personal RSS Aggregator and Reader. -Articles and Documentation --------------------------- +* `Stoq <http://www.stoq.com.br/>`_, an open source retail system. -* `Canonical's SQLObject guide - <https://wiki.launchpad.canonical.com/SQLObjectGuide>`_. +Other Projects Using SQLObject +------------------------------ -* `Webware/Paste + SQLObject Tutorial - <http://pythonpaste.org/docs/TodoTutorial.html>`_. - -* `SQLObject and CherryPy - <http://www.cherrypy.org/wiki/SQLObjectThreadPerConnection>`_. - -* `SQLObject & Database Programming in Python - <http://ianbicking.org/docs/sqlobject-presentation/sqlobject-and-database-programming.html>`_; - slides from a presentation on SQLObject. - -* `Connecting databases to Python with SQLObject - <http://www-128.ibm.com/developerworks/library/os-pythonsqlo/index.html?ca=drs>`_; - an article at DeveloperWorks. - -* `Handling Form data with Formencode + SQLObject - <http://www.groovie.org/articles/2005/08/24/handling-form-data-with-formencode-sqlobject>`_; - a post by Ben Bangert about using SQLObject with `FormEncode - <http://formencode.org>`_. - -* `Translation of SQLObject documentation to Japanese - <http://www.python.jp/~ymasuda/sqlobject/SQLObject.html>`_. - -* `How to Use Database Agnostic SQL in SQLObject - <http://groovie.org/articles/2005/11/01/how-to-use-database-agnostic-sql-in-sqlobject>`_. - -* `Using SQLObject with memcached - <http://www.zachary.com/s/blog/2005/09/18/sqlobject_and_memcached,_part_1>`_. +* `Reddit <http://reddit.com/>`_, "A source for what's new and popular + on the web -- customized for you." That's from their + FAQ... basically it's a list of user-submitted articles with a group + rating system, and personal adjustments. |