On Mar 11, 2009, at 11:30 AM, Adrian Klaver wrote:

> Invoking UserSQL overrides the SQL Builder methods in dCursorMixin.py.

        Correct.

>  This means you lose any parent-child relationship information set  
> in a bizobj

        False. You have to define the join, but you can use a placeholder for  
the value of the dependent key, and if the relationship is defined in  
the bizobjs, the param will be correctly returned. Also, requerying  
the parent requeries the children, whether or not those queries are  
defined by UserSQL or SQL Builder methods.

> As noted DataStructure lives outside the SQL Builder

        Yes.

> A dataset starts out as tuple of dictionaries. When getDataSet() is  
> called you get a sqlite3 table that can be used in queries by using  
> the alias "dataset".

        Not quite. A dataset is a subclass of tuple, so it's still a tuple of  
dicts. The difference is that it understands a few other methods, such  
as 'execute', and will use SQLite under the hood to carry out those  
methods. The result is another dataset.

> Doing bizobj.filter() sets up a sqlite3 dataset.

        Internally, yes, but that's not relevant to using it. filter()  
modifies the current dataset in place, but remembers the original, so  
that you can remove the filter without having to hit the backend again.

> sqlite3 does not understand timestamps with time zones. This is what  
> initially led to all this. I tried to bizobj.filter() and the  
> dataset choked on a timestamp field I did not think I had included  
> in my bizobj. This a is an issue with sqlite/pysqlite they will  
> INSERT a string with a time zone offset but will error on  
> retrieving  it. Now that I understand DataStructure, it is not  
> problem. Something to deal with at another time.

        If you can submit a brief program that demonstrates this, I'd like to  
look into it. Create a Trac issue explaining the problem, and attach  
the code to that.


-- Ed Leafe




_______________________________________________
Post Messages to: [email protected]
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/[email protected]

Reply via email to