OData / OData/ModelBuilder

Support IsDelta for Edm function configuration

Open
#45 0 comments 0 reactions 1 assignee View on GitHub

@xuzhg is already working on this.

Since Nov 19, 2024.

Dominant language
C#
Stars
22
Forks
24
PR merge metrics
No merged PRs in 30d

Description

Short summary (3-5 sentences) describing the issue.

Assemblies affected
  • OData recently added a feature to OASIS and AGS in order to flag a function as returning a delta payload. So, for example, a function could return the changes (delta) between 2 states.

Annotation Core.IsDelta
An action or function that returns a single entity or a collection of entities MAY return results as a delta payload. This is indicated by annotating the return type with the term Core.IsDelta.

This is the annotation added in the ODL:

https://github.com/OData/odata.net/blob/main/src/Microsoft.OData.Edm/Vocabularies/CoreVocabularies.xml#L530-L537

<Term Name="IsDelta" Type="Core.Tag" Nullable="false" DefaultValue="true" AppliesTo="ReturnType Parameter">
		<Annotation Term="Core.Description" String="The annotated Action or Function Parameter or Return Type is represented as a Delta payload" />
		<Annotation Term="Core.LongDescription">
			<String>
				The parameter or result is represented as a delta payload, which may include deleted entries as well as changes to related
				entities and relationships, according to the format-specific delta representation.
			</String>
		</Annotation>
	</Term>

Delta payloads represent changes between two versions of data and, in addition to current values, MAY include deleted entities as well as changes to related entities and relationships, according to the format-specific delta representation.
In the model builder, we'd support this annotation when building the Edm function.

Reproduce steps

The simplest set of steps to reproduce the issue. If possible, reference a commit that demonstrates the issue.

Expected result

What would happen if there wasn't a bug.

Actual result

What is actually happening.

Additional detail

Optional, details of the root cause if known. Delete this section if you have no additional details to add.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.