[Zope] optional integer arguments

Daniel M. Drucker dmd@3e.org
Tue, 8 Jun 1999 12:09:29 -0400 (EDT)


I'm still very unclear on how to construct a SQL Method that has
optional integer arguments.

For example:

Document1:
<!--#in GetStuff-->
  <!--#var theanswer-->
<!--#/in-->

Document2:
<!--#in "GetStuff(foo=3,bar=5)"-->
  <!--#var theanswer-->
<!--#/in-->

GetStuff:
arguments: foo:int bar:int      ??? is this correct?

SELECT theanswer FROM some_table
   WHERE some_value=3

.
.  ??? what do I put here ???
.  I want foo and bar to both be optional.
.  If they are both provided, they should be joined with AND
.