[SQL-CVS] r3123 - in SQLObject/branches/0.9: docs sqlobject/sqlite
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2007-10-22 12:19:56
|
Author: phd Date: 2007-10-22 06:19:51 -0600 (Mon, 22 Oct 2007) New Revision: 3123 Modified: SQLObject/branches/0.9/docs/News.txt SQLObject/branches/0.9/sqlobject/sqlite/sqliteconnection.py Log: Fixed bugs in SQLiteConnection.guessColumn(). Modified: SQLObject/branches/0.9/docs/News.txt =================================================================== --- SQLObject/branches/0.9/docs/News.txt 2007-10-22 11:27:46 UTC (rev 3122) +++ SQLObject/branches/0.9/docs/News.txt 2007-10-22 12:19:51 UTC (rev 3123) @@ -15,6 +15,8 @@ * Fixed a misspelled 'zerofill' option's name. +* Fixed bugs in SQLiteConnection.guessColumn(). + * A number of changes ported from `SQLObject 0.7.9`_ and `SQLObject 0.8.6`_. SQLObject 0.9.1 Modified: SQLObject/branches/0.9/sqlobject/sqlite/sqliteconnection.py =================================================================== --- SQLObject/branches/0.9/sqlobject/sqlite/sqliteconnection.py 2007-10-22 11:27:46 UTC (rev 3122) +++ SQLObject/branches/0.9/sqlobject/sqlite/sqliteconnection.py 2007-10-22 12:19:51 UTC (rev 3123) @@ -346,15 +346,15 @@ def guessClass(self, t): t = t.upper() - if t.find('INT') > 0: + if t.find('INT') >= 0: return col.IntCol, {} - elif t.find('TEXT') > 0 or t.find('CHAR') > 0 or t.find('CLOB') > 0: + elif t.find('TEXT') >= 0 or t.find('CHAR') >= 0 or t.find('CLOB') >= 0: return col.StringCol, {'length': 2**32-1} - elif t.find('BLOB') > 0: + elif t.find('BLOB') >= 0: return col.BLOBCol, {"length": 2**32-1} - elif t.find('REAL') > 0 or t.find('FLOAT') > 0: + elif t.find('REAL') >= 0 or t.find('FLOAT') >= 0: return col.FloatCol, {} - elif t.find('DECIMAL') > 0: + elif t.find('DECIMAL') >= 0: return col.DecimalCol, {} else: return col.Col, {} |