Programatically setting advanced settings in zsql methods
Hello ... I have a python based product where I am creating a few zsql methods at the time of instantiation. I recently realized that there is the default 1000 row maximum limit on query rows. While this can be changed through the management interface, I am trying to figure out how to do this when I create the SQL method in the python code. Is this possible? Thanks -Jeff
Jeff Gentry wrote:
Hello ...
I have a python based product where I am creating a few zsql methods at the time of instantiation. I recently realized that there is the default 1000 row maximum limit on query rows. While this can be changed through the management interface, I am trying to figure out how to do this when I create the SQL method in the python code. Is this possible?
Of course. You can do anything the ZMI does. If you look at how it's done there, you will eventually come to the method manage_advanced. You can see it online: http://svn.zope.org/Zope/trunk/lib/python/Shared/DC/ZRDB/DA.py?rev=24751&vie... I suppose you could also just set the property 'max_rows_' if that's all you're interested in. --jcc
J Cameron Cooper wrote:
Of course. You can do anything the ZMI does. If you look at how it's done there, you will eventually come to the method manage_advanced. You can see it online:
http://svn.zope.org/Zope/trunk/lib/python/Shared/DC/ZRDB/DA.py?rev=24751&vie...
I suppose you could also just set the property 'max_rows_' if that's all you're interested in.
Check out how it's implemented in the CMF's FSZSQLMethods cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
On Wed, 6 Apr 2005, Chris Withers wrote:
Check out how it's implemented in the CMF's FSZSQLMethods
To this and others who responded, thanks for the pointers. I assumed that it was going to be possible (since the ZMI does it ...) but didn't know where to look for that, and google searches on what I figured to be good search terms wasn't very fruitful. danke -J
participants (3)
-
Chris Withers -
J Cameron Cooper -
Jeff Gentry