[Monetdb-developers] monetdb-client for python doesn't seem to work for booleans.

Vikram Bhandoh vikram.bhandoh at gmail.com
Mon Feb 23 00:00:23 CET 2009


Hi I've been working on a django backend for monetdb. For people who are
interested in it have a look at it
http://github.com/vikram/monetdb/tree/master

I found a couple of issues with the python monetdb-client which are
important for python. It doesn't seem to
support boolean fields and doesn't give the lastrowid.

I have a patch here for both. I'm sure about the lastrowid. As I haven't
tested it in anger, could anyone tell
me if this is alright or have I got things completely wrong.

Thanks

Vikram

diff MonetSQLdb/converters.py ./converters.py
120,125d119
< def Boolean2Str(x, d):
<     if x:
<         return 'TRUE'
<     else:
<         return 'FALSE'
<
144d137
<     types.BooleanType: Boolean2Str,
diff MonetSQLdb/cursors.py ./cursors.py
38d37
<         self.lastrowid = 0
82d80
<
132,134d129
<         if self._result.lastid()>0:
<             self.lastrowid = self._result.lastid()
<
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20090222/cefbffc5/attachment.html>


More information about the developers-list mailing list