Next: Match-Keys, Previous: Table Operations, Up: Table Operations [Contents][Index]
The term row used below refers to a Scheme list of values (one for
each column) in the order specified in the descriptor (table) for this
table. Missing values appear as #f
. Primary keys must not
be missing.
Adds the row row to this table. If a row for the primary key(s) specified by row already exists in this table an error is signaled. The value returned is unspecified.
(define telephone-table-desc ((my-database 'create-table) 'telephone-table-desc)) (define ndrp (telephone-table-desc 'row:insert)) (ndrp '(1 #t name #f string)) (ndrp '(2 #f telephone (lambda (d) (and (string? d) (> (string-length d) 2) (every (lambda (c) (memv c '(#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9 #\+ #\( #\space #\) #\-))) (string->list d)))) string))
Returns a procedure of one argument, row, which adds the row, row, to this table. If a row for the primary key(s) specified by row already exists in this table, it will be overwritten. The value returned is unspecified.
Returns a procedure of arguments key1 key2 … which
returns the row associated with primary keys key1, key2
… if it exists, or #f
otherwise.
((plat 'row:retrieve) 'linux) ⇒ (linux i386 linux gcc) ((plat 'row:retrieve) 'multics) ⇒ #f
Returns a procedure of arguments key1 key2 … which
removes and returns the row associated with primary keys key1,
key2 … if it exists, or #f
otherwise.
Returns a procedure of arguments key1 key2 … which deletes the row associated with primary keys key1, key2 … if it exists. The value returned is unspecified.
Next: Match-Keys, Previous: Table Operations, Up: Table Operations [Contents][Index]