within-databasecreates a lexical scope in which the commands
define-commandcreate tables and
*commands*-table entries respectively in open relational database database. The expressions in `within-database' form are executed in order.
Adds to the
*commands*table a command <name>:(lambda (<name> <rdb>) <expression1> <expression2> ...)
where <name> is the table name, <descriptor-name> is the symbol name of a descriptor table, <primary-key-fields> and <other-fields> describe the primary keys and other fields respectively, and <rows> is a list of data rows to be added to the table.
<primary-key-fields> and <other-fields> are lists of field descriptors of the form:(<column-name> <domain>)
or(<column-name> <domain> <column-integrity-rule>)
where <column-name> is the column name, <domain> is the domain of the column, and <column-integrity-rule> is an expression whose value is a procedure of one argument (which returns
#fto signal an error).
If <domain> is not a defined domain name and it matches the name of this table or an already defined (in one of spec-0 ...) single key field table, a foreign-key domain will be created for it.
The relational database database must be mutable.
define-macromacro to database; then database is returned.
Adds a macro <name> to the
within-databasecreates lexical scope where not only
define-table, but every command and macro are defined, ie.:(within-database my-rdb (define-command (message rdb) (lambda (msg) (display "message: ") (display msg) (newline))) (message "Defining FOO...") ;; ... defining FOO ... (message "Defining BAR...") ;; ... defining BAR ... )