dbbase.DB.doc_table¶
-
DB.
doc_table
(cls, to_camel_case=False, serial_fields=None, serial_field_relations=None, level_limits=None, orig_cls=None)[source]¶ This function creates a dictionary of a table configuraton to aid in documenting.
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_table(
cls, to_camel_case=False, serial_fields=None, serial_field_relations=None, level_limits=None, orig_cls=None
)
- Parameters
cls – (class) : the table to be documented
to_camel_case – (bool) : converts the column names to camel case
serial_fields – (None : list) : specify a limited list of columns
serial_field_relations – (None: dict) : Can control what serial
are included in relationships (fields) –
level_limits – (None : dict) : A technical variable related to
runaway recursion. Best to leave it alone. (preventing) –
orig_cls – (None: str) : A technical variable related to recursion,
this variable alone as well. (leave) –
- Returns
doc (dict) – a dict of the column values