-
Notifications
You must be signed in to change notification settings - Fork 11
Added ability to create relationships either in initial table definition or as a separate operation #12
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
base: main
Are you sure you want to change the base?
Conversation
…ion or as a separate operation
|
Generally, I think helper functions like this Dataverse message operations are defined as names, and there is no This specific named action isn't present in OData, but it could be. Instead, we implemented POST to I think we ought to do the work to add the underlying Metadata Entity Types so that Jeff (or anyone) could use them to compose these types of operations on top of a message named |
Implements architectural pattern suggested in PR #12 review feedback: - Core SDK provides low-level operations that mirror .NET SDK (CreateOneToManyRequest) - Operations are named after Dataverse messages, not high-level helper functions - Extension helpers provide convenience wrappers for common scenarios - Uses proper Metadata Entity Types exposed via models Changes: - Add models/metadata.py with Metadata Entity Type classes - LookupAttributeMetadata, OneToManyRelationshipMetadata, ManyToManyRelationshipMetadata - Label, LocalizedLabel, CascadeConfiguration, AssociatedMenuConfiguration - Add relationship operations to data/_odata.py - _create_one_to_many_relationship (POST /RelationshipDefinitions) - _create_many_to_many_relationship - _delete_relationship, _get_relationship - Expose public API in client.py - create_one_to_many_relationship, create_many_to_many_relationship - delete_relationship, get_relationship - Add extensions/relationships.py with helper functions - create_lookup_field (convenience wrapper) - Add examples/advanced/relationships.py demonstrating both approaches This approach aligns with Dataverse's actual API structure and allows users to compose operations using the underlying metadata types, while still providing convenience helpers as opt-in extensions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements architectural pattern suggested in PR #12 review feedback: - Core SDK provides low-level operations that mirror .NET SDK (CreateOneToManyRequest) - Operations are named after Dataverse messages, not high-level helper functions - Extension helpers provide convenience wrappers for common scenarios - Uses proper Metadata Entity Types exposed via models Changes: - Add models/metadata.py with Metadata Entity Type classes - LookupAttributeMetadata, OneToManyRelationshipMetadata, ManyToManyRelationshipMetadata - Label, LocalizedLabel, CascadeConfiguration, AssociatedMenuConfiguration - Add relationship operations to data/_odata.py - _create_one_to_many_relationship (POST /RelationshipDefinitions) - _create_many_to_many_relationship - _delete_relationship, _get_relationship - Expose public API in client.py - create_one_to_many_relationship, create_many_to_many_relationship - delete_relationship, get_relationship - Add extensions/relationships.py with helper functions - create_lookup_field (convenience wrapper) - Add examples/advanced/relationships.py demonstrating both approaches This approach aligns with Dataverse's actual API structure and allows users to compose operations using the underlying metadata types, while still providing convenience helpers as opt-in extensions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements architectural pattern suggested in PR #12 review feedback: - Core SDK provides low-level operations that mirror .NET SDK (CreateOneToManyRequest) - Operations are named after Dataverse messages, not high-level helper functions - Extension helpers provide convenience wrappers for common scenarios - Uses proper Metadata Entity Types exposed via models Changes: - Add models/metadata.py with Metadata Entity Type classes - LookupAttributeMetadata, OneToManyRelationshipMetadata, ManyToManyRelationshipMetadata - Label, LocalizedLabel, CascadeConfiguration, AssociatedMenuConfiguration - Add relationship operations to data/_odata.py - _create_one_to_many_relationship (POST /RelationshipDefinitions) - _create_many_to_many_relationship - _delete_relationship, _get_relationship - Expose public API in client.py - create_one_to_many_relationship, create_many_to_many_relationship - delete_relationship, get_relationship - Add extensions/relationships.py with helper functions - create_lookup_field (convenience wrapper) - Add examples/advanced/relationships.py demonstrating both approaches This approach aligns with Dataverse's actual API structure and allows users to compose operations using the underlying metadata types, while still providing convenience helpers as opt-in extensions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements architectural pattern suggested in PR #12 review feedback: - Core SDK provides low-level operations that mirror .NET SDK (CreateOneToManyRequest) - Operations are named after Dataverse messages, not high-level helper functions - Extension helpers provide convenience wrappers for common scenarios - Uses proper Metadata Entity Types exposed via models Changes: - Add models/metadata.py with Metadata Entity Type classes - LookupAttributeMetadata, OneToManyRelationshipMetadata, ManyToManyRelationshipMetadata - Label, LocalizedLabel, CascadeConfiguration, AssociatedMenuConfiguration - Add relationship operations to data/_odata.py - _create_one_to_many_relationship (POST /RelationshipDefinitions) - _create_many_to_many_relationship - _delete_relationship, _get_relationship - Expose public API in client.py - create_one_to_many_relationship, create_many_to_many_relationship - delete_relationship, get_relationship - Add extensions/relationships.py with helper functions - create_lookup_field (convenience wrapper) - Add examples/advanced/relationships.py demonstrating both approaches This approach aligns with Dataverse's actual API structure and allows users to compose operations using the underlying metadata types, while still providing convenience helpers as opt-in extensions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements architectural pattern suggested in PR #12 review feedback: - Core SDK provides low-level operations that mirror .NET SDK (CreateOneToManyRequest) - Operations are named after Dataverse messages, not high-level helper functions - Extension helpers provide convenience wrappers for common scenarios - Uses proper Metadata Entity Types exposed via models Changes: - Add models/metadata.py with Metadata Entity Type classes - LookupAttributeMetadata, OneToManyRelationshipMetadata, ManyToManyRelationshipMetadata - Label, LocalizedLabel, CascadeConfiguration, AssociatedMenuConfiguration - Add relationship operations to data/_odata.py - _create_one_to_many_relationship (POST /RelationshipDefinitions) - _create_many_to_many_relationship - _delete_relationship, _get_relationship - Expose public API in client.py - create_one_to_many_relationship, create_many_to_many_relationship - delete_relationship, get_relationship - Add extensions/relationships.py with helper functions - create_lookup_field (convenience wrapper) - Add examples/advanced/relationships.py demonstrating both approaches This approach aligns with Dataverse's actual API structure and allows users to compose operations using the underlying metadata types, while still providing convenience helpers as opt-in extensions.
This expands the schema available on create table, as well as adds a separate discrete method for adding relationships.
Also removes previous incorrect escaping of schemanames, since schema names cannot contain quote marks.