Uwe Grauer wrote:
> Ricardo Aráoz wrote:
>   
>> Ed Leafe wrote:
>>     
>>> On Mar 3, 2009, at 4:17 PM, Ricardo Aráoz wrote:
>>>
>>>       
>>>> Finally I'd like to report that crsr.getDataSet() is not as comfortable
>>>> as it might be. Sometimes the key will be only 'Name' (in the example
>>>> above), some other times it will be 'menu.name' (notice in the previous
>>>> case 'Name' was cased) but some other times I use menu.name in the query
>>>> and the key will be 'Name'. So I haven't found a rule for the naming of
>>>> keys and I have to previously test the queries in order to know the key
>>>> names and get the data I need into a list.
>>>>         
>>>     I'm not exactly clear as to what the confusion is here. When you
>>> run a query, the result returned by the database has some sort of name
>>> identifying each column in the result set: either the actual column
>>> name, or an alias if your query used the 'as' clause, or a
>>> DB-determined name such as 'SUM(mycol)'. The key in the dataset will
>>> always be the value returned by the dbapi for that column.
>>>
>>>       
>> I've got an example here (after each query there is an output and a
>> comment) :
>> --------------------------------------------------------------------------
>> ci = dabo.db.dConnectInfo(DbType='SQLite')
>> ...
>>     
>
> Can you please descibe what the inconsisty is you are seeing?
> Did you run the same statements in sqlite client?
> Was the output different from what you get in Dabo?
>   
Have you READ the post? The whole post explains the inconsistency. Given
the same condition I get as key one time 'Name' and other time
'menu.Name'. This is either an inconsistency or me not knowing all the
rules about how keys are defined.
> Dabo should use the cursor description which you get from the python
> dbapi and use this for the dictionary keys.
>   
Then maybe the SQLite api is not behaving. I'll take a look tomorrow.



--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49af01ea.5020...@gmail.com

Reply via email to