[Monetdb-developers] monetdb-client for python doesn't seem to work for booleans.
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() <
Vikram Bhandoh wrote:
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
thank you for your contribution.
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() <
------------------------------------------------------------------------
------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H
------------------------------------------------------------------------
_______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
participants (2)
-
Martin Kersten
-
Vikram Bhandoh