Class: exports.Table
Defined in: | src/table.coffee |
Overview
A representation of a single database table. It includes information on the fields that this table stores, as well as the relationships between it and other tables, either as N->1 (references) or N->many (collections).
Instance Method Summary
- # (void) toString() Stringification.
- # (Array<String>) parents() Get the names of all the classes this class directly inherits from.
- # (Promise<String>) getDisplayName() Bound Get a human readable display name, as configured for this class.
Constructor Details
#
(void)
constructor(opts, model)
Constructor. @param opts The configuration options
Instance Method Details
#
(void)
toString()
Stringification.
Stringifies to a readable representation with table name and the names of all fields.
#
(Array<String>)
parents()
Get the names of all the classes this class directly inherits from.
#
(Promise<String>)
getDisplayName()
Bound
Get a human readable display name, as configured for this class.
This is the same as table.model.makePath(table.name).getDisplayName()
,
but you don't need to make sure you have access to the model.