sqlobject-cvs Mailing List for SQLObject (Page 79)
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-10-09 15:59:02
|
Author: phd Date: 2007-10-09 09:58:55 -0600 (Tue, 09 Oct 2007) New Revision: 3034 Added: SQLObject/tags/0.7.9b2/ Log: Tagging 0.7.9b2 Copied: SQLObject/tags/0.7.9b2 (from rev 3033, SQLObject/branches/0.7) |
|
From: <sub...@co...> - 2007-10-09 15:56:06
|
Author: phd Date: 2007-10-09 09:56:03 -0600 (Tue, 09 Oct 2007) New Revision: 3033 Modified: SQLObject/docs/News.txt Log: Fixed startswith/endswith/contains for UnicodeCol. Modified: SQLObject/docs/News.txt =================================================================== --- SQLObject/docs/News.txt 2007-10-09 15:55:28 UTC (rev 3032) +++ SQLObject/docs/News.txt 2007-10-09 15:56:03 UTC (rev 3033) @@ -315,6 +315,8 @@ * Fixed StringCol and UnicodeCol: use sqlType with MSSQL. +* Fixed startswith/endswith/contains for UnicodeCol. + Other Changes ------------- |
|
From: SourceForge.net <no...@so...> - 2007-10-09 15:55:55
|
Bugs item #1808155, was opened at 2007-10-05 19:45 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1808155&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: SQLObject release (specify) >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Peter Russell (psr) Assigned to: Oleg Broytmann (phd) Summary: UnicodeCol doesn't support startswith etc. Initial Comment: I'm experiencing this problem with SQLObject 0.7.7, although by the looks of things it still exists in trunk. The summary is not very precise, the text field is too short. What I really want to say is: "sqlbuilder.UnicodeField encodes values in __eq__ and __ne__, but not in startswith, endswith and contains" I believe that the solution is to simply override those methods in UnicodeField, and encode the value passed" I am attaching a file that causes a UnicodeDecodeError. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2007-10-09 19:55 Message: Logged In: YES user_id=4799 Originator: NO Fixed in the revisions 3029-3033 (branches 0.7, 0.8, 0.9, the trunk and the docs). Will be in the next round of releases. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2007-10-08 21:49 Message: Logged In: YES user_id=4799 Originator: NO Got it. Good catch and good suggestion. Will be fixed soon. Thank you! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1808155&group_id=74338 |
|
From: <sub...@co...> - 2007-10-09 15:55:32
|
Author: phd
Date: 2007-10-09 09:55:28 -0600 (Tue, 09 Oct 2007)
New Revision: 3032
Modified:
SQLObject/trunk/sqlobject/sqlbuilder.py
SQLObject/trunk/sqlobject/tests/test_unicode.py
Log:
Fixed startswith/endswith/contains for UnicodeCol.
Modified: SQLObject/trunk/sqlobject/sqlbuilder.py
===================================================================
--- SQLObject/trunk/sqlobject/sqlbuilder.py 2007-10-09 15:55:04 UTC (rev 3031)
+++ SQLObject/trunk/sqlobject/sqlbuilder.py 2007-10-09 15:55:28 UTC (rev 3032)
@@ -344,7 +344,20 @@
if isinstance(other, unicode):
other = other.encode(self.column.dbEncoding)
return SQLOp('<>', self, other)
+ def startswith(self, s):
+ if isinstance(s, unicode):
+ s = s.encode(self.column.dbEncoding)
+ return STARTSWITH(self, s)
+ def endswith(self, s):
+ if isinstance(s, unicode):
+ s = s.encode(self.column.dbEncoding)
+ return ENDSWITH(self, s)
+ def contains(self, s):
+ if isinstance(s, unicode):
+ s = s.encode(self.column.dbEncoding)
+ return CONTAINSSTRING(self, s)
+
registerConverter(UnicodeField, SQLExprConverter)
class Table(SQLExpression):
Modified: SQLObject/trunk/sqlobject/tests/test_unicode.py
===================================================================
--- SQLObject/trunk/sqlobject/tests/test_unicode.py 2007-10-09 15:55:04 UTC (rev 3031)
+++ SQLObject/trunk/sqlobject/tests/test_unicode.py 2007-10-09 15:55:28 UTC (rev 3032)
@@ -63,3 +63,17 @@
assert len(rows) == 2
rows = list(TestUnicode.selectBy(col1=u'\u00f0', col2=u'test'))
assert len(rows) == 0
+
+ # starts/endswith/contains
+ rows = list(TestUnicode.select(TestUnicode.q.col1.startswith("test")))
+ assert len(rows) == 1
+ rows = list(TestUnicode.select(TestUnicode.q.col1.endswith("test")))
+ assert len(rows) == 2
+ rows = list(TestUnicode.select(TestUnicode.q.col1.contains("test")))
+ assert len(rows) == 2
+ rows = list(TestUnicode.select(TestUnicode.q.col1.startswith(u"\u00f0")))
+ assert len(rows) == 1
+ rows = list(TestUnicode.select(TestUnicode.q.col1.endswith(u"\u00f0")))
+ assert len(rows) == 1
+ rows = list(TestUnicode.select(TestUnicode.q.col1.contains(u"\u00f0")))
+ assert len(rows) == 1
|
|
From: <sub...@co...> - 2007-10-09 15:55:07
|
Author: phd
Date: 2007-10-09 09:55:04 -0600 (Tue, 09 Oct 2007)
New Revision: 3031
Modified:
SQLObject/branches/0.9/docs/News.txt
SQLObject/branches/0.9/sqlobject/sqlbuilder.py
SQLObject/branches/0.9/sqlobject/tests/test_unicode.py
Log:
Fixed startswith/endswith/contains for UnicodeCol.
Modified: SQLObject/branches/0.9/docs/News.txt
===================================================================
--- SQLObject/branches/0.9/docs/News.txt 2007-10-09 15:54:47 UTC (rev 3030)
+++ SQLObject/branches/0.9/docs/News.txt 2007-10-09 15:55:04 UTC (rev 3031)
@@ -278,6 +278,8 @@
* Fixed StringCol and UnicodeCol: use sqlType with MSSQL.
+* Fixed startswith/endswith/contains for UnicodeCol.
+
Other Changes
-------------
Modified: SQLObject/branches/0.9/sqlobject/sqlbuilder.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/sqlbuilder.py 2007-10-09 15:54:47 UTC (rev 3030)
+++ SQLObject/branches/0.9/sqlobject/sqlbuilder.py 2007-10-09 15:55:04 UTC (rev 3031)
@@ -343,7 +343,20 @@
if isinstance(other, unicode):
other = other.encode(self.column.dbEncoding)
return SQLOp('<>', self, other)
+ def startswith(self, s):
+ if isinstance(s, unicode):
+ s = s.encode(self.column.dbEncoding)
+ return STARTSWITH(self, s)
+ def endswith(self, s):
+ if isinstance(s, unicode):
+ s = s.encode(self.column.dbEncoding)
+ return ENDSWITH(self, s)
+ def contains(self, s):
+ if isinstance(s, unicode):
+ s = s.encode(self.column.dbEncoding)
+ return CONTAINSSTRING(self, s)
+
registerConverter(UnicodeField, SQLExprConverter)
Modified: SQLObject/branches/0.9/sqlobject/tests/test_unicode.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/tests/test_unicode.py 2007-10-09 15:54:47 UTC (rev 3030)
+++ SQLObject/branches/0.9/sqlobject/tests/test_unicode.py 2007-10-09 15:55:04 UTC (rev 3031)
@@ -69,3 +69,17 @@
assert len(rows) == 2
rows = list(TestUnicode.selectBy(col1=u'\u00f0', col2=u'test'))
assert len(rows) == 0
+
+ # starts/endswith/contains
+ rows = list(TestUnicode.select(TestUnicode.q.col1.startswith("test")))
+ assert len(rows) == 1
+ rows = list(TestUnicode.select(TestUnicode.q.col1.endswith("test")))
+ assert len(rows) == 2
+ rows = list(TestUnicode.select(TestUnicode.q.col1.contains("test")))
+ assert len(rows) == 2
+ rows = list(TestUnicode.select(TestUnicode.q.col1.startswith(u"\u00f0")))
+ assert len(rows) == 1
+ rows = list(TestUnicode.select(TestUnicode.q.col1.endswith(u"\u00f0")))
+ assert len(rows) == 1
+ rows = list(TestUnicode.select(TestUnicode.q.col1.contains(u"\u00f0")))
+ assert len(rows) == 1
|
|
From: <sub...@co...> - 2007-10-09 15:54:50
|
Author: phd
Date: 2007-10-09 09:54:47 -0600 (Tue, 09 Oct 2007)
New Revision: 3030
Modified:
SQLObject/branches/0.8/docs/News.txt
SQLObject/branches/0.8/sqlobject/sqlbuilder.py
SQLObject/branches/0.8/sqlobject/tests/test_unicode.py
Log:
Fixed startswith/endswith/contains for UnicodeCol.
Modified: SQLObject/branches/0.8/docs/News.txt
===================================================================
--- SQLObject/branches/0.8/docs/News.txt 2007-10-09 15:53:21 UTC (rev 3029)
+++ SQLObject/branches/0.8/docs/News.txt 2007-10-09 15:54:47 UTC (rev 3030)
@@ -201,6 +201,8 @@
* Fixed StringCol and UnicodeCol: use sqlType with MSSQL.
+* Fixed startswith/endswith/contains for UnicodeCol.
+
Other Changes
-------------
Modified: SQLObject/branches/0.8/sqlobject/sqlbuilder.py
===================================================================
--- SQLObject/branches/0.8/sqlobject/sqlbuilder.py 2007-10-09 15:53:21 UTC (rev 3029)
+++ SQLObject/branches/0.8/sqlobject/sqlbuilder.py 2007-10-09 15:54:47 UTC (rev 3030)
@@ -343,7 +343,20 @@
if isinstance(other, unicode):
other = other.encode(self.column.dbEncoding)
return SQLOp('<>', self, other)
+ def startswith(self, s):
+ if isinstance(s, unicode):
+ s = s.encode(self.column.dbEncoding)
+ return STARTSWITH(self, s)
+ def endswith(self, s):
+ if isinstance(s, unicode):
+ s = s.encode(self.column.dbEncoding)
+ return ENDSWITH(self, s)
+ def contains(self, s):
+ if isinstance(s, unicode):
+ s = s.encode(self.column.dbEncoding)
+ return CONTAINSSTRING(self, s)
+
registerConverter(UnicodeField, SQLExprConverter)
Modified: SQLObject/branches/0.8/sqlobject/tests/test_unicode.py
===================================================================
--- SQLObject/branches/0.8/sqlobject/tests/test_unicode.py 2007-10-09 15:53:21 UTC (rev 3029)
+++ SQLObject/branches/0.8/sqlobject/tests/test_unicode.py 2007-10-09 15:54:47 UTC (rev 3030)
@@ -69,3 +69,17 @@
assert len(rows) == 2
rows = list(TestUnicode.selectBy(col1=u'\u00f0', col2=u'test'))
assert len(rows) == 0
+
+ # starts/endswith/contains
+ rows = list(TestUnicode.select(TestUnicode.q.col1.startswith("test")))
+ assert len(rows) == 1
+ rows = list(TestUnicode.select(TestUnicode.q.col1.endswith("test")))
+ assert len(rows) == 2
+ rows = list(TestUnicode.select(TestUnicode.q.col1.contains("test")))
+ assert len(rows) == 2
+ rows = list(TestUnicode.select(TestUnicode.q.col1.startswith(u"\u00f0")))
+ assert len(rows) == 1
+ rows = list(TestUnicode.select(TestUnicode.q.col1.endswith(u"\u00f0")))
+ assert len(rows) == 1
+ rows = list(TestUnicode.select(TestUnicode.q.col1.contains(u"\u00f0")))
+ assert len(rows) == 1
|
|
From: <sub...@co...> - 2007-10-09 15:53:30
|
Author: phd
Date: 2007-10-09 09:53:21 -0600 (Tue, 09 Oct 2007)
New Revision: 3029
Modified:
SQLObject/branches/0.7/docs/News.txt
SQLObject/branches/0.7/sqlobject/sqlbuilder.py
SQLObject/branches/0.7/sqlobject/tests/test_unicode.py
Log:
Fixed startswith/endswith/contains for UnicodeCol.
Modified: SQLObject/branches/0.7/docs/News.txt
===================================================================
--- SQLObject/branches/0.7/docs/News.txt 2007-10-09 15:44:33 UTC (rev 3028)
+++ SQLObject/branches/0.7/docs/News.txt 2007-10-09 15:53:21 UTC (rev 3029)
@@ -21,6 +21,8 @@
* Fixed StringCol and UnicodeCol: use sqlType with MSSQL.
+* Fixed startswith/endswith/contains for UnicodeCol.
+
Other Changes
-------------
Modified: SQLObject/branches/0.7/sqlobject/sqlbuilder.py
===================================================================
--- SQLObject/branches/0.7/sqlobject/sqlbuilder.py 2007-10-09 15:44:33 UTC (rev 3028)
+++ SQLObject/branches/0.7/sqlobject/sqlbuilder.py 2007-10-09 15:53:21 UTC (rev 3029)
@@ -340,7 +340,20 @@
if isinstance(other, unicode):
other = other.encode(self.column.dbEncoding)
return SQLOp('<>', self, other)
+ def startswith(self, s):
+ if isinstance(s, unicode):
+ s = s.encode(self.column.dbEncoding)
+ return STARTSWITH(self, s)
+ def endswith(self, s):
+ if isinstance(s, unicode):
+ s = s.encode(self.column.dbEncoding)
+ return ENDSWITH(self, s)
+ def contains(self, s):
+ if isinstance(s, unicode):
+ s = s.encode(self.column.dbEncoding)
+ return CONTAINSSTRING(self, s)
+
registerConverter(UnicodeField, SQLExprConverter)
Modified: SQLObject/branches/0.7/sqlobject/tests/test_unicode.py
===================================================================
--- SQLObject/branches/0.7/sqlobject/tests/test_unicode.py 2007-10-09 15:44:33 UTC (rev 3028)
+++ SQLObject/branches/0.7/sqlobject/tests/test_unicode.py 2007-10-09 15:53:21 UTC (rev 3029)
@@ -69,3 +69,17 @@
assert len(rows) == 2
rows = list(TestUnicode.selectBy(col1=u'\u00f0', col2=u'test'))
assert len(rows) == 0
+
+ # starts/endswith/contains
+ rows = list(TestUnicode.select(TestUnicode.q.col1.startswith("test")))
+ assert len(rows) == 1
+ rows = list(TestUnicode.select(TestUnicode.q.col1.endswith("test")))
+ assert len(rows) == 2
+ rows = list(TestUnicode.select(TestUnicode.q.col1.contains("test")))
+ assert len(rows) == 2
+ rows = list(TestUnicode.select(TestUnicode.q.col1.startswith(u"\u00f0")))
+ assert len(rows) == 1
+ rows = list(TestUnicode.select(TestUnicode.q.col1.endswith(u"\u00f0")))
+ assert len(rows) == 1
+ rows = list(TestUnicode.select(TestUnicode.q.col1.contains(u"\u00f0")))
+ assert len(rows) == 1
|
|
From: <sub...@co...> - 2007-10-09 15:44:37
|
Author: phd Date: 2007-10-09 09:44:33 -0600 (Tue, 09 Oct 2007) New Revision: 3028 Modified: SQLObject/docs/News.txt Log: Fixed StringCol and UnicodeCol: use sqlType with MSSQL. Modified: SQLObject/docs/News.txt =================================================================== --- SQLObject/docs/News.txt 2007-10-09 15:44:14 UTC (rev 3027) +++ SQLObject/docs/News.txt 2007-10-09 15:44:33 UTC (rev 3028) @@ -313,6 +313,8 @@ * Fixed a bug in sqlbuilder._LikeQuoted() - call sqlrepr() on the expression to escape single quotes if the expression is a string. +* Fixed StringCol and UnicodeCol: use sqlType with MSSQL. + Other Changes ------------- |
|
From: <sub...@co...> - 2007-10-09 15:44:21
|
Author: phd
Date: 2007-10-09 09:44:14 -0600 (Tue, 09 Oct 2007)
New Revision: 3027
Modified:
SQLObject/trunk/sqlobject/col.py
Log:
Fixed StringCol and UnicodeCol: use sqlType with MSSQL.
Modified: SQLObject/trunk/sqlobject/col.py
===================================================================
--- SQLObject/trunk/sqlobject/col.py 2007-10-09 15:43:57 UTC (rev 3026)
+++ SQLObject/trunk/sqlobject/col.py 2007-10-09 15:44:14 UTC (rev 3027)
@@ -475,6 +475,8 @@
return type
def _mssqlType(self):
+ if self.customSQLType is not None:
+ return self.customSQLType
if not self.length:
type = 'varchar(4000)'
elif self.varchar:
|
|
From: <sub...@co...> - 2007-10-09 15:44:08
|
Author: phd
Date: 2007-10-09 09:43:57 -0600 (Tue, 09 Oct 2007)
New Revision: 3026
Modified:
SQLObject/branches/0.9/docs/News.txt
SQLObject/branches/0.9/sqlobject/col.py
Log:
Fixed StringCol and UnicodeCol: use sqlType with MSSQL.
Modified: SQLObject/branches/0.9/docs/News.txt
===================================================================
--- SQLObject/branches/0.9/docs/News.txt 2007-10-09 15:43:41 UTC (rev 3025)
+++ SQLObject/branches/0.9/docs/News.txt 2007-10-09 15:43:57 UTC (rev 3026)
@@ -276,6 +276,8 @@
* Fixed a bug in sqlbuilder._LikeQuoted() - call sqlrepr() on the
expression to escape single quotes if the expression is a string.
+* Fixed StringCol and UnicodeCol: use sqlType with MSSQL.
+
Other Changes
-------------
Modified: SQLObject/branches/0.9/sqlobject/col.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/col.py 2007-10-09 15:43:41 UTC (rev 3025)
+++ SQLObject/branches/0.9/sqlobject/col.py 2007-10-09 15:43:57 UTC (rev 3026)
@@ -487,6 +487,8 @@
return type
def _mssqlType(self):
+ if self.customSQLType is not None:
+ return self.customSQLType
if not self.length:
type = 'varchar(4000)'
elif self.varchar:
|
|
From: <sub...@co...> - 2007-10-09 15:43:49
|
Author: phd
Date: 2007-10-09 09:43:41 -0600 (Tue, 09 Oct 2007)
New Revision: 3025
Modified:
SQLObject/branches/0.8/docs/News.txt
SQLObject/branches/0.8/sqlobject/col.py
Log:
Fixed StringCol and UnicodeCol: use sqlType with MSSQL.
Modified: SQLObject/branches/0.8/docs/News.txt
===================================================================
--- SQLObject/branches/0.8/docs/News.txt 2007-10-09 14:57:05 UTC (rev 3024)
+++ SQLObject/branches/0.8/docs/News.txt 2007-10-09 15:43:41 UTC (rev 3025)
@@ -199,6 +199,8 @@
* Fixed a bug in sqlbuilder._LikeQuoted() - call sqlrepr() on the
expression to escape single quotes if the expression is a string.
+* Fixed StringCol and UnicodeCol: use sqlType with MSSQL.
+
Other Changes
-------------
Modified: SQLObject/branches/0.8/sqlobject/col.py
===================================================================
--- SQLObject/branches/0.8/sqlobject/col.py 2007-10-09 14:57:05 UTC (rev 3024)
+++ SQLObject/branches/0.8/sqlobject/col.py 2007-10-09 15:43:41 UTC (rev 3025)
@@ -483,6 +483,8 @@
return type
def _mssqlType(self):
+ if self.customSQLType is not None:
+ return self.customSQLType
if not self.length:
type = 'varchar(4000)'
elif self.varchar:
|
|
From: <sub...@co...> - 2007-10-09 14:57:14
|
Author: phd
Date: 2007-10-09 08:57:05 -0600 (Tue, 09 Oct 2007)
New Revision: 3024
Modified:
SQLObject/branches/0.7/docs/News.txt
SQLObject/branches/0.7/sqlobject/col.py
Log:
Fixed StringCol and UnicodeCol: use sqlType with MSSQL.
Modified: SQLObject/branches/0.7/docs/News.txt
===================================================================
--- SQLObject/branches/0.7/docs/News.txt 2007-10-08 21:26:13 UTC (rev 3023)
+++ SQLObject/branches/0.7/docs/News.txt 2007-10-09 14:57:05 UTC (rev 3024)
@@ -19,6 +19,8 @@
* Fixed a bug in sqlbuilder._LikeQuoted() - call sqlrepr() on the
expression to escape single quotes if the expression is a string.
+* Fixed StringCol and UnicodeCol: use sqlType with MSSQL.
+
Other Changes
-------------
Modified: SQLObject/branches/0.7/sqlobject/col.py
===================================================================
--- SQLObject/branches/0.7/sqlobject/col.py 2007-10-08 21:26:13 UTC (rev 3023)
+++ SQLObject/branches/0.7/sqlobject/col.py 2007-10-09 14:57:05 UTC (rev 3024)
@@ -480,6 +480,8 @@
return type
def _mssqlType(self):
+ if self.customSQLType is not None:
+ return self.customSQLType
if not self.length:
type = 'varchar(4000)'
elif self.varchar:
|
|
From: SourceForge.net <no...@so...> - 2007-10-08 17:49:07
|
Bugs item #1808155, was opened at 2007-10-05 19:45 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1808155&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: SQLObject release (specify) Status: Open >Resolution: Later Priority: 5 Private: No Submitted By: Peter Russell (psr) >Assigned to: Oleg Broytmann (phd) Summary: UnicodeCol doesn't support startswith etc. Initial Comment: I'm experiencing this problem with SQLObject 0.7.7, although by the looks of things it still exists in trunk. The summary is not very precise, the text field is too short. What I really want to say is: "sqlbuilder.UnicodeField encodes values in __eq__ and __ne__, but not in startswith, endswith and contains" I believe that the solution is to simply override those methods in UnicodeField, and encode the value passed" I am attaching a file that causes a UnicodeDecodeError. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2007-10-08 21:49 Message: Logged In: YES user_id=4799 Originator: NO Got it. Good catch and good suggestion. Will be fixed soon. Thank you! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1808155&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2007-10-05 15:45:32
|
Bugs item #1808155, was opened at 2007-10-05 15:45 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=1808155&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: SQLObject release (specify) Status: Open Resolution: None Priority: 5 Private: No Submitted By: Peter Russell (psr) Assigned to: Nobody/Anonymous (nobody) Summary: UnicodeCol doesn't support startswith etc. Initial Comment: I'm experiencing this problem with SQLObject 0.7.7, although by the looks of things it still exists in trunk. The summary is not very precise, the text field is too short. What I really want to say is: "sqlbuilder.UnicodeField encodes values in __eq__ and __ne__, but not in startswith, endswith and contains" I believe that the solution is to simply override those methods in UnicodeField, and encode the value passed" I am attaching a file that causes a UnicodeDecodeError. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1808155&group_id=74338 |
|
From: <sub...@co...> - 2007-10-03 21:59:16
|
Author: novalis
Date: 2007-10-03 15:59:07 -0600 (Wed, 03 Oct 2007)
New Revision: 3022
Modified:
SQLObject/trunk/sqlobject/mysql/mysqlconnection.py
Log:
never convert to unicode at all for mysql connections at query time.
Modified: SQLObject/trunk/sqlobject/mysql/mysqlconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/mysql/mysqlconnection.py 2007-10-02 15:42:38 UTC (rev 3021)
+++ SQLObject/trunk/sqlobject/mysql/mysqlconnection.py 2007-10-03 21:59:07 UTC (rev 3022)
@@ -109,11 +109,7 @@
try:
# For MySQLdb 1.2.1 and later, we go
# encoding->unicode->charset (in the mysql db)
- if self.need_unicode and not isinstance(query, unicode):
- try:
- query = unicode(query, self.encoding)
- except UnicodeError:
- pass
+
return cursor.execute(query)
except MySQLdb.OperationalError, e:
if e.args[0] in (MySQLdb.constants.CR.SERVER_GONE_ERROR, MySQLdb.constants.CR.SERVER_LOST):
|
|
From: <sub...@co...> - 2007-10-01 15:47:08
|
Author: phd Date: 2007-10-01 09:47:04 -0600 (Mon, 01 Oct 2007) New Revision: 3014 Modified: SQLObject/tags/0.92b1/setup.cfg SQLObject/tags/0.92b1/setup.py Log: 0.9.2b1 Modified: SQLObject/tags/0.92b1/setup.cfg =================================================================== --- SQLObject/tags/0.92b1/setup.cfg 2007-10-01 15:45:37 UTC (rev 3013) +++ SQLObject/tags/0.92b1/setup.cfg 2007-10-01 15:47:04 UTC (rev 3014) @@ -1,10 +1,6 @@ [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.92b1/setup.py =================================================================== --- SQLObject/tags/0.92b1/setup.py 2007-10-01 15:45:37 UTC (rev 3013) +++ SQLObject/tags/0.92b1/setup.py 2007-10-01 15:47:04 UTC (rev 3014) @@ -28,7 +28,7 @@ """ setup(name="SQLObject", - version="0.9.1", + version="0.9.2b1", description="Object-Relational Manager, aka database wrapper", long_description="""\ SQLObject is a popular *Object Relational Manager* for providing an |
|
From: <sub...@co...> - 2007-10-01 15:45:44
|
Author: phd Date: 2007-10-01 09:45:37 -0600 (Mon, 01 Oct 2007) New Revision: 3013 Added: SQLObject/tags/0.92b1/ Log: Tagging 0.92b1 Copied: SQLObject/tags/0.92b1 (from rev 3012, SQLObject/branches/0.9) |
|
From: <sub...@co...> - 2007-10-01 15:40:01
|
Author: phd Date: 2007-10-01 09:39:56 -0600 (Mon, 01 Oct 2007) New Revision: 3012 Modified: SQLObject/tags/0.8.6b1/setup.cfg SQLObject/tags/0.8.6b1/setup.py Log: 0.8.6b1 Modified: SQLObject/tags/0.8.6b1/setup.cfg =================================================================== --- SQLObject/tags/0.8.6b1/setup.cfg 2007-10-01 15:38:28 UTC (rev 3011) +++ SQLObject/tags/0.8.6b1/setup.cfg 2007-10-01 15:39:56 UTC (rev 3012) @@ -1,10 +1,6 @@ [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.6b1/setup.py =================================================================== --- SQLObject/tags/0.8.6b1/setup.py 2007-10-01 15:38:28 UTC (rev 3011) +++ SQLObject/tags/0.8.6b1/setup.py 2007-10-01 15:39:56 UTC (rev 3012) @@ -28,7 +28,7 @@ """ setup(name="SQLObject", - version="0.8.5", + version="0.8.6b1", description="Object-Relational Manager, aka database wrapper", long_description="""\ SQLObject is a popular *Object Relational Manager* for providing an |
|
From: <sub...@co...> - 2007-10-01 15:38:38
|
Author: phd Date: 2007-10-01 09:38:28 -0600 (Mon, 01 Oct 2007) New Revision: 3011 Added: SQLObject/tags/0.8.6b1/ Log: Tagging 0.8.6b1 Copied: SQLObject/tags/0.8.6b1 (from rev 3010, SQLObject/branches/0.8) |
|
From: <sub...@co...> - 2007-10-01 15:26:35
|
Author: phd
Date: 2007-10-01 09:26:29 -0600 (Mon, 01 Oct 2007)
New Revision: 3010
Modified:
SQLObject/tags/0.7.9b1/setup.cfg
SQLObject/tags/0.7.9b1/setup.py
Log:
0.7.9 beta 1.
Modified: SQLObject/tags/0.7.9b1/setup.cfg
===================================================================
--- SQLObject/tags/0.7.9b1/setup.cfg 2007-10-01 15:23:21 UTC (rev 3009)
+++ SQLObject/tags/0.7.9b1/setup.cfg 2007-10-01 15:26:29 UTC (rev 3010)
@@ -1,7 +1,3 @@
-[egg_info]
-tag_build = a
-tag_svn_revision = true
-
[pudge]
title = SQLObject
dest = docs/html
Modified: SQLObject/tags/0.7.9b1/setup.py
===================================================================
--- SQLObject/tags/0.7.9b1/setup.py 2007-10-01 15:23:21 UTC (rev 3009)
+++ SQLObject/tags/0.7.9b1/setup.py 2007-10-01 15:26:29 UTC (rev 3010)
@@ -19,7 +19,7 @@
DistributionMetadata.download_url = None
setup(name="SQLObject",
- version="0.7.8",
+ version="0.7.9b1",
description="Object-Relational Manager, aka database wrapper",
long_description="""\
SQLObject is a popular *Object Relational Manager* for providing an
@@ -52,7 +52,7 @@
author="Ian Bicking",
author_email="ia...@co...",
url="http://sqlobject.org",
- download_url="http://cheeseshop.python.org/pypi/SQLObject/0.7.8",
+ download_url="http://cheeseshop.python.org/pypi/SQLObject/0.7.9b1",
license="LGPL",
packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages],
scripts=["scripts/sqlobject-admin"],
|
|
From: <sub...@co...> - 2007-10-01 15:23:32
|
Author: phd Date: 2007-10-01 09:23:21 -0600 (Mon, 01 Oct 2007) New Revision: 3009 Added: SQLObject/tags/0.7.9b1/ Log: Tagging 0.7.9b1 Copied: SQLObject/tags/0.7.9b1 (from rev 3008, SQLObject/branches/0.7) |
|
From: <sub...@co...> - 2007-09-26 21:28:24
|
Author: phd
Date: 2007-09-26 15:28:18 -0600 (Wed, 26 Sep 2007)
New Revision: 3007
Modified:
SQLObject/trunk/sqlobject/versioning/test/test_version.py
Log:
Minor code cleanup.
Modified: SQLObject/trunk/sqlobject/versioning/test/test_version.py
===================================================================
--- SQLObject/trunk/sqlobject/versioning/test/test_version.py 2007-09-26 21:27:41 UTC (rev 3006)
+++ SQLObject/trunk/sqlobject/versioning/test/test_version.py 2007-09-26 21:28:18 UTC (rev 3007)
@@ -1,10 +1,11 @@
-from py.test import raises
-from sqlobject import *
try:
sorted
except NameError:
- # For Python 2.2 and 2.3:
+ # For Python 2.3:
from sqlobject.events import sorted
+
+from py.test import raises
+from sqlobject import *
from sqlobject.inheritance import InheritableSQLObject
from sqlobject.versioning import Versioning
from sqlobject.tests.dbtest import *
@@ -43,12 +44,12 @@
class Extra(SQLObject):
name = StringCol()
versions = Versioning(extraCols={'extra' : StringCol(default=_set_extra())})
+
class HasAltId(SQLObject):
name = StringCol()
altid = IntCol(alternateID=True)
versions = Versioning()
-
def setup():
classes = [MyClass, Base, Child, Government, Monarchy, VChild, Extra, HasAltId]
if hasattr(HasForeign, "_connection"):
@@ -66,7 +67,6 @@
version.destroySelf()
def test_versioning():
-
#the simple case
setup()
mc = MyClass(name='fleem')
@@ -129,7 +129,6 @@
extra.versions[0].restore()
assert extra.name == "fleem"
-
def test_next():
setup()
base = Base(name='first', value=1)
@@ -166,4 +165,3 @@
setup()
extra = HasAltId(name="fleem", altid=5)
extra.name = "morx"
-
|
|
From: <sub...@co...> - 2007-09-26 21:27:45
|
Author: phd
Date: 2007-09-26 15:27:41 -0600 (Wed, 26 Sep 2007)
New Revision: 3006
Modified:
SQLObject/branches/0.9/sqlobject/versioning/test/test_version.py
Log:
Backported the patch from r2987 from the trunk.
Modified: SQLObject/branches/0.9/sqlobject/versioning/test/test_version.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/versioning/test/test_version.py 2007-09-26 21:19:59 UTC (rev 3005)
+++ SQLObject/branches/0.9/sqlobject/versioning/test/test_version.py 2007-09-26 21:27:41 UTC (rev 3006)
@@ -1,17 +1,16 @@
-from py.test import raises
-from sqlobject import *
try:
sorted
except NameError:
# For Python 2.2 and 2.3:
from sqlobject.events import sorted
+
+from py.test import raises
+from sqlobject import *
from sqlobject.inheritance import InheritableSQLObject
from sqlobject.versioning import Versioning
from sqlobject.tests.dbtest import *
-from datetime import datetime
-
class MyClass(SQLObject):
name = StringCol()
versions = Versioning()
@@ -45,12 +44,12 @@
class Extra(SQLObject):
name = StringCol()
versions = Versioning(extraCols={'extra' : StringCol(default=_set_extra())})
+
class HasAltId(SQLObject):
name = StringCol()
altid = IntCol(alternateID=True)
versions = Versioning()
-
def setup():
classes = [MyClass, Base, Child, Government, Monarchy, VChild, Extra, HasAltId]
if hasattr(HasForeign, "_connection"):
@@ -58,7 +57,7 @@
else:
classes.append(HasForeign)
for cls in classes:
- if hasattr(cls, 'versions') and hasattr(cls, "_connection") and \
+ if hasattr(cls, 'versions') and getattr(cls, "_connection", None) and \
cls._connection.tableExists(cls.sqlmeta.table):
setupClass(cls.versions.versionClass)
setupClass(cls)
@@ -68,7 +67,6 @@
version.destroySelf()
def test_versioning():
-
#the simple case
setup()
mc = MyClass(name='fleem')
@@ -131,7 +129,6 @@
extra.versions[0].restore()
assert extra.name == "fleem"
-
def test_next():
setup()
base = Base(name='first', value=1)
@@ -168,4 +165,3 @@
setup()
extra = HasAltId(name="fleem", altid=5)
extra.name = "morx"
-
|
|
From: <sub...@co...> - 2007-09-26 21:20:14
|
Author: phd
Date: 2007-09-26 15:19:59 -0600 (Wed, 26 Sep 2007)
New Revision: 3005
Modified:
SQLObject/branches/0.9/sqlobject/mysql/mysqlconnection.py
Log:
Backported the patch from r2986 from the trunk.
Modified: SQLObject/branches/0.9/sqlobject/mysql/mysqlconnection.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/mysql/mysqlconnection.py 2007-09-26 21:19:46 UTC (rev 3004)
+++ SQLObject/branches/0.9/sqlobject/mysql/mysqlconnection.py 2007-09-26 21:19:59 UTC (rev 3005)
@@ -110,7 +110,10 @@
# For MySQLdb 1.2.1 and later, we go
# encoding->unicode->charset (in the mysql db)
if self.need_unicode and not isinstance(query, unicode):
- query = unicode(query, self.encoding)
+ try:
+ query = unicode(query, self.encoding)
+ except UnicodeError:
+ pass
return cursor.execute(query)
except MySQLdb.OperationalError, e:
if e.args[0] in (MySQLdb.constants.CR.SERVER_GONE_ERROR, MySQLdb.constants.CR.SERVER_LOST):
|
|
From: <sub...@co...> - 2007-09-26 21:19:54
|
Author: phd
Date: 2007-09-26 15:19:46 -0600 (Wed, 26 Sep 2007)
New Revision: 3004
Modified:
SQLObject/branches/0.8/sqlobject/mysql/mysqlconnection.py
Log:
Backported the patch from r2986 from the trunk.
Modified: SQLObject/branches/0.8/sqlobject/mysql/mysqlconnection.py
===================================================================
--- SQLObject/branches/0.8/sqlobject/mysql/mysqlconnection.py 2007-09-26 21:19:34 UTC (rev 3003)
+++ SQLObject/branches/0.8/sqlobject/mysql/mysqlconnection.py 2007-09-26 21:19:46 UTC (rev 3004)
@@ -110,7 +110,10 @@
# For MySQLdb 1.2.1 and later, we go
# encoding->unicode->charset (in the mysql db)
if self.need_unicode and not isinstance(query, unicode):
- query = unicode(query, self.encoding)
+ try:
+ query = unicode(query, self.encoding)
+ except UnicodeError:
+ pass
return cursor.execute(query)
except MySQLdb.OperationalError, e:
if e.args[0] in (MySQLdb.constants.CR.SERVER_GONE_ERROR, MySQLdb.constants.CR.SERVER_LOST):
|