[Zope3-checkins] CVS: Zope3/src/zope/app/content - sql.py:1.10
Jeremy Hylton
cvs-admin at zope.org
Tue Nov 4 21:43:35 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/content
In directory cvs.zope.org:/tmp/cvs-serv4065
Modified Files:
sql.py
Log Message:
Remove duplicate code.
=== Zope3/src/zope/app/content/sql.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/content/sql.py:1.9 Sun Sep 21 13:31:52 2003
+++ Zope3/src/zope/app/content/sql.py Tue Nov 4 21:43:34 2003
@@ -239,52 +239,6 @@
return parseArguments(text[length:], result)
-class SQLGroup:
- blockContinuations = 'and', 'or'
- name = 'sqlgroup'
- required = None
- where = None
-
- def __init__(self, blocks):
- self.blocks = blocks
- tname, args, section = blocks[0]
- self.__name__ = "%s %s" % (tname, args)
- args = parse_params(args, required=1, where=1)
- if args.has_key(''):
- args[args['']] = 1
- if args.has_key('required'):
- self.required = args['required']
- if args.has_key('where'):
- self.where = args['where']
-
-
- def render(self, md):
- result = []
- for tname, args, section in self.blocks:
- __traceback_info__ = tname
- s = section(None, md).strip()
- if s:
- if result:
- result.append(tname)
- result.append("%s\n" % s)
-
- if result:
- if len(result) > 1:
- result = "(%s)\n" %(' '.join(result))
- else:
- result = result[0]
- if self.where:
- result = "where\n" + result
- return result
-
- if self.required:
- raise 'Input Error', 'Not enough input was provided!'
-
- return ''
-
- __call__ = render
-
-
class SQLVar:
name = 'sqlvar'
More information about the Zope3-Checkins
mailing list