Indicate which fields should be returned/selected from the query. * * await Flight.select("id").get(); * * await Flight.select("id", "destination").get();
(
this: T,
...fields: (string | FieldAlias)[]
)
| 426 | * await Flight.select("id", "destination").get(); |
| 427 | */ |
| 428 | static select<T extends ModelSchema>( |
| 429 | this: T, |
| 430 | ...fields: (string | FieldAlias)[] |
| 431 | ) { |
| 432 | this._currentQuery.select( |
| 433 | ...fields.map((field) => this.formatFieldToDatabase(field)), |
| 434 | ); |
| 435 | return this; |
| 436 | } |
| 437 | |
| 438 | /** Create one or multiple records in the current model. |
| 439 | * |
no test coverage detected