sqlobject-cvs Mailing List for SQLObject (Page 105)
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...> - 2007-02-12 14:10:02
|
Author: phd Date: 2007-02-12 07:09:53 -0700 (Mon, 12 Feb 2007) New Revision: 2280 Added: SQLObject/tags/0.8.0/ Log: SQLObject 0.8.0 Copied: SQLObject/tags/0.8.0 (from rev 2279, SQLObject/branches/0.8) |
|
From: <sub...@co...> - 2007-02-12 14:03:10
|
Author: phd
Date: 2007-02-12 07:02:58 -0700 (Mon, 12 Feb 2007)
New Revision: 2279
Modified:
SQLObject/branches/0.8/docs/News.txt
SQLObject/branches/0.8/setup.cfg
SQLObject/branches/0.8/setup.py
Log:
SQLObject 0.8.0 released 12 Feb 2007.
Modified: SQLObject/branches/0.8/docs/News.txt
===================================================================
--- SQLObject/branches/0.8/docs/News.txt 2007-02-12 14:00:54 UTC (rev 2278)
+++ SQLObject/branches/0.8/docs/News.txt 2007-02-12 14:02:58 UTC (rev 2279)
@@ -10,6 +10,8 @@
SQLObject 0.8.0
===============
+Released 12 Feb 2007.
+
Features & Interface
--------------------
Modified: SQLObject/branches/0.8/setup.cfg
===================================================================
--- SQLObject/branches/0.8/setup.cfg 2007-02-12 14:00:54 UTC (rev 2278)
+++ SQLObject/branches/0.8/setup.cfg 2007-02-12 14:02:58 UTC (rev 2279)
@@ -34,6 +34,4 @@
make-dirs = 1
## For live documentation:
-# doc-dest = scp://ianbicking@shell.sf.net/home/groups/s/sq/sqlobject/htdocs/
-## For in-development documentation:
-doc-dest = scp://ianbicking@shell.sf.net/home/groups/s/sq/sqlobject/htdocs/devel/
+doc-dest = scp://ianbicking@shell.sf.net/home/groups/s/sq/sqlobject/htdocs/
Modified: SQLObject/branches/0.8/setup.py
===================================================================
--- SQLObject/branches/0.8/setup.py 2007-02-12 14:00:54 UTC (rev 2278)
+++ SQLObject/branches/0.8/setup.py 2007-02-12 14:02:58 UTC (rev 2279)
@@ -55,7 +55,7 @@
],
author="Ian Bicking",
author_email="ia...@co...",
- url="http://sqlobject.org/devel/",
+ url="http://sqlobject.org/",
download_url="http://cheeseshop.python.org/pypi/SQLObject/",
license="LGPL",
packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages],
|
|
From: <sub...@co...> - 2007-02-12 14:01:09
|
Author: phd Date: 2007-02-12 07:00:54 -0700 (Mon, 12 Feb 2007) New Revision: 2278 Modified: SQLObject/docs/News.txt Log: SQLObject 0.8.0 released 12 Feb 2007. Modified: SQLObject/docs/News.txt =================================================================== --- SQLObject/docs/News.txt 2007-02-08 15:53:43 UTC (rev 2277) +++ SQLObject/docs/News.txt 2007-02-12 14:00:54 UTC (rev 2278) @@ -47,6 +47,8 @@ SQLObject 0.8.0 =============== +Released 12 Feb 2007. + Features & Interface -------------------- |
|
From: Winning <myr...@hi...> - 2007-02-09 13:46:58
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2900.2912" name=3D"GENERATOR"> </HEAD> <BODY> <DIV align=3Dleft><FONT face=3DArial size=3D2>Thank you for your loan request, which we recieved yesterday, your refinance application has been accepted</FONT></DIV><BR> <DIV align=3Dleft><FONT face=3DArial size=3D2>Good Credit or Not, We are ready to give you a $318,000 loan, after further review, our lenders have established the lowest monthly payments.</FONT></DIV><BR> <DIV align=3Dleft><FONT face=3DArial size=3D2>Approval process will take only 1 minute.</FONT></DIV><BR> <DIV align=3Dleft><FONT face=3DArial size=3D2>Please visit the confirmation link below and fill-out our short 30 second Secure Web-Form. </FONT></DIV><BR> <a href=3D"http://watceeasy.com">http://watceeasy.com</a></BODY></HTML> |
|
From: SourceForge.net <no...@so...> - 2007-02-08 16:53:30
|
Bugs item #1652661, was opened at 2007-02-05 11:31 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1652661&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Postgres Group: SQLObject release (specify) Status: Closed Resolution: Works For Me Priority: 5 Private: No Submitted By: Elvis Pfutzenreuter (epx) Assigned to: Oleg Broytmann (phd) Summary: orderBy with negative sign does not work for DateCol's Initial Comment: Version: SQLObject-0.7.3-py2.4.egg While using select(..., orderBy=-datecolumn) works for MySQL, it fails for PostgreSQL. The report error is: ERROR: operator does not exist: - timestamp without time zone\nHINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. Probably Postgres does not like arithmetic operations with timestamps/dates. Removing the negative sign and doing select(orderby=datecolumn).reversed() works just fine. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2007-02-08 08:53 Message: Logged In: NO I was using Postgres 8.1, maybe it makes a difference. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2007-02-08 07:05 Message: Logged In: YES user_id=4799 Originator: NO Works for me. The following program works with Postgres 7.4, SQLObject 0.7.3: __connection__ = "postgres:/test?debug=1" class Test(SQLObject): dt = DateTimeCol() Test.createTable() from datetime import datetime Test(dt=datetime(1967, 12, 21)) print Test.select(orderBy=Test.q.dt) print list(Test.select(orderBy=Test.q.dt)) It produces the following output: 1/Query : CREATE TABLE test ( id SERIAL PRIMARY KEY, dt TIMESTAMP ) 1/QueryR : CREATE TABLE test ( id SERIAL PRIMARY KEY, dt TIMESTAMP ) 1/COMMIT : auto 1/QueryIns: INSERT INTO test (id, dt) VALUES (1, '1967-12-21 00:00:00') 1/COMMIT : auto 1/QueryOne: SELECT dt FROM test WHERE id = (1) 1/QueryR : SELECT dt FROM test WHERE id = (1) 1/COMMIT : auto SELECT test.id, test.dt FROM test WHERE 1 = 1 ORDER BY test.dt 1/Select : SELECT test.id, test.dt FROM test WHERE 1 = 1 ORDER BY test.dt 1/QueryR : SELECT test.id, test.dt FROM test WHERE 1 = 1 ORDER BY test.dt 1/COMMIT : auto [<Test 1L dt='datetime.datetime...)'>] No problem. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1652661&group_id=74338 |
|
From: <sub...@co...> - 2007-02-08 15:54:14
|
Author: phd Date: 2007-02-08 08:53:43 -0700 (Thu, 08 Feb 2007) New Revision: 2277 Modified: SQLObject/tags/0.8.0b3/setup.cfg SQLObject/tags/0.8.0b3/setup.py Log: Version 0.8.0b3. Modified: SQLObject/tags/0.8.0b3/setup.cfg =================================================================== --- SQLObject/tags/0.8.0b3/setup.cfg 2007-02-08 15:51:02 UTC (rev 2276) +++ SQLObject/tags/0.8.0b3/setup.cfg 2007-02-08 15:53:43 UTC (rev 2277) @@ -1,10 +1,3 @@ -[easy_install] -#find_links = http://svn.pythonpaste.org/package_index.html - -[egg_info] -tag_build = dev -tag_svn_revision = true - [pudge] theme = pythonpaste.org docs = docs/index.txt docs/SQLObject.txt docs/TODO.txt Modified: SQLObject/tags/0.8.0b3/setup.py =================================================================== --- SQLObject/tags/0.8.0b3/setup.py 2007-02-08 15:51:02 UTC (rev 2276) +++ SQLObject/tags/0.8.0b3/setup.py 2007-02-08 15:53:43 UTC (rev 2277) @@ -28,7 +28,7 @@ """ setup(name="SQLObject", - version="0.8", + version="0.8.0b3", description="Object-Relational Manager, aka database wrapper", long_description="""\ SQLObject is a popular *Object Relational Manager* for providing an |
|
From: <sub...@co...> - 2007-02-08 15:51:29
|
Author: phd Date: 2007-02-08 08:51:02 -0700 (Thu, 08 Feb 2007) New Revision: 2276 Added: SQLObject/tags/0.8.0b3/ Log: SQLObject 0.8.0b3 Copied: SQLObject/tags/0.8.0b3 (from rev 2275, SQLObject/branches/0.8) |
|
From: <sub...@co...> - 2007-02-08 15:47:49
|
Author: phd Date: 2007-02-08 08:47:29 -0700 (Thu, 08 Feb 2007) New Revision: 2275 Modified: home/phd/SQLObject/paramstyles/README.txt Log: Merged patches from the revisions 2272:2274 from the trunk Modified: home/phd/SQLObject/paramstyles/README.txt =================================================================== --- home/phd/SQLObject/paramstyles/README.txt 2007-02-08 15:45:09 UTC (rev 2274) +++ home/phd/SQLObject/paramstyles/README.txt 2007-02-08 15:47:29 UTC (rev 2275) @@ -1,4 +1,4 @@ -SQLObject 0.7 +SQLObject 0.8 ============= Thanks for looking at SQLObject. SQLObject is an object-relational |
|
From: <sub...@co...> - 2007-02-08 15:45:30
|
Author: phd Date: 2007-02-08 08:45:09 -0700 (Thu, 08 Feb 2007) New Revision: 2274 Modified: SQLObject/branches/0.8/README.txt Log: SQLObject 0.8. Modified: SQLObject/branches/0.8/README.txt =================================================================== --- SQLObject/branches/0.8/README.txt 2007-02-08 15:44:47 UTC (rev 2273) +++ SQLObject/branches/0.8/README.txt 2007-02-08 15:45:09 UTC (rev 2274) @@ -1,4 +1,4 @@ -SQLObject 0.7 +SQLObject 0.8 ============= Thanks for looking at SQLObject. SQLObject is an object-relational |
|
From: <sub...@co...> - 2007-02-08 15:45:12
|
Author: phd Date: 2007-02-08 08:44:47 -0700 (Thu, 08 Feb 2007) New Revision: 2273 Modified: SQLObject/trunk/README.txt Log: SQLObject 0.8. Modified: SQLObject/trunk/README.txt =================================================================== --- SQLObject/trunk/README.txt 2007-02-08 15:41:29 UTC (rev 2272) +++ SQLObject/trunk/README.txt 2007-02-08 15:44:47 UTC (rev 2273) @@ -1,4 +1,4 @@ -SQLObject 0.7 +SQLObject 0.8 ============= Thanks for looking at SQLObject. SQLObject is an object-relational |
|
From: <sub...@co...> - 2007-02-08 15:39:20
|
Author: phd Date: 2007-02-08 08:38:42 -0700 (Thu, 08 Feb 2007) New Revision: 2271 Modified: SQLObject/docs/SQLObject.txt Log: SQLObject 0.8. Modified: SQLObject/docs/SQLObject.txt =================================================================== --- SQLObject/docs/SQLObject.txt 2007-02-07 18:06:39 UTC (rev 2270) +++ SQLObject/docs/SQLObject.txt 2007-02-08 15:38:42 UTC (rev 2271) @@ -1,5 +1,5 @@ ````````````` -SQLObject 0.7 +SQLObject 0.8 ````````````` .. contents:: Contents: |
|
From: SourceForge.net <no...@so...> - 2007-02-08 15:10:21
|
Bugs item #1652100, was opened at 2007-02-05 05:40 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1652100&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: Wont Fix Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: _executeRetry fails if self.encoding is utf8 Initial Comment: Version: SQLObject-0.8.0b2-py2.4 E-Mail adresse: sql...@xc... _executeRetry fails if self.encoding is utf8. My connection string looks as follows: sqlobject.dburi="mysql://foo:bar@localhost/mallorca?use_unicode=1&unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8&sqlobject_encoding=utf8" I think changing sqlobject/mysql/my sqlconnection.py Line 98 from if self.need_unicode: doo something to if self.need_unicode and self.encoding != "utf8" would solve the problem --- snip -- 500 Internal error The server encountered an unexpected condition which prevented it from fulfilling the request. Page handler: <function _wrapper at 0xb71b5764> Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 105, in _run self.main() File "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 254, in main body = page_handler(*virtual_path, **self.params) File "/usr/lib/python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/identity/conditions.py", line 275, in _wrapper return fn( *args, **kw ) File "<string>", line 3, in default File "/usr/lib/python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/controllers.py", line 334, in expose output = database.run_with_transaction( File "<string>", line 5, in run_with_transaction File "/usr/lib/python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/database.py", line 302, in so_rwt retval = func(*args, **kw) File "<string>", line 5, in _expose File "/usr/lib/python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/controllers.py", line 351, in <lambda> mapping, fragment, args, kw))) File "/usr/lib/python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/controllers.py", line 391, in _execute_func return _process_output(output, template, format, content_type, mapping, fragment) File "/usr/lib/python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/controllers.py", line 82, in _process_output fragment=fragment) File "/usr/lib/python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/view/base.py", line 131, in render return engine.render(**kw) File "/usr/lib/python2.4/site-packages/TurboCheetah-0.9.5-py2.4.egg/turbocheetah/cheetahsupport.py", line 115, in render return str(tempobj) File "/usr/lib/python2.4/site-packages/Cheetah-2.0rc7-py2.4-linux-i686.egg/Cheetah/Template.py", line 990, in __str__ def __str__(self): return getattr(self, mainMethName)() File "/data/www/hermes/mallorca/mallorca/mallorca/templates/admin_base.py", line 474, in respond _v = VFFSL(SL,"content",True) # '${content}' on line 114, col 13 File "/data/www/hermes/mallorca/mallorca/mallorca/templates/admin_fincas.py", line 95, in content for object in VFFSL(SL,"objects",True): # generated from line 11, col 9 File "/usr/lib/python2.4/site-packages/SQLObject-0.8.0b2-py2.4.egg/sqlobject/sresults.py", line 160, in __iter__ return iter(list(self.lazyIter())) File "/usr/lib/python2.4/site-packages/SQLObject-0.8.0b2-py2.4.egg/sqlobject/sresults.py", line 168, in lazyIter return conn.iterSelect(self) File "/usr/lib/python2.4/site-packages/SQLObject-0.8.0b2-py2.4.egg/sqlobject/dbconnection.py", line 831, in iterSelect select, keepConnection=True))) File "/usr/lib/python2.4/site-packages/SQLObject-0.8.0b2-py2.4.egg/sqlobject/dbconnection.py", line 760, in __init__ self.dbconn._executeRetry(self.rawconn, self.cursor, self.query) File "/usr/lib/python2.4/site-packages/SQLObject-0.8.0b2-py2.4.egg/sqlobject/mysql/mysqlconnection.py", line 98, in _executeRetry myquery = unicode(query, self.encoding) TypeError: decoding Unicode is not supported -- snip -- ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2007-02-08 18:10 Message: Logged In: YES user_id=4799 Originator: NO You've used a unicode expression where it is not allowed. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1652100&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2007-02-08 15:05:06
|
Bugs item #1652661, was opened at 2007-02-05 22:31 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1652661&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Postgres Group: SQLObject release (specify) >Status: Closed >Resolution: Works For Me Priority: 5 Private: No Submitted By: Elvis Pfutzenreuter (epx) >Assigned to: Oleg Broytmann (phd) Summary: orderBy with negative sign does not work for DateCol's Initial Comment: Version: SQLObject-0.7.3-py2.4.egg While using select(..., orderBy=-datecolumn) works for MySQL, it fails for PostgreSQL. The report error is: ERROR: operator does not exist: - timestamp without time zone\nHINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. Probably Postgres does not like arithmetic operations with timestamps/dates. Removing the negative sign and doing select(orderby=datecolumn).reversed() works just fine. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2007-02-08 18:05 Message: Logged In: YES user_id=4799 Originator: NO Works for me. The following program works with Postgres 7.4, SQLObject 0.7.3: __connection__ = "postgres:/test?debug=1" class Test(SQLObject): dt = DateTimeCol() Test.createTable() from datetime import datetime Test(dt=datetime(1967, 12, 21)) print Test.select(orderBy=Test.q.dt) print list(Test.select(orderBy=Test.q.dt)) It produces the following output: 1/Query : CREATE TABLE test ( id SERIAL PRIMARY KEY, dt TIMESTAMP ) 1/QueryR : CREATE TABLE test ( id SERIAL PRIMARY KEY, dt TIMESTAMP ) 1/COMMIT : auto 1/QueryIns: INSERT INTO test (id, dt) VALUES (1, '1967-12-21 00:00:00') 1/COMMIT : auto 1/QueryOne: SELECT dt FROM test WHERE id = (1) 1/QueryR : SELECT dt FROM test WHERE id = (1) 1/COMMIT : auto SELECT test.id, test.dt FROM test WHERE 1 = 1 ORDER BY test.dt 1/Select : SELECT test.id, test.dt FROM test WHERE 1 = 1 ORDER BY test.dt 1/QueryR : SELECT test.id, test.dt FROM test WHERE 1 = 1 ORDER BY test.dt 1/COMMIT : auto [<Test 1L dt='datetime.datetime...)'>] No problem. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1652661&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2007-02-08 14:57:29
|
Bugs item #1652309, was opened at 2007-02-05 14:02 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1652309&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: Deleted >Resolution: Duplicate Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: _executeRetry fails if self.encoding is utf8 Initial Comment: Version: SQLObject-0.8.0b2-py2.4 E-Mail adresse: sql...@xc... _executeRetry fails if self.encoding is utf8. My connection string looks as follows: sqlobject.dburi="mysql://foo:bar@localhost/mallorca?use_unicode=1&unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8&sqlobject_encoding=utf8" I think changing sqlobject/mysql/my sqlconnection.py Line 98 from if self.need_unicode: doo something to if self.need_unicode and self.encoding != "utf8" would solve the problem --- snip -- 500 Internal error The server encountered an unexpected condition which prevented it from fulfilling the request. Page handler: <function _wrapper at 0xb71b5764> Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 105, in _run self.main() File "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 254, in main body = page_handler(*virtual_path, **self.params) File "/usr/lib/python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/identity/conditions.py", line 275, in _wrapper return fn( *args, **kw ) File "<string>", line 3, in default File "/usr/lib/python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/controllers.py", line 334, in expose output = database.run_with_transaction( File "<string>", line 5, in run_with_transaction File "/usr/lib/python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/database.py", line 302, in so_rwt retval = func(*args, **kw) File "<string>", line 5, in _expose File "/usr/lib/python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/controllers.py", line 351, in <lambda> mapping, fragment, args, kw))) File "/usr/lib/python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/controllers.py", line 391, in _execute_func return _process_output(output, template, format, content_type, mapping, fragment) File "/usr/lib/python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/controllers.py", line 82, in _process_output fragment=fragment) File "/usr/lib/python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/view/base.py", line 131, in render return engine.render(**kw) File "/usr/lib/python2.4/site-packages/TurboCheetah-0.9.5-py2.4.egg/turbocheetah/cheetahsupport.py", line 115, in render return str(tempobj) File "/usr/lib/python2.4/site-packages/Cheetah-2.0rc7-py2.4-linux-i686.egg/Cheetah/Template.py", line 990, in __str__ def __str__(self): return getattr(self, mainMethName)() File "/data/www/hermes/mallorca/mallorca/mallorca/templates/admin_base.py", line 474, in respond _v = VFFSL(SL,"content",True) # '${content}' on line 114, col 13 File "/data/www/hermes/mallorca/mallorca/mallorca/templates/admin_fincas.py", line 95, in content for object in VFFSL(SL,"objects",True): # generated from line 11, col 9 File "/usr/lib/python2.4/site-packages/SQLObject-0.8.0b2-py2.4.egg/sqlobject/sresults.py", line 160, in __iter__ return iter(list(self.lazyIter())) File "/usr/lib/python2.4/site-packages/SQLObject-0.8.0b2-py2.4.egg/sqlobject/sresults.py", line 168, in lazyIter return conn.iterSelect(self) File "/usr/lib/python2.4/site-packages/SQLObject-0.8.0b2-py2.4.egg/sqlobject/dbconnection.py", line 831, in iterSelect select, keepConnection=True))) File "/usr/lib/python2.4/site-packages/SQLObject-0.8.0b2-py2.4.egg/sqlobject/dbconnection.py", line 760, in __init__ self.dbconn._executeRetry(self.rawconn, self.cursor, self.query) File "/usr/lib/python2.4/site-packages/SQLObject-0.8.0b2-py2.4.egg/sqlobject/mysql/mysqlconnection.py", line 98, in _executeRetry myquery = unicode(query, self.encoding) TypeError: decoding Unicode is not supported -- snip -- ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1652309&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2007-02-07 14:54:18
|
Patches item #1653898, was opened at 2007-02-07 09:57 Message generated for change (Comment added) made by mfi You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1653898&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: None Priority: 5 Private: No Submitted By: Maxim F. Ischenko (mfi) Assigned to: Oleg Broytmann (phd) Summary: proper init mysql conn encoding Initial Comment: Current implementation of the mysqlconnection.py accepts 'sqlobject_encoding' and 'charset' parameters but doesn't quite properly use them. In particular, MySQLdb does query.encode(charset) call in execute() where charset is taken from conn.get_character_name(). The problem is - SQLObject never initializes it properly. This one-line patch fixes it by adding a call to conn.set_character_set() in makeConnection() helper. Index: sqlobject/mysql/mysqlconnection.py =================================================================== --- sqlobject/mysql/mysqlconnection.py (revision 2269) +++ sqlobject/mysql/mysqlconnection.py (working copy) @@ -62,6 +62,8 @@ if hasattr(conn, 'autocommit'): conn.autocommit(bool(self.autoCommit)) + conn.set_character_set(self.encoding) + return conn def _setAutoCommit(self, conn, auto): ---------------------------------------------------------------------- >Comment By: Maxim F. Ischenko (mfi) Date: 2007-02-07 16:54 Message: Logged In: YES user_id=113894 Originator: YES Note that I also had to tweak UnicodeStringLikeConvertor so that unicode parameters are encoded into utf8. Without this tweak I got errors like this one when unicode parameters are passed into queries built with sqlbuilder: File "/home/max/oss-projects/SQLObject-0.7/sqlobject/sqlbuilder.py", line 237, in __sqlrepr__ return "(%s %s %s)" % (s1, self.op, s2) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 19: ordinal not in range(128) The converter trick is controversial but I haven't found a better solution. ;( ---------------------------------------------------------------------- Comment By: Maxim F. Ischenko (mfi) Date: 2007-02-07 16:46 Message: Logged In: YES user_id=113894 Originator: YES It was tested against MySQL 4.1 (5.x should work while 4.0 shouldn't) and MySQLdb driver versions 1.2.0 and 1.2.1. I only tested it with utf8 encoding, the other ones like latin1 should work though I don't know why would you want to use them. ---------------------------------------------------------------------- Comment By: Maxim F. Ischenko (mfi) Date: 2007-02-07 16:44 Message: Logged In: YES user_id=113894 Originator: YES Please ignore that one-line fix; it won't work with MySQLdb 1.2.0 and there are other issues as I have discovered during testing. I attached new patch which is quite more involved. ;) ---------------------------------------------------------------------- Comment By: Maxim F. Ischenko (mfi) Date: 2007-02-07 16:42 Message: Logged In: YES user_id=113894 Originator: YES File Added: mysql_charset.patch ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2007-02-07 10:34 Message: Logged In: YES user_id=4799 Originator: NO Thank you. Does all MySQLdb versions have the call or have I test "if hasattr(conn, 'set_character_set')"? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1653898&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2007-02-07 14:46:20
|
Patches item #1653898, was opened at 2007-02-07 09:57 Message generated for change (Comment added) made by mfi You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1653898&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: None Priority: 5 Private: No Submitted By: Maxim F. Ischenko (mfi) Assigned to: Oleg Broytmann (phd) Summary: proper init mysql conn encoding Initial Comment: Current implementation of the mysqlconnection.py accepts 'sqlobject_encoding' and 'charset' parameters but doesn't quite properly use them. In particular, MySQLdb does query.encode(charset) call in execute() where charset is taken from conn.get_character_name(). The problem is - SQLObject never initializes it properly. This one-line patch fixes it by adding a call to conn.set_character_set() in makeConnection() helper. Index: sqlobject/mysql/mysqlconnection.py =================================================================== --- sqlobject/mysql/mysqlconnection.py (revision 2269) +++ sqlobject/mysql/mysqlconnection.py (working copy) @@ -62,6 +62,8 @@ if hasattr(conn, 'autocommit'): conn.autocommit(bool(self.autoCommit)) + conn.set_character_set(self.encoding) + return conn def _setAutoCommit(self, conn, auto): ---------------------------------------------------------------------- >Comment By: Maxim F. Ischenko (mfi) Date: 2007-02-07 16:46 Message: Logged In: YES user_id=113894 Originator: YES It was tested against MySQL 4.1 (5.x should work while 4.0 shouldn't) and MySQLdb driver versions 1.2.0 and 1.2.1. I only tested it with utf8 encoding, the other ones like latin1 should work though I don't know why would you want to use them. ---------------------------------------------------------------------- Comment By: Maxim F. Ischenko (mfi) Date: 2007-02-07 16:44 Message: Logged In: YES user_id=113894 Originator: YES Please ignore that one-line fix; it won't work with MySQLdb 1.2.0 and there are other issues as I have discovered during testing. I attached new patch which is quite more involved. ;) ---------------------------------------------------------------------- Comment By: Maxim F. Ischenko (mfi) Date: 2007-02-07 16:42 Message: Logged In: YES user_id=113894 Originator: YES File Added: mysql_charset.patch ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2007-02-07 10:34 Message: Logged In: YES user_id=4799 Originator: NO Thank you. Does all MySQLdb versions have the call or have I test "if hasattr(conn, 'set_character_set')"? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1653898&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2007-02-07 14:44:32
|
Patches item #1653898, was opened at 2007-02-07 09:57 Message generated for change (Comment added) made by mfi You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1653898&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: None Priority: 5 Private: No Submitted By: Maxim F. Ischenko (mfi) Assigned to: Oleg Broytmann (phd) Summary: proper init mysql conn encoding Initial Comment: Current implementation of the mysqlconnection.py accepts 'sqlobject_encoding' and 'charset' parameters but doesn't quite properly use them. In particular, MySQLdb does query.encode(charset) call in execute() where charset is taken from conn.get_character_name(). The problem is - SQLObject never initializes it properly. This one-line patch fixes it by adding a call to conn.set_character_set() in makeConnection() helper. Index: sqlobject/mysql/mysqlconnection.py =================================================================== --- sqlobject/mysql/mysqlconnection.py (revision 2269) +++ sqlobject/mysql/mysqlconnection.py (working copy) @@ -62,6 +62,8 @@ if hasattr(conn, 'autocommit'): conn.autocommit(bool(self.autoCommit)) + conn.set_character_set(self.encoding) + return conn def _setAutoCommit(self, conn, auto): ---------------------------------------------------------------------- >Comment By: Maxim F. Ischenko (mfi) Date: 2007-02-07 16:44 Message: Logged In: YES user_id=113894 Originator: YES Please ignore that one-line fix; it won't work with MySQLdb 1.2.0 and there are other issues as I have discovered during testing. I attached new patch which is quite more involved. ;) ---------------------------------------------------------------------- Comment By: Maxim F. Ischenko (mfi) Date: 2007-02-07 16:42 Message: Logged In: YES user_id=113894 Originator: YES File Added: mysql_charset.patch ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2007-02-07 10:34 Message: Logged In: YES user_id=4799 Originator: NO Thank you. Does all MySQLdb versions have the call or have I test "if hasattr(conn, 'set_character_set')"? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1653898&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2007-02-07 14:42:57
|
Patches item #1653898, was opened at 2007-02-07 09:57 Message generated for change (Comment added) made by mfi You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1653898&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: None Priority: 5 Private: No Submitted By: Maxim F. Ischenko (mfi) Assigned to: Oleg Broytmann (phd) Summary: proper init mysql conn encoding Initial Comment: Current implementation of the mysqlconnection.py accepts 'sqlobject_encoding' and 'charset' parameters but doesn't quite properly use them. In particular, MySQLdb does query.encode(charset) call in execute() where charset is taken from conn.get_character_name(). The problem is - SQLObject never initializes it properly. This one-line patch fixes it by adding a call to conn.set_character_set() in makeConnection() helper. Index: sqlobject/mysql/mysqlconnection.py =================================================================== --- sqlobject/mysql/mysqlconnection.py (revision 2269) +++ sqlobject/mysql/mysqlconnection.py (working copy) @@ -62,6 +62,8 @@ if hasattr(conn, 'autocommit'): conn.autocommit(bool(self.autoCommit)) + conn.set_character_set(self.encoding) + return conn def _setAutoCommit(self, conn, auto): ---------------------------------------------------------------------- >Comment By: Maxim F. Ischenko (mfi) Date: 2007-02-07 16:42 Message: Logged In: YES user_id=113894 Originator: YES File Added: mysql_charset.patch ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2007-02-07 10:34 Message: Logged In: YES user_id=4799 Originator: NO Thank you. Does all MySQLdb versions have the call or have I test "if hasattr(conn, 'set_character_set')"? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1653898&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2007-02-07 08:34:34
|
Patches item #1653898, was opened at 2007-02-07 10:57 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1653898&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: None Priority: 5 Private: No Submitted By: Maxim F. Ischenko (mfi) >Assigned to: Oleg Broytmann (phd) Summary: proper init mysql conn encoding Initial Comment: Current implementation of the mysqlconnection.py accepts 'sqlobject_encoding' and 'charset' parameters but doesn't quite properly use them. In particular, MySQLdb does query.encode(charset) call in execute() where charset is taken from conn.get_character_name(). The problem is - SQLObject never initializes it properly. This one-line patch fixes it by adding a call to conn.set_character_set() in makeConnection() helper. Index: sqlobject/mysql/mysqlconnection.py =================================================================== --- sqlobject/mysql/mysqlconnection.py (revision 2269) +++ sqlobject/mysql/mysqlconnection.py (working copy) @@ -62,6 +62,8 @@ if hasattr(conn, 'autocommit'): conn.autocommit(bool(self.autoCommit)) + conn.set_character_set(self.encoding) + return conn def _setAutoCommit(self, conn, auto): ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2007-02-07 11:34 Message: Logged In: YES user_id=4799 Originator: NO Thank you. Does all MySQLdb versions have the call or have I test "if hasattr(conn, 'set_character_set')"? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1653898&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2007-02-07 07:57:48
|
Patches item #1653898, was opened at 2007-02-07 09:57 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1653898&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: None Priority: 5 Private: No Submitted By: Maxim F. Ischenko (mfi) Assigned to: Nobody/Anonymous (nobody) Summary: proper init mysql conn encoding Initial Comment: Current implementation of the mysqlconnection.py accepts 'sqlobject_encoding' and 'charset' parameters but doesn't quite properly use them. In particular, MySQLdb does query.encode(charset) call in execute() where charset is taken from conn.get_character_name(). The problem is - SQLObject never initializes it properly. This one-line patch fixes it by adding a call to conn.set_character_set() in makeConnection() helper. Index: sqlobject/mysql/mysqlconnection.py =================================================================== --- sqlobject/mysql/mysqlconnection.py (revision 2269) +++ sqlobject/mysql/mysqlconnection.py (working copy) @@ -62,6 +62,8 @@ if hasattr(conn, 'autocommit'): conn.autocommit(bool(self.autoCommit)) + conn.set_character_set(self.encoding) + return conn def _setAutoCommit(self, conn, auto): ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1653898&group_id=74338 |
|
From: <sub...@co...> - 2007-02-06 17:20:14
|
Author: phd
Date: 2007-02-06 10:19:45 -0700 (Tue, 06 Feb 2007)
New Revision: 2265
Modified:
home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py
Log:
Merged patches from the revisions 2261:2264 from the trunk
Modified: home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py 2007-02-06 17:16:55 UTC (rev 2264)
+++ home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py 2007-02-06 17:19:45 UTC (rev 2265)
@@ -169,7 +169,7 @@
def createIDColumn(self, soClass):
if soClass.sqlmeta.idType == str:
return '%s TEXT PRIMARY KEY' % soClass.sqlmeta.idName
- return '%s INT PRIMARY KEY AUTO_INCREMENT' % soClass.sqlmeta.idName
+ return '%s INT UNSIGNED PRIMARY KEY AUTO_INCREMENT' % soClass.sqlmeta.idName
def joinSQLType(self, join):
return 'INT NOT NULL'
|
|
From: <sub...@co...> - 2007-02-06 17:17:30
|
Author: phd
Date: 2007-02-06 10:16:55 -0700 (Tue, 06 Feb 2007)
New Revision: 2264
Modified:
SQLObject/branches/0.8/sqlobject/mysql/mysqlconnection.py
Log:
A patch by Dan Pascu <da...@ag...> - ID columns are now INT UNSIGNED for MySQL.
Modified: SQLObject/branches/0.8/sqlobject/mysql/mysqlconnection.py
===================================================================
--- SQLObject/branches/0.8/sqlobject/mysql/mysqlconnection.py 2007-02-06 17:16:41 UTC (rev 2263)
+++ SQLObject/branches/0.8/sqlobject/mysql/mysqlconnection.py 2007-02-06 17:16:55 UTC (rev 2264)
@@ -169,7 +169,7 @@
def createIDColumn(self, soClass):
if soClass.sqlmeta.idType == str:
return '%s TEXT PRIMARY KEY' % soClass.sqlmeta.idName
- return '%s INT PRIMARY KEY AUTO_INCREMENT' % soClass.sqlmeta.idName
+ return '%s INT UNSIGNED PRIMARY KEY AUTO_INCREMENT' % soClass.sqlmeta.idName
def joinSQLType(self, join):
return 'INT NOT NULL'
|
|
From: <sub...@co...> - 2007-02-06 17:17:16
|
Author: phd Date: 2007-02-06 10:16:41 -0700 (Tue, 06 Feb 2007) New Revision: 2263 Modified: SQLObject/docs/News.txt Log: A patch by Dan Pascu <da...@ag...> - ID columns are now INT UNSIGNED for MySQL. Modified: SQLObject/docs/News.txt =================================================================== --- SQLObject/docs/News.txt 2007-02-06 17:16:11 UTC (rev 2262) +++ SQLObject/docs/News.txt 2007-02-06 17:16:41 UTC (rev 2263) @@ -127,6 +127,8 @@ * Allows to use set/frozenset sets/Set/ImmutableSet sets as sequences passed to the IN operator. +* ID columns are now INT UNSIGNED for MySQL. + Bug Fixes --------- |
|
From: <sub...@co...> - 2007-02-06 17:16:38
|
Author: phd
Date: 2007-02-06 10:16:11 -0700 (Tue, 06 Feb 2007)
New Revision: 2262
Modified:
SQLObject/trunk/sqlobject/mysql/mysqlconnection.py
Log:
A patch by Dan Pascu <da...@ag...> - ID columns are now INT UNSIGNED for MySQL.
Modified: SQLObject/trunk/sqlobject/mysql/mysqlconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/mysql/mysqlconnection.py 2007-02-06 15:40:44 UTC (rev 2261)
+++ SQLObject/trunk/sqlobject/mysql/mysqlconnection.py 2007-02-06 17:16:11 UTC (rev 2262)
@@ -169,7 +169,7 @@
def createIDColumn(self, soClass):
if soClass.sqlmeta.idType == str:
return '%s TEXT PRIMARY KEY' % soClass.sqlmeta.idName
- return '%s INT PRIMARY KEY AUTO_INCREMENT' % soClass.sqlmeta.idName
+ return '%s INT UNSIGNED PRIMARY KEY AUTO_INCREMENT' % soClass.sqlmeta.idName
def joinSQLType(self, join):
return 'INT NOT NULL'
|
|
From: <sub...@co...> - 2007-02-06 15:40:58
|
Author: phd
Date: 2007-02-06 08:40:44 -0700 (Tue, 06 Feb 2007)
New Revision: 2261
Added:
home/phd/SQLObject/paramstyles/sqlobject/tests/test_sqlbuilder.py
Modified:
home/phd/SQLObject/paramstyles/sqlobject/converters.py
home/phd/SQLObject/paramstyles/sqlobject/sqlbuilder.py
home/phd/SQLObject/paramstyles/sqlobject/tests/test_converters.py
Log:
Merged patches from the revisions 2254:2260 from the trunk
Modified: home/phd/SQLObject/paramstyles/sqlobject/converters.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/converters.py 2007-02-06 15:39:04 UTC (rev 2260)
+++ home/phd/SQLObject/paramstyles/sqlobject/converters.py 2007-02-06 15:40:44 UTC (rev 2261)
@@ -180,6 +180,21 @@
registerConverter(type(()), SequenceConverter)
registerConverter(type([]), SequenceConverter)
+registerConverter(type({}), SequenceConverter)
+try:
+ set, frozenset
+except NameError:
+ pass
+else:
+ registerConverter(set, SequenceConverter)
+ registerConverter(frozenset, SequenceConverter)
+try:
+ from sets import Set, ImmutableSet
+except ImportError:
+ pass
+else:
+ registerConverter(Set, SequenceConverter)
+ registerConverter(ImmutableSet, SequenceConverter)
if hasattr(time, 'struct_time'):
def StructTimeConverter(value, db):
Modified: home/phd/SQLObject/paramstyles/sqlobject/sqlbuilder.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/sqlbuilder.py 2007-02-06 15:39:04 UTC (rev 2260)
+++ home/phd/SQLObject/paramstyles/sqlobject/sqlbuilder.py 2007-02-06 15:40:44 UTC (rev 2261)
@@ -746,6 +746,8 @@
return '%s DESC' % sqlrepr(self.expr, db)
def AND(*ops):
+ if not ops:
+ return None
op1 = ops[0]
ops = ops[1:]
if ops:
@@ -754,6 +756,8 @@
return op1
def OR(*ops):
+ if not ops:
+ return None
op1 = ops[0]
ops = ops[1:]
if ops:
Modified: home/phd/SQLObject/paramstyles/sqlobject/tests/test_converters.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/tests/test_converters.py 2007-02-06 15:39:04 UTC (rev 2260)
+++ home/phd/SQLObject/paramstyles/sqlobject/tests/test_converters.py 2007-02-06 15:40:44 UTC (rev 2261)
@@ -176,3 +176,20 @@
def test_prefix():
instance = SQLPrefix('test', 'test')
assert sqlrepr(instance, 'mysql') == "test 'test'"
+
+def test_dict():
+ assert sqlrepr({"key": "value"}, "sqlite") == "('key')"
+
+def test_sets():
+ try:
+ set
+ except NameError:
+ pass
+ else:
+ assert sqlrepr(set([1])) == "(1)"
+ try:
+ from sets import Set
+ except ImportError:
+ pass
+ else:
+ assert sqlrepr(Set([1])) == "(1)"
Copied: home/phd/SQLObject/paramstyles/sqlobject/tests/test_sqlbuilder.py (from rev 2260, SQLObject/trunk/sqlobject/tests/test_sqlbuilder.py)
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/tests/test_sqlbuilder.py (rev 0)
+++ home/phd/SQLObject/paramstyles/sqlobject/tests/test_sqlbuilder.py 2007-02-06 15:40:44 UTC (rev 2261)
@@ -0,0 +1,14 @@
+from sqlobject.sqlbuilder import AND, SQLOp, sqlrepr
+
+def test_empty_AND():
+ assert AND() == None
+ assert AND(True) == True
+
+ # sqlrepr() is needed because AND() returns an SQLExpression that overrides
+ # comparison. The following
+ # AND('x', 'y') == "foo bar"
+ # is True! (-: Eeek!
+ assert sqlrepr(AND(1, 2)) == sqlrepr(SQLOp("AND", 1, 2)) == "((1) AND (2))"
+ assert sqlrepr(AND(1, 2, '3'), "sqlite") == \
+ sqlrepr(SQLOp("AND", 1, SQLOp("AND", 2, '3')), "sqlite") == \
+ "((1) AND ((2) AND ('3')))"
|