customers module¶
-
class
customers.Customers(db_path_name)¶ Bases:
dbparam.DbParamCustomer worker to operate DB on table
customers(list, add, modify and delete methods).Customer name has to be alphanumeric and less than 20 characters. At the DB all the spaces
" "will be replaced by underscores"_".-
static
_check_value(value)¶ Verifies the value to be alphanumeric string, and less than 20 characters :param value: string to verify :return:
Trueif the value is a valid string otherwise returnsFalse
-
add()¶ Add a customer.
Returns: Customername added orFalseif the customer already exists.
-
delete()¶ Delete a customer.
Returns: Customername deleted orFalseif the customer already exists.
-
list()¶ List the table
customersordered alphabetically.Returns: True
-
modify()¶ Modify a customer.
Returns: Customeroriginal name andnew_name, orFalseif the customer do not exists.
-
static