>On Mon, Apr 04, 2005 at 11:55:51AM -0700, Brandon Ehle wrote:
>>>> there is a typo in the cull() method that makes it generate an error
>>>> (accessing "culldOffset"
>>>> instead of "cullOffset").
>> Fixed. Thank you!
Another issue that I've run into is that I am getting the following
entries in my MySQL slow queries log.
# Time: 050404 11:27:59
# User@...: root[root] @ localhost 
# Query_time: 2 Lock_time: 0 Rows_sent: 3994 Rows_examined: 3994
SELECT test.id,test.name,test.target_id,test.started,test.finished FROM
test WHERE 1 = 1;
Something in SQLObject is issuing the above statement, which does a fetch
on all the rows in the database because "1" always equals "1".
>>>> Not all queries into this table require that binary column, and I was
>>>> wondering if there is anyway
>>>> to delay fetching of that column until I specifically request that value
>>>> from code.
>> How do you suppose to fetch the column later? I mean, what is the
Basically an object get would not fetch the colunn by default, but delay
this fetch until the first time the attribute is accessed.
e.g. something like:
name = StringCol()
other_data = IntCol()
blob = StringCol(length=2**24, varchar=True) # expensive column
_lazyColumn = [blob]
And when the object gets retrieved from the server for the first time:
t = Test.get(0)
The blob field would get culled from the SQL query resulting in something
SELECT test.name,test.other_data FROM test WHERE test.id=0
And when accessing the blob field:
Would then generate just the minimal query:
SELECT test.blob FROM test WHERE test.id=0
And retreive the field.