Next: , Previous: , Up: Base Table   [Contents][Index]


6.2.1.5 Base Record Operations

In the following functions, the key argument can always be assumed to be the value returned by a call to a keyify routine.

Operation on base-table: present? handle key

Returns a non-#f value if there is a row associated with key in the table opened in handle and #f otherwise.

Operation on base-table: make-getter key-dimension types

Returns a procedure which takes arguments handle and key. This procedure returns a list of the non-primary values of the relation (in the base table opened in handle) whose primary key is key if it exists, and #f otherwise.

make-getter-1 is a new operation. The relational-database module works with older base-table implementations by using make-getter.

Operation on base-table: make-getter-1 key-dimension types index

Returns a procedure which takes arguments handle and key. This procedure returns the value of the indexth field (in the base table opened in handle) whose primary key is key if it exists, and #f otherwise.

index must be larger than key-dimension.

Operation on base-table: make-putter key-dimension types

Returns a procedure which takes arguments handle and key and value-list. This procedure associates the primary key key with the values in value-list (in the base table opened in handle) and returns an unspecified value.

Operation on base-table: delete handle key

Removes the row associated with key from the table opened in handle. An unspecified value is returned.