Associate all the required information for a model to connect to a database. * * await db.link([Flight, Airport]);
(models: ModelSchema[])
| 216 | * await db.link([Flight, Airport]); |
| 217 | */ |
| 218 | link(models: ModelSchema[]) { |
| 219 | this._models = models; |
| 220 | |
| 221 | this._models.forEach((model) => |
| 222 | model._link({ |
| 223 | queryBuilder: this._queryBuilder, |
| 224 | database: this, |
| 225 | }) |
| 226 | ); |
| 227 | |
| 228 | return this; |
| 229 | } |
| 230 | |
| 231 | /** Pass on any query to the database. |
| 232 | * |
no test coverage detected