dbbase.DB.doc_tables¶
-
DB.
doc_tables
(class_list=None, to_camel_case=False)[source]¶ This function creates a dictionary of all the table configuratons.
The function can be used in several ways:
Communicate characteristics about a resource in an API.
Provide a basis for unittesting a table to verify settings.
Enable API resource validation prior to record creation.
- Usage:
- doc_tables(
class_list=None to_camel_case=False
)
- Parameters
#class_list – (None : list) : if left as None, returns all classes
to_camel_case – (bool) : converts the column names to camel case
serial_fields – (None : list) : specify a limited list of columns
- Returns
doc (dict) –
- a dict of the classes with an initial key of
’definitions’
The column props included are name, type, required, default detail, foreign_keys, and unique.