> Something like
> 
>    table get tablename key
>    table set tablename key value
>    table unset tablename key
>    table list tablename
> 
> I know there is some ability to support multiple entries with the same  
> key.  Right now I'm punting on that but I suppose it might need that.   
> Perhaps
> 
>    table add tablename key value

FWIW: To deal with multiple entries for a single key, in Websh we have
an interface that allows to get the count of the entries, while get
either gets the single value or the list of all values. Adapted to
your proposal that would be something like

% table count tablename key
2
% table get tablename key
a b
%

While the result of [table get tablename key] is ambiguous w/o
knowledge about the number of entries (in the example "a b" could
either be a single entry or the two entries "a" and "b"), it's good
enough if it's usually clear from the context whether a sinlge entry
or multiple entries are expected. (We use this succesfully for form
fields and parameters in the query-string.)

As setters, we use

    table set tablename key value ?value ...?
    table lappend tablename key value ?value ...?

... Maybe a bit too fancy though.

Just my .02$ regarding the multiple entries issue.

Ronnie
-- 
Ronnie Brunner | [EMAIL PROTECTED]
phone +41-44-247 79 79 | fax +41-44-247 70 75
Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to