@dbsp/nql 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -418,10 +418,22 @@ interface ColumnValidatorSchema {
418
418
  readonly childRole: string;
419
419
  }[];
420
420
  } | undefined;
421
- getRelationsFrom(sourceTable: string): readonly {
422
- readonly name: string;
423
- readonly target: string;
424
- }[];
421
+ getRelationsFrom(sourceTable: string): readonly ColumnValidatorRelation[];
422
+ getRelation?(qualifiedName: string): ColumnValidatorRelation | undefined;
423
+ }
424
+ interface ColumnValidatorRelation {
425
+ readonly name: string;
426
+ readonly source?: string;
427
+ readonly target: string;
428
+ readonly type?: 'hasOne' | 'hasMany' | 'belongsTo' | 'belongsToMany';
429
+ readonly foreignKey?: string | readonly string[] | undefined;
430
+ readonly through?: string | undefined;
431
+ readonly otherKey?: string | undefined;
432
+ readonly throughSourceKey?: string | undefined;
433
+ readonly throughTargetKey?: string | undefined;
434
+ readonly recursive?: unknown;
435
+ readonly sourceKey?: string | readonly string[] | undefined;
436
+ readonly targetKey?: string | readonly string[] | undefined;
425
437
  }
426
438
  /**
427
439
  * Options for the NQL compiler.