Update of /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/SQLiteAdaptorLayer
In directory sc8-pr-cvs1:/tmp/cvs-serv12454/Modeling/DatabaseAdaptors/SQLiteAdaptorLayer
Modified Files:
SQLiteSchemaGeneration.py
Log Message:
Fixed bug #785432: SQLite now accepts TEXT, and DATETIME, TEXT, NUMBER,
DECIMAL, SMALLINT, REAL as well in addition to the sql types basically
accepted by the core's SQLExpression (CHAR, FLOAT, INT, INTEGER, NUMERIC,
DATE, TIME, TUMESTAMP and VARCHAR)
Index: SQLiteSchemaGeneration.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/SQLiteAdaptorLayer/SQLiteSchemaGeneration.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SQLiteSchemaGeneration.py 2 Aug 2003 08:07:15 -0000 1.2
--- SQLiteSchemaGeneration.py 9 Aug 2003 11:17:45 -0000 1.3
***************
*** 268,269 ****
--- 268,290 ----
sqlExprs.append(sqlExpr)
return sqlExprs
+
+ def valueTypeForExternalTypeMapping(self):
+ """
+ Extends the inherited method's result set and adds the SQL types:
+ DATETIME, TEXT, NUMBER, DECIMAL, SMALLINT, REAL.
+
+ See also: SQLExpression.valueTypeForExternalTypeMapping()
+ """
+ # Note: SQLite does not care about SQL types, since all types are treated
+ # as strings in this db-server. Any valid (or invalid) sql types can be
+ # added here, neither the framework nor SQLite cares.
+ values=SQLExpression.valueTypeForExternalTypeMapping.im_func(self)
+ values.update({ 'datetime': DateType,
+ 'text': CharacterType,
+ 'number': NumericType,
+ 'decimal': NumericType,
+ 'smallint': NumericType,
+ 'real': NumericType,
+ }
+ )
+ return values
|