Constructor
new RelationshipStore()
Initialize the storage data structures.
- Source:
Methods
getRelationships(tableName1, tableName2, oneWayopt) → {Array.<ForeignKey>}
Get all of the foreign keys between two tables. The order of the two
table names does not matter.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
tableName1 |
string | The first table name. | ||
tableName2 |
string | The second table name. | ||
oneWay |
boolean |
<optional> |
false | When true, only return the relationships between table1 and table2 that table1 owns. |
- Source:
Returns:
An array of ForeignKey instances.
- Type
- Array.<ForeignKey>
indexRelationships(An) → {void}
Given a Database instance, store all the foreign keys such that they can
be quickly searched.
Parameters:
Name | Type | Description |
---|---|---|
An |
Array.<Table> | array of Table instances, each of which has a foreignKey property set. |
- Source:
Returns:
- Type
- void