Re: sqlite3 adaptors mystery

2008-03-02 Thread Mel
Matej Cepl wrote: > Thanks for your help, but plain-text strings is not what > I wanted. The boolean variables was what I was after. See this > modified version of the script: > > #!/usr/bin/python > import sqlite3 > def adapt_boolean(bol): > if bol: > return "True" > else

Re: sqlite3 adaptors mystery

2008-03-02 Thread Matej Cepl
On 2008-03-02, 08:16 GMT, Matej Cepl wrote: > Thanks for your help, but plain-text strings is not what > I wanted. The boolean variables was what I was after. See this > modified version of the script: OK, I got it -- I was missing detect_types parameter of the connect method. Matěj -- http:/

Re: sqlite3 adaptors mystery

2008-03-02 Thread Matej Cepl
On 2008-03-01, 23:41 GMT, Mel wrote: > There's nothing much wrong. cur.fetchall is returning a list > of all the selected rows, and each row is a tuple of fields. > Each tuple is being converted for display by repr, so the > strings are shown as unicode, which is what they are > internally.

Re: sqlite3 adaptors mystery

2008-03-01 Thread Mel
Matej Cepl wrote: [ ... ] > However, when running this program it seems converter doesn’t seem to work, > because I get: > > [EMAIL PROTECTED] dumpBugzilla]$ rm test.db ; python testAdaptors.py > [(u'False',), (u'True',)] > [EMAIL PROTECTED] dumpBugzilla]$ > > There is probably something quite ob

sqlite3 adaptors mystery

2008-03-01 Thread Matej Cepl
Hi, I am in the process of creating a small script for filling the sqlite3 database with data from rather large XML-RPC query (list of many bugs from the Red Hat Bugzilla) and I would love to use adaptors and converters for some data types which I am missing. I have this test script (made hope