Update of /cvsroot/monetdb/clients/src/python/Cimpl/MonetSQLdb
In directory 
sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22226/src/python/Cimpl/MonetSQLdb

Modified Files:
      Tag: Clients_1-20
        converters.py 
Log Message:
added some more conversions (see alo [ 1840642 ] converters.py missing 
"bigint":long)


Index: converters.py
===================================================================
RCS file: /cvsroot/monetdb/clients/src/python/Cimpl/MonetSQLdb/converters.py,v
retrieving revision 1.2
retrieving revision 1.2.6.1
diff -u -d -r1.2 -r1.2.6.1
--- converters.py       3 Jan 2007 12:18:22 -0000       1.2
+++ converters.py       29 Nov 2007 21:34:57 -0000      1.2.6.1
@@ -60,8 +60,8 @@
     return str(s)
 
 def Unicode2Str(s, d):
-    """Convert a unicode object to a string using latin1 encoding."""
-    return s.encode('latin')
+    """Convert a unicode object to a string using utf-8 encoding."""
+    return s.encode('utf-8')
 
 # Python 1.5.2 compatibility hack
 if str(0L)[-1]=='L':
@@ -140,12 +140,16 @@
 
     # Monet SQL -> Python
     "varchar": str,
+    "tinyint": int,
     "shortint": int,
     "mediumint": int,
+    "bigint": long,
     "longint": long,
     "boolean": str2bool,
+    "decimal": float,
     "float": float,
     "double": float,
+    "real": float,
     "blob": str2blob,
     # timestamp types
     "date": times.fromDate,
@@ -154,10 +158,10 @@
 
     # Monet MIL -> Python
     "str": str,
+    "bte": int,
+    "sht": int,
     "int": int,
     "lng": long,
-    "sht": int,
-    "bte": int,
     "wrd": long,
     "bit": bool,
     "chr": str,


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to