getTableRelationshipReference method

TableRelationshipReference? getTableRelationshipReference({
  1. String? sourceTable,
  2. String? sourceField,
  3. String? targetTable,
})

Returns the TableRelationshipReference with the targetTable.

Implementation

TableRelationshipReference? getTableRelationshipReference(
    {String? sourceTable, String? sourceField, String? targetTable}) {
  var key = _TableRelationshipKey(sourceTable, sourceField, targetTable);
  if (!key.isValid) {
    throw ArgumentError(
        "Parameter `sourceTable` or `targetTable` should be provided.");
  }

  return _tableRelationshipReferenceResolved.putIfAbsent(
      key,
      () => _getTableRelationshipReferenceImpl(
          sourceTable, sourceField, targetTable));
}