Next: Command Service, Previous: Define-tables Example, Up: Embedded Commands [Contents][Index]
The table *commands*
in an enhanced relational-database has
the fields (with domains):
PRI name symbol parameters parameter-list procedure expression documentation string
The parameters
field is a foreign key (domain
parameter-list
) of the *catalog-data*
table and should
have the value of a table described by *parameter-columns*
. This
parameter-list
table describes the arguments suitable for passing
to the associated command. The intent of this table is to be of a form
such that different user-interfaces (for instance, pull-down menus or
plain-text queries) can operate from the same table. A
parameter-list
table has the following fields:
PRI index ordinal name symbol arity parameter-arity domain domain defaulter expression expander expression documentation string
The arity
field can take the values:
single
Requires a single parameter of the specified domain.
optional
A single parameter of the specified domain or zero parameters is acceptable.
boolean
A single boolean parameter or zero parameters (in which case #f
is substituted) is acceptable.
nary
Any number of parameters of the specified domain are acceptable. The argument passed to the command function is always a list of the parameters.
nary1
One or more of parameters of the specified domain are acceptable. The argument passed to the command function is always a list of the parameters.
The domain
field specifies the domain which a parameter or
parameters in the index
th field must satisfy.
The defaulter
field is an expression whose value is either
#f
or a procedure of one argument (the parameter-list) which
returns a list of the default value or values as appropriate.
Note that since the defaulter
procedure is called every time a
default parameter is needed for this column, sticky defaults can
be implemented using shared state with the domain-integrity-rule.
Next: Command Service, Previous: Define-tables Example, Up: Embedded Commands [Contents][Index]