Copyright © 2009 Francesco Cesarini and Simon Thompson
Authors: Francesco Cesarini (support@erlang-consulting.com), Simon Thompson [web site: http://www.cs.kent.ac.uk/~sjt/].
References
add_usr/1 | Add a user (of the usr record type) to the database. |
close_tables/0 | Close the ETS and DETS tables implementing the database. |
create_tables/1 | Create the ETS and DETS tables which implement the database. |
delete_usr/1 | Delete a user, specified by their customer id. |
delete_usr/2 | Delete a user, specified by their phone number and customer id. |
update_usr/1 | Updates the ram and disk tables with a Usr . |
add_usr(Usr::#usr{}) -> ok
Add a user (of the usr
record type) to the database.
close_tables() -> ok | {error, string()}
Close the ETS and DETS tables implementing the database.
Returns either ok
or and error
tuple with the reason for the failure to close the DETS table.
create_tables(FileName::string()) -> {ok, reference()} | {error, string()}
Create the ETS and DETS tables which implement the database. The
argument gives the filename which is used to hold the DETS table.
If the table can be created, an ok
tuple containing a
reference to the created table is returned; if not, it returns an error
tuple with a string describing the error.
delete_usr(CustId::integer()) -> ok | {error, string()}
Delete a user, specified by their customer id. Returns
either ok
or an error
tuple with a reason, if either the
lookup of the id fails, or the delete of the tuple.
delete_usr(PhoneNo::integer(), CustId::integer()) -> ok | {error, string()}
Delete a user, specified by their phone number and customer id. Returns
either ok
or an error
tuple with a reason.
update_usr(Usr::#usr{}) -> ok
Updates the ram and disk tables with a Usr
.
Generated by EDoc, Feb 28 2009, 12:50:24.