-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow multiple relationships in ConnectorType #2747
base: main
Are you sure you want to change the base?
Conversation
Fix CompileTimeTypeWrapperRecordValue.TryGetField
✅ No public API change. |
src/libraries/Microsoft.PowerFx.Connectors/Tabular/Capabilities/ComplexColumnCapabilities.cs
Show resolved
Hide resolved
src/libraries/Microsoft.PowerFx.Core/Public/Values/CompileTimeTypeWrapperRecordValue.cs
Show resolved
Hide resolved
src/libraries/Microsoft.PowerFx.Connectors/OpenApiExtensions.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.PowerFx.Connectors/Public/ConnectorType.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.PowerFx.Connectors/Public/ConnectorType.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.PowerFx.Connectors/Tabular/Capabilities/ColumnCapabilitiesDefinition.cs
Show resolved
Hide resolved
Public API changes: |
@@ -17,6 +17,8 @@ | |||
using Microsoft.PowerFx.Core.Utils; | |||
using Microsoft.PowerFx.Types; | |||
using static Microsoft.PowerFx.Connectors.Constants; | |||
|
|||
#pragma warning disable SA1000 // The keyword 'new' should be followeed by a space |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we just want to remove this at the editorconfig level?
|
||
namespace Microsoft.PowerFx.Connectors | ||
{ | ||
public class ConnectorRelationship |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for now, yes
as discussed this is a temporary thing
I'll add [Obsolete] to it
this.DisplayName == other.DisplayName && | ||
this.Description == other.Description && | ||
this.IsRequired == other.IsRequired && | ||
Enumerable.SequenceEqual((IList<ConnectorType>)this.Fields ?? Array.Empty<ConnectorType>(), (IList<ConnectorType>)other.Fields ?? Array.Empty<ConnectorType>()) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using Microsoft.PowerFx.Types; | ||
|
||
namespace Microsoft.PowerFx.Connectors | ||
{ | ||
public static class CdpExtensions | ||
{ | ||
public static bool TryGetFieldExternalTableName(this RecordType recordType, string fieldName, out string tableName, out string foreignKey) | ||
public static bool TryGetFieldRelationships(this RecordType recordType, string fieldName, out IEnumerable<ConnectorRelationship> relationships) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -72,5 +73,32 @@ public static ColumnCapabilities ParseColumnCapabilities(IDictionary<string, IOp | |||
IsChoice = isChoice | |||
}); | |||
} | |||
|
|||
public bool Equals(ColumnCapabilities other) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow multiple relationships in ConnectorType
Fix CompileTimeTypeWrapperRecordValue.TryGetField
Add Equals to ConnectorType
This update doesn't update CdpRecordType yet
DV and NL repos are not impacted by these changes