FSZSQLMethod.py refactory
Hi, I did a refactory in the FSZSQLMethod.py module of CMFCore from SVN. I want to use my ZSQLs from the filesystem and I improved the module to better support to this feature. Can someone commit this patch to the CMFCore SVN? Now, the sintax to the FS ZSQLs is: ##title=My query ##connection_id=DataBase ##arguments=arg1 arg2 arg3 ##max_rows=1000 ##max_cache=100 ##cache_time=0 select * from table For each file with .zsql extension. Only connection_id is required. The same pattern of FSPythonScript. Sorry for the attachment, the CMF SVN does't work at this moment, to promote my diff! Regards! -- Jean Ferri TcheZope.org
I did a refactory in the FSZSQLMethod.py module of CMFCore from SVN. I want to use my ZSQLs from the filesystem and I improved the module to better support to this feature.
First of all, CMF-related items are better discussed on the zope- cmf@zope.org list. Can you explain how your changes "better support" ZSQL methods on the file system? They work perfectly fine the way they are. Oh, and what exactly is not working about the CMF Subversion repository? jens
Jens Vagelpohl wrote:
I did a refactory in the FSZSQLMethod.py module of CMFCore from SVN. I want to use my ZSQLs from the filesystem and I improved the module to better support to this feature.
First of all, CMF-related items are better discussed on the zope- cmf@zope.org list.
Sorry!
Can you explain how your changes "better support" ZSQL methods on the file system? They work perfectly fine the way they are.
The actual implemantation parsing a code with <dtml-comment></dtml-comment> tags in its body, with the arguments list. I think it's ugly. """ # parse parameters parameters={} start = data.find('<dtml-comment>') end = data.find('</dtml-comment>') if start==-1 or end==-1 or start>end: raise ValueError,'Could not find parameter block' block = data[start+14:end] """ So, the entire data information is submited in template, or either, the body of zsql method receives <dtml-comment> tags and the arguments list too. I don't know how can it work!? """ self.manage_edit(title, connection_id, arguments, template=data) """ In the top of template has a comment: """ (not yet) Customizable ZSQL methods that come from the filesystem. """ I think (not yet) means this module is not working yet, and it is my impression after my tests and analisys the code!
Oh, and what exactly is not working about the CMF Subversion repository?
I am using Plone 2.1, following the instruction: http://plone.org/development/info/participation It worked fine 2 days ago, but now it give me a timeout exception. Forgives myself for trying to help the community! -- Jean Ferri TcheZope.org
On 22 Jul 2005, at 14:31, Jean Rodrigo Ferri wrote:
So, the entire data information is submited in template, or either, the body of zsql method receives <dtml-comment> tags and the arguments list too. I don't know how can it work!?
It does work.
In the top of template has a comment:
""" (not yet) Customizable ZSQL methods that come from the filesystem. """
I think (not yet) means this module is not working yet, and it is my impression after my tests and analisys the code!
It does work. The comment is wrong. If you find something that does *not* work I'll be glad to look at it, but so far you have not given any specific information about breakages like tracebacks or steps to follow to produce an error. jens
participants (2)
-
Jean Rodrigo Ferri -
Jens Vagelpohl