[Monetdb-developers] Another Python patch and Django Adapter [was: encoding of strings ...]

Mark Bucciarelli mkbucc at gmail.com
Mon Dec 21 18:41:52 CET 2009

On Mon, Dec 21, 2009 at 01:53:52PM +0100, Gijs Molenaar wrote:
> On 12/21/2009 03:35 AM, Mark Bucciarelli wrote:
> >    
> > Is the maintainer of the Python adapter active even
> > on this list?
> >    
> hi!



I see you committed my fix for the new-line issue.  Great!

I was surprised that the mapi backend behaved that way--was
this really a Python client issue?

I hit another issue (this time for sure with the Python client)
that I didn't open a tracker issue for--patch enclosed below.

Pretty simple: DOUBLE's and REAL's map to floats, not ints.

I was tempted to add some unit tests for this basic type
conversion stuff, but I couldn't understand how the tests
are run, and I wasn't going to dig around the 5,000 lines of
auto-tools code:

	$ pwd
	$ find . -name "Makefile*" -exec cat {} \; | wc -l  
	$ find . -name "*.py" -exec cat {} \; | wc -l     

When the Unicode fix is committed, I think the initial
(rudimentary but functional) release of a Django adapter for
MonetDB will be done.


Is there an announcement list I should post to when I'm happy
with the Django adapter?



	To apply this patch, from root of Monetdb source tree,
	execute the following commands:

		$ cd clients/src/python/monetdb/sql
		$ patch -p0 < 2.monetdb.sql.converters.diff

--- /home/mark/converters.py.orig	2009-12-20 00:47:58.000000000 -0500
+++ ./converters.py	2009-12-20 00:48:16.000000000 -0500
@@ -42,8 +42,8 @@
             type_codes.WRD: int,
             type_codes.BIGINT: int,
             type_codes.SERIAL: int,
-            type_codes.REAL: int,
-            type_codes.DOUBLE: int,
+            type_codes.REAL: float,
+            type_codes.DOUBLE: float,
             type_codes.BOOLEAN: self.__bool,
             type_codes.DATE: self.__date,
             type_codes.TIME: self.__time,

More information about the developers-list mailing list