ZSQL method and LIMIT clause
Hello, My problem is I don't know to prevent Zope from adding "LIMIT 1000" to the end of each of my ZSQL method (*.zsql). I am developing a filesystem-based product so I can not disable it by setting "Maximum Rows to Retrieve" to zero in the ZMI interface. I got stuck with this problem for a couple of weeks (google search and read documentation didn't help). Any help is greatly appreciated.
Am Donnerstag, den 03.11.2005, 09:37 +0700 schrieb Thanh Hải, Hà:
Hello,
My problem is I don't know to prevent Zope from adding "LIMIT 1000" to the end of each of my ZSQL method (*.zsql). I am developing a filesystem-based product so I can not disable it by setting "Maximum Rows to Retrieve" to zero in the ZMI interface. I got stuck with this problem for a couple of weeks (google search and read documentation didn't help). Any help is greatly appreciated.
Go to the advanced tab of your ZSQL method and set the max rows there to 0. IIRC, just adding the LIMIT clause to the query is database adaptor specific. (Others may fetch only max rows from dataset)
*Everything* you can do in the ZMI can be done from code. The ZMI is not a magic entity, it uses the same APIs as everybody else. With FSZSQLMethods you can stick max_rows: 0 into the lead-in comment, BTW. Stefan On 3. Nov 2005, at 03:37, Thanh Hải, Hà wrote:
My problem is I don't know to prevent Zope from adding "LIMIT 1000" to the end of each of my ZSQL method (*.zsql). I am developing a filesystem-based product so I can not disable it by setting "Maximum Rows to Retrieve" to zero in the ZMI interface.
-- Anything that happens, happens. --Douglas Adams
Thanks Stefan! Sticking max_rows:0 into the lead-in comment does the magic. 2005/11/3, Stefan H. Holek <stefan@epy.co.at>:
*Everything* you can do in the ZMI can be done from code. The ZMI is not a magic entity, it uses the same APIs as everybody else. With FSZSQLMethods you can stick max_rows: 0 into the lead-in comment, BTW.
Stefan
On 3. Nov 2005, at 03:37, Thanh Hải, Hà wrote:
My problem is I don't know to prevent Zope from adding "LIMIT 1000" to the end of each of my ZSQL method (*.zsql). I am developing a filesystem-based product so I can not disable it by setting "Maximum Rows to Retrieve" to zero in the ZMI interface.
-- Anything that happens, happens. --Douglas Adams
participants (3)
-
Stefan H. Holek -
Thanh Hải, Hà -
Tino Wildenhain