Next: , Previous: , Up: Embedded Commands   [Contents][Index]


6.1.4.1 Database Extension

Function: wrap-command-interface rdb

Returns relational database rdb wrapped with additional commands defined in its *commands* table.

Function: add-command-tables rdb

The relational database rdb must be mutable. add-command-tables adds a *command* table to rdb; then returns (wrap-command-interface rdb).

Function: define-*commands* rdb spec-0 …

Adds commands to the *commands* table as specified in spec-0 … to the open relational-database rdb. Each spec has the form:

((<name> <rdb>) "comment" <expression1> <expression2> …)

or

((<name> <rdb>) <expression1> <expression2> …)

where <name> is the command name, <rdb> is a formal passed the calling relational database, "comment" describes the command, and <expression1>, <expression1>, … are the body of the procedure.

define-*commands* adds to the *commands* table a command <name>:

(lambda (<name> <rdb>) <expression1> <expression2> …)
Function: open-command-database filename
Function: open-command-database filename base-table-type

Returns an open enhanced relational database associated with filename. The database will be opened with base-table type base-table-type) if supplied. If base-table-type is not supplied, open-command-database will attempt to deduce the correct base-table-type. If the database can not be opened or if it lacks the *commands* table, #f is returned.

Function: open-command-database! filename
Function: open-command-database! filename base-table-type

Returns mutable open enhanced relational database …

Function: open-command-database database

Returns database if it is an immutable relational database; #f otherwise.

Function: open-command-database! database

Returns database if it is a mutable relational database; #f otherwise.


Next: , Previous: , Up: Embedded Commands   [Contents][Index]