Skip to content
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

Bound actions and function overloads via container and structured type #233

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9c937e0
Bound actions and function overloads via container
HeikoTheissen Jan 11, 2024
8ab36ad
@ralfhandl's suggestions
HeikoTheissen Jan 11, 2024
1680d8e
Actions/Functions bound to a property via structured type
HeikoTheissen Jan 13, 2024
edaf880
Rephrased
HeikoTheissen Jan 15, 2024
c858774
style
HeikoTheissen Jan 15, 2024
cbd551c
@ralfhandl's suggestions
HeikoTheissen Jan 15, 2024
419986c
Action/Function via complex or entity type
HeikoTheissen Jan 15, 2024
584f5fd
Rephrased
HeikoTheissen Jan 15, 2024
8ab0389
Rephrased again
HeikoTheissen Jan 15, 2024
728c907
Fine-tuning
HeikoTheissen Jan 15, 2024
ffb1079
Parameters and return types
HeikoTheissen Jan 15, 2024
48dc875
Merge branch 'main' into ODATA-1626
HeikoTheissen Jan 18, 2024
d522e99
Explain "addressed via resource path"
HeikoTheissen Jan 18, 2024
2c63eb7
Rephrased
HeikoTheissen Jan 18, 2024
99fa5de
Fine-tuning
HeikoTheissen Jan 18, 2024
36ce19c
Redefine the "Property via structured type" case
HeikoTheissen Jan 19, 2024
3a76fca
Merge branch 'main' into ODATA-1626
ralfhandl Jan 26, 2024
fcfd147
Merge branch 'main' into ODATA-1626
ralfhandl Feb 1, 2024
dda4091
Merge branch 'main' into ODATA-1626
ralfhandl Feb 5, 2024
ca3bdea
Merge branch 'main' into ODATA-1626
ralfhandl Feb 15, 2024
528b59e
Merge branch 'main' into ODATA-1626
ralfhandl Feb 22, 2024
21159e2
Merge branch 'main' into ODATA-1626
ralfhandl Feb 29, 2024
6061f24
Merge remote-tracking branch 'origin/main' into ODATA-1626
HeikoTheissen Jul 11, 2024
e405cda
Merge branch 'ODATA-1626' of [email protected]:oasis-tcs/odata-specs.git
HeikoTheissen Jul 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 57 additions & 2 deletions docs/odata-csdl-json/odata-csdl-json.html
Original file line number Diff line number Diff line change
Expand Up @@ -2261,7 +2261,7 @@ <h3 id="1422-target"><a name="Target" href="#Target">14.2.2 Target</a></h3>
<tr class="header">
<th>Model element</th>
<th>Can be targeted with path expression (see also <a href="#PathSyntax">section 14.4.1.1</a>)</th>
<th><div class="example"><p>Example 42: Target expressions</p></div></th>
<th><div class="example"><p style="margin-top:0">Example 42: Target expressions</p></div></th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -2353,7 +2353,7 @@ <h3 id="1422-target"><a name="Target" href="#Target">14.2.2 Target</a></h3>
<tr class="even">
<td><a href="#StructuralProperty">Property</a> via container</td>
<td>qualified name of entity container followed by a segment containing a singleton or entity set name and zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast</td>
<td><pre><code>MySchema.MyEntityContainer/MyEntitySet</code> <br><code> /MyProperty</code> <br><code>MySchema.MyEntityContainer/MyEntitySet</code> <br><code> /MySchema.MyEntityType/MyProperty</code> <br><code>MySchema.MyEntityContainer/MyEntitySet</code> <br><code> /MyComplexProperty/MyProperty</code></pre></td>
<td><pre><code>MySchema.MyEntityContainer/MyEntitySet</code> <br><code> /MyProperty</code> <br><code>MySchema.MyEntityContainer/MyEntitySet</code> <br><code> /MySchema.MyEntityType/MyProperty</code> <br><code>MySchema.MyEntityContainer/MyEntitySet</code> <br><code> /MyComplexProperty/MyProperty</code></pre></td>
</tr>
<tr class="odd">
<td><a href="#StructuralProperty">Property</a> via structured type</td>
Expand Down Expand Up @@ -2389,6 +2389,61 @@ <h3 id="1422-target"><a name="Target" href="#Target">14.2.2 Target</a></h3>
</table>
<p>All <a href="#QualifiedName">qualified names</a> used in a target path MUST be in scope.</p>
<p>External targeting is possible for properties and navigation properties of singletons or entities in a particular entity set. These annotations override annotations on the properties or navigation properties targeted via the declaring structured type.</p>
<p>External targeting is also possible for action and function overloads whose binding parameter is addressed via a certain path or has a certain type. The target path then consists of two path expressions from the table above separated by a forward slash. The first path expression references one of the following model elements:</p>
<table>
<thead>
<tr class="header">
<th>Model element</th>
<th>means the binding parameter must</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Entity Set</td>
<td>lie in the entity set</td>
</tr>
<tr class="even">
<td>Singleton</td>
<td>be the singleton</td>
</tr>
<tr class="odd">
<td>Navigation Property via container</td>
<td>be addressed via the path</td>
</tr>
<tr class="even">
<td>Property via container</td>
<td>be addressed via the path</td>
</tr>
<tr class="odd">
<td>Navigation Property via structured type</td>
<td>be addressed via this structured type</td>
</tr>
<tr class="even">
<td>Property via structured type</td>
<td>be addressed via this structured type</td>
</tr>
<tr class="odd">
<td>Complex Type</td>
<td>have the type or a subtype thereof</td>
</tr>
<tr class="even">
<td>Entity Type</td>
<td>have the type or a subtype thereof</td>
</tr>
</tbody>
</table>
<p>and the second path expression references one of the following model elements:</p>
<ul>
<li>Action overload</li>
<li>Function overload</li>
</ul>
<p>where the Action or Function overload is bound with binding parameter type equal to or derived from the type of the first path expression, or the second path expression references</p>
<ul>
<li>all overloads of an Action or</li>
<li>all overloads of a Function</li>
</ul>
<p>where the binding parameter is an instance or a collection of the type of the first path expression or of a type derived from that.</p>
<p>These annotations override annotations targeting the action or function overloads directly.</p>
<h2 id="143-constant-expression"><a name="ConstantExpression" href="#ConstantExpression">14.3 Constant Expression</a></h2>
<p>Constant expressions allow assigning a constant value to an applied term.</p>
<h3 id="1431-binary"><a name="Binary" href="#Binary">14.3.1 Binary</a></h3>
Expand Down
37 changes: 35 additions & 2 deletions docs/odata-csdl-json/odata-csdl-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -3837,7 +3837,7 @@ These are the direct children of a schema with a unique name (i.e.
except actions and functions whose overloads to not possess a natural
identifier), and all direct children of an entity container.

Model element| Can be targeted with path expression (see also [section 14.4.1.1](#PathSyntax))| <div class="example"><p>Example 42: Target expressions</p></div>
Model element| Can be targeted with path expression (see also [section 14.4.1.1](#PathSyntax))| <div class="example"><p style="margin-top:0">Example 42: Target expressions</p></div>
-----|-----|-----
[Action](#Action) overload| qualified name of action followed by parentheses containing the binding parameter type of a bound action overload to identify that bound overload, or by empty parentheses to identify the unbound overload| <pre>`MySchema.MyAction(MySchema.MyBindingType)` <br>`MySchema.MyAction(Collection(MySchema.BindingType))` <br>`MySchema.MyAction()`</pre>
all overloads of an [Action](#Action)| qualified name of action| <pre>`MySchema.MyAction`</pre>
Expand All @@ -3856,7 +3856,7 @@ all overloads of a [Function](#Function)| qualified name of function| <pre>`MySc
[Navigation Property](#NavigationProperty) via structured type| qualified name of structured type followed by zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast| <pre>`MySchema.MyEntityType/MyNavigationProperty` <br>`MySchema.MyComplexType/MyNavigationProperty`</pre>
[Parameter](#Parameter)| qualified name of entity container followed by a segment containing an action or function import name followed by a segment containing a parameter name| <pre>`MySchema.MyEntityContainer/MyFunctionImport/MyParameter`</pre>
[Parameter](#Parameter)| qualified name of action or function optionally followed by a parenthesized expression as in the first row followed by a segment containing the name of a child element| <pre>`MySchema.MyFunction/MyParameter`</pre>
[Property](#StructuralProperty) via container| qualified name of entity container followed by a segment containing a singleton or entity set name and zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast| <pre>`MySchema.MyEntityContainer/MyEntitySet` <br>` /MyProperty` <br>`MySchema.MyEntityContainer/MyEntitySet` <br>` /MySchema.MyEntityType/MyProperty` <br>`MySchema.MyEntityContainer/MyEntitySet` <br>` /MyComplexProperty/MyProperty`</pre>
[Property](#StructuralProperty) via container| qualified name of entity container followed by a segment containing a singleton or entity set name and zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast| <pre>`MySchema.MyEntityContainer/MyEntitySet` <br>` /MyProperty` <br>`MySchema.MyEntityContainer/MyEntitySet` <br>` /MySchema.MyEntityType/MyProperty` <br>`MySchema.MyEntityContainer/MyEntitySet` <br>` /MyComplexProperty/MyProperty`</pre>
[Property](#StructuralProperty) via structured type| qualified name of structured type followed by zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast| <pre>`MySchema.MyEntityType/MyProperty` <br>`MySchema.MyComplexType/MyProperty`</pre>
[Return Type](#ReturnType)| qualified name of entity container followed by a segment containing an action or function import name followed by a segment containing `$ReturnType`| <pre>`MySchema.MyEntityContainer/MyFunctionImport/$ReturnType`</pre>
[Return Type](#ReturnType)| qualified name of action or function optionally followed by a parenthesized expression as in the first row followed by a segment containing `$ReturnType`| <pre>`MySchema.MyFunction/$ReturnType` <br>`MySchema.MyFunction(MySchema.MyBindingParamType,` <br>` First.NonBinding.ParamType)/$ReturnType`</pre>
Expand All @@ -3871,6 +3871,39 @@ properties of singletons or entities in a particular entity set. These
annotations override annotations on the properties or navigation
properties targeted via the declaring structured type.

External targeting is also possible for action and function overloads whose
binding parameter is addressed via a certain path or has a certain type. The
target path then consists of two path expressions from the table above
separated by a forward slash. The first path expression references one of the
following model elements:

Model element|means the binding parameter must
-------------|--------------------------------
Entity Set|lie in the entity set
Singleton|be the singleton
Navigation Property via container|be addressed via the path
Property via container|be addressed via the path
Navigation Property via structured type|be addressed via this structured type
Property via structured type|be addressed via this structured type
Complex Type|have the type or a subtype thereof
Entity Type|have the type or a subtype thereof

and the second path expression references one of the following model elements:
- Action overload
- Function overload

where the Action or Function overload is bound with binding parameter type
equal to or derived from the type of the first path expression, or the second
path expression references
- all overloads of an Action or
- all overloads of a Function

where the binding parameter is an instance or a collection of the type of the
first path expression or of a type derived from that.

These annotations override annotations targeting the action or function
overloads directly.

## <a name="ConstantExpression" href="#ConstantExpression">14.3 Constant Expression</a>

Constant expressions allow assigning a constant value to an applied
Expand Down
59 changes: 57 additions & 2 deletions docs/odata-csdl-xml/odata-csdl-xml.html
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,7 @@ <h3 id="1422-target"><a name="Target" href="#Target">14.2.2 Target</a></h3>
<tr class="header">
<th>Model element</th>
<th>Can be targeted with path expression (see also <a href="#PathSyntax">section 14.4.1.1</a>)</th>
<th><div class="example"><p>Example 42: Target expressions</p></div></th>
<th><div class="example"><p style="margin-top:0">Example 42: Target expressions</p></div></th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -2169,7 +2169,7 @@ <h3 id="1422-target"><a name="Target" href="#Target">14.2.2 Target</a></h3>
<tr class="even">
<td><a href="#StructuralProperty">Property</a> via container</td>
<td>qualified name of entity container followed by a segment containing a singleton or entity set name and zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast</td>
<td><pre><code>MySchema.MyEntityContainer/MyEntitySet</code> <br><code> /MyProperty</code> <br><code>MySchema.MyEntityContainer/MyEntitySet</code> <br><code> /MySchema.MyEntityType/MyProperty</code> <br><code>MySchema.MyEntityContainer/MyEntitySet</code> <br><code> /MyComplexProperty/MyProperty</code></pre></td>
<td><pre><code>MySchema.MyEntityContainer/MyEntitySet</code> <br><code> /MyProperty</code> <br><code>MySchema.MyEntityContainer/MyEntitySet</code> <br><code> /MySchema.MyEntityType/MyProperty</code> <br><code>MySchema.MyEntityContainer/MyEntitySet</code> <br><code> /MyComplexProperty/MyProperty</code></pre></td>
</tr>
<tr class="odd">
<td><a href="#StructuralProperty">Property</a> via structured type</td>
Expand Down Expand Up @@ -2205,6 +2205,61 @@ <h3 id="1422-target"><a name="Target" href="#Target">14.2.2 Target</a></h3>
</table>
<p>All <a href="#QualifiedName">qualified names</a> used in a target path MUST be in scope.</p>
<p>External targeting is possible for properties and navigation properties of singletons or entities in a particular entity set. These annotations override annotations on the properties or navigation properties targeted via the declaring structured type.</p>
<p>External targeting is also possible for action and function overloads whose binding parameter is addressed via a certain path or has a certain type. The target path then consists of two path expressions from the table above separated by a forward slash. The first path expression references one of the following model elements:</p>
<table>
<thead>
<tr class="header">
<th>Model element</th>
<th>means the binding parameter must</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Entity Set</td>
<td>lie in the entity set</td>
</tr>
<tr class="even">
<td>Singleton</td>
<td>be the singleton</td>
</tr>
<tr class="odd">
<td>Navigation Property via container</td>
<td>be addressed via the path</td>
</tr>
<tr class="even">
<td>Property via container</td>
<td>be addressed via the path</td>
</tr>
<tr class="odd">
<td>Navigation Property via structured type</td>
<td>be addressed via this structured type</td>
</tr>
<tr class="even">
<td>Property via structured type</td>
<td>be addressed via this structured type</td>
</tr>
<tr class="odd">
<td>Complex Type</td>
<td>have the type or a subtype thereof</td>
</tr>
<tr class="even">
<td>Entity Type</td>
<td>have the type or a subtype thereof</td>
</tr>
</tbody>
</table>
<p>and the second path expression references one of the following model elements:</p>
<ul>
<li>Action overload</li>
<li>Function overload</li>
</ul>
<p>where the Action or Function overload is bound with binding parameter type equal to or derived from the type of the first path expression, or the second path expression references</p>
<ul>
<li>all overloads of an Action or</li>
<li>all overloads of a Function</li>
</ul>
<p>where the binding parameter is an instance or a collection of the type of the first path expression or of a type derived from that.</p>
<p>These annotations override annotations targeting the action or function overloads directly.</p>
<h2 id="143-constant-expression"><a name="ConstantExpression" href="#ConstantExpression">14.3 Constant Expression</a></h2>
<p>Constant expressions allow assigning a constant value to an applied term.</p>
<h3 id="1431-binary"><a name="Binary" href="#Binary">14.3.1 Binary</a></h3>
Expand Down
37 changes: 35 additions & 2 deletions docs/odata-csdl-xml/odata-csdl-xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -3650,7 +3650,7 @@ These are the direct children of a schema with a unique name (i.e.
except actions and functions whose overloads to not possess a natural
identifier), and all direct children of an entity container.

Model element| Can be targeted with path expression (see also [section 14.4.1.1](#PathSyntax))| <div class="example"><p>Example 42: Target expressions</p></div>
Model element| Can be targeted with path expression (see also [section 14.4.1.1](#PathSyntax))| <div class="example"><p style="margin-top:0">Example 42: Target expressions</p></div>
-----|-----|-----
[Action](#Action) overload| qualified name of action followed by parentheses containing the binding parameter type of a bound action overload to identify that bound overload, or by empty parentheses to identify the unbound overload| <pre>`MySchema.MyAction(MySchema.MyBindingType)` <br>`MySchema.MyAction(Collection(MySchema.BindingType))` <br>`MySchema.MyAction()`</pre>
all overloads of an [Action](#Action)| qualified name of action| <pre>`MySchema.MyAction`</pre>
Expand All @@ -3669,7 +3669,7 @@ all overloads of a [Function](#Function)| qualified name of function| <pre>`MySc
[Navigation Property](#NavigationProperty) via structured type| qualified name of structured type followed by zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast| <pre>`MySchema.MyEntityType/MyNavigationProperty` <br>`MySchema.MyComplexType/MyNavigationProperty`</pre>
[Parameter](#Parameter)| qualified name of entity container followed by a segment containing an action or function import name followed by a segment containing a parameter name| <pre>`MySchema.MyEntityContainer/MyFunctionImport/MyParameter`</pre>
[Parameter](#Parameter)| qualified name of action or function optionally followed by a parenthesized expression as in the first row followed by a segment containing the name of a child element| <pre>`MySchema.MyFunction/MyParameter`</pre>
[Property](#StructuralProperty) via container| qualified name of entity container followed by a segment containing a singleton or entity set name and zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast| <pre>`MySchema.MyEntityContainer/MyEntitySet` <br>` /MyProperty` <br>`MySchema.MyEntityContainer/MyEntitySet` <br>` /MySchema.MyEntityType/MyProperty` <br>`MySchema.MyEntityContainer/MyEntitySet` <br>` /MyComplexProperty/MyProperty`</pre>
[Property](#StructuralProperty) via container| qualified name of entity container followed by a segment containing a singleton or entity set name and zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast| <pre>`MySchema.MyEntityContainer/MyEntitySet` <br>` /MyProperty` <br>`MySchema.MyEntityContainer/MyEntitySet` <br>` /MySchema.MyEntityType/MyProperty` <br>`MySchema.MyEntityContainer/MyEntitySet` <br>` /MyComplexProperty/MyProperty`</pre>
[Property](#StructuralProperty) via structured type| qualified name of structured type followed by zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast| <pre>`MySchema.MyEntityType/MyProperty` <br>`MySchema.MyComplexType/MyProperty`</pre>
[Return Type](#ReturnType)| qualified name of entity container followed by a segment containing an action or function import name followed by a segment containing `$ReturnType`| <pre>`MySchema.MyEntityContainer/MyFunctionImport/$ReturnType`</pre>
[Return Type](#ReturnType)| qualified name of action or function optionally followed by a parenthesized expression as in the first row followed by a segment containing `$ReturnType`| <pre>`MySchema.MyFunction/$ReturnType` <br>`MySchema.MyFunction(MySchema.MyBindingParamType,` <br>` First.NonBinding.ParamType)/$ReturnType`</pre>
Expand All @@ -3684,6 +3684,39 @@ properties of singletons or entities in a particular entity set. These
annotations override annotations on the properties or navigation
properties targeted via the declaring structured type.

External targeting is also possible for action and function overloads whose
binding parameter is addressed via a certain path or has a certain type. The
target path then consists of two path expressions from the table above
separated by a forward slash. The first path expression references one of the
following model elements:

Model element|means the binding parameter must
-------------|--------------------------------
Entity Set|lie in the entity set
Singleton|be the singleton
Navigation Property via container|be addressed via the path
Property via container|be addressed via the path
Navigation Property via structured type|be addressed via this structured type
Property via structured type|be addressed via this structured type
Complex Type|have the type or a subtype thereof
Entity Type|have the type or a subtype thereof

and the second path expression references one of the following model elements:
- Action overload
- Function overload

where the Action or Function overload is bound with binding parameter type
equal to or derived from the type of the first path expression, or the second
path expression references
- all overloads of an Action or
- all overloads of a Function

where the binding parameter is an instance or a collection of the type of the
first path expression or of a type derived from that.

These annotations override annotations targeting the action or function
overloads directly.

## <a name="ConstantExpression" href="#ConstantExpression">14.3 Constant Expression</a>

Constant expressions allow assigning a constant value to an applied
Expand Down
Loading