File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -183,8 +183,23 @@ declare namespace Objection {
183
183
[ relationName : string ] : RelationMapping ;
184
184
}
185
185
186
+ interface RelationProperty {
187
+ size : number ;
188
+ modelClass : Model ;
189
+ props : string [ ] ;
190
+ cols : string [ ] ;
191
+ }
192
+
186
193
interface Relation {
187
- // TODO should this be something other than a tagging interface?
194
+ name : string ;
195
+ ownerModelClass : Model ;
196
+ relatedModelClass : Model ;
197
+ ownerProp : RelationProperty ;
198
+ relatedProp : RelationProperty ;
199
+ joinModelClass : Function ;
200
+ joinTable : string ;
201
+ joinTableOwnerProp : RelationProperty ;
202
+ joinTableRelatedProp : RelationProperty ;
188
203
}
189
204
190
205
export interface RelationJoin {
@@ -462,6 +477,8 @@ declare namespace Objection {
462
477
static WhereInEagerAlgorithm : EagerAlgorithm ;
463
478
static NaiveEagerAlgorithm : EagerAlgorithm ;
464
479
480
+ static getRelations ( ) : { [ key : string ] : Relation }
481
+
465
482
static query < QM extends Model > (
466
483
this : Constructor < QM > ,
467
484
trxOrKnex ?: Transaction | knex
You can’t perform that action at this time.
0 commit comments