On Jan 31, 2010, at 7:23 PM, Jacek Kałucki wrote:
> I'm afraid I can't understand principles that rules fetching
> data from backend in dCursorMixin class.
> When we query data from backend first time,
> it is completely new query and _newQuery parameter equals True.
> But when we requery the same data again issuing
> interactive request, query parameters doesn't change
> and _newQuery equals False.
> But data may change and mostly do!
The _newQuery simply allows the framework to skip determining field
types if the columns returned by the new query are identical to the previous
query. So even if the data changes, the column types do not.
> But even when they doesn't we receive the same dataset
> where some fields are different type they were first time!
> It's because format conversion between backend
> and Python formats is executed only when _newQuery equals True,
> so first time I got decimal type and next float for the same field.
> I think that is completely wrong!
Are you saying that you ran two queries against the same columns, and
got different data types back from the same column on each query? I've never
seen this happen. If the first time a column is queried it returns a certain
data type, I would expect it to always return the same data type.
> And yet another thing.
> Why I cant pass _newQuery parameter to executeSafe() method?
Because those are temporary cursors, and are not guaranteed to return
the same object on subsequent calls. There is no need for (and no way to
guarantee) the sort of optimization that _newQuery affords.
-- 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]