Skip to content

Commit

Permalink
ODATA-1500 (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfhandl authored Nov 8, 2023
1 parent a9998a0 commit f8cbdd4
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 20 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"asec",
"CSDL",
"ETag",
"matchespattern",
"odata",
"pandoc",
"subasec",
Expand Down
2 changes: 1 addition & 1 deletion docs/odata-protocol/odata-protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ <h5 id="112612-built-in-query-functions"><a name="BuiltinQueryFunctions" href="#
<tr><td><code>hassubset</code></td><td><pre><code>hassubset([4,1,3],[3,1])</code></pre></td></tr>
<tr><td><code>hassubsequence</code></td><td><pre><code>hassubsequence([4,1,3,1],[1,1])</code></pre></td></tr>
<tr><td colspan="2"><strong>String Functions</strong></td></tr>
<tr><td><code>matchesPattern</code></td><td><pre><code>matchesPattern(CompanyName,'%5EA.*e$')</code></pre></td></tr>
<tr><td><code>matchespattern</code></td><td><pre><code>matchespattern(CompanyName,'%5EA.*e$')</code></pre></td></tr>
<tr><td><code>tolower</code></td><td><pre><code>tolower(CompanyName) eq 'alfreds futterkiste'</code></pre></td></tr>
<tr><td><code>toupper</code></td><td><pre><code>toupper(CompanyName) eq 'ALFREDS FUTTERKISTE'</code></pre></td></tr>
<tr><td><code>trim </code></td><td><pre><code>trim(CompanyName) eq 'Alfreds Futterkiste'</code></pre></td></tr>
Expand Down
2 changes: 1 addition & 1 deletion docs/odata-protocol/odata-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -3175,7 +3175,7 @@ a `null` literal that can be used in comparisons.
<tr><td><code>hassubset</code></td><td><pre><code>hassubset([4,1,3],[3,1])</code></pre></td></tr>
<tr><td><code>hassubsequence</code></td><td><pre><code>hassubsequence([4,1,3,1],[1,1])</code></pre></td></tr>
<tr><td colspan="2"><strong>String Functions</strong></td></tr>
<tr><td><code>matchesPattern</code></td><td><pre><code>matchesPattern(CompanyName,'%5EA.*e$')</code></pre></td></tr>
<tr><td><code>matchespattern</code></td><td><pre><code>matchespattern(CompanyName,'%5EA.*e$')</code></pre></td></tr>
<tr><td><code>tolower</code></td><td><pre><code>tolower(CompanyName) eq 'alfreds futterkiste'</code></pre></td></tr>
<tr><td><code>toupper</code></td><td><pre><code>toupper(CompanyName) eq 'ALFREDS FUTTERKISTE'</code></pre></td></tr>
<tr><td><code>trim </code></td><td><pre><code>trim(CompanyName) eq 'Alfreds Futterkiste'</code></pre></td></tr>
Expand Down
12 changes: 6 additions & 6 deletions docs/odata-url-conventions/odata-url-conventions.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ <h1 id="table-of-contents">Table of Contents</h1>
</ul></li>
<li><a href="#StringFunctions">5.1.1.7 String Functions</a>
<ul>
<li><a href="#matchesPattern">5.1.1.7.1 <code>matchesPattern</code></a></li>
<li><a href="#matchespattern">5.1.1.7.1 <code>matchespattern</code></a></li>
<li><a href="#tolower">5.1.1.7.2 <code>tolower</code></a></li>
<li><a href="#toupper">5.1.1.7.3 <code>toupper</code></a></li>
<li><a href="#trim">5.1.1.7.4 <code>trim</code></a></li>
Expand Down Expand Up @@ -1192,13 +1192,13 @@ <h5 id="51162-hassubsequence"><a name="hassubsequence" href="#hassubsequence">5.
hassubsequence([1,2],[1,1,2])</code></pre>
</div>
<h4 id="5117-string-functions"><a name="StringFunctions" href="#StringFunctions">5.1.1.7 String Functions</a></h4>
<h5 id="51171-matchespattern"><a name="matchesPattern" href="#matchesPattern">5.1.1.7.1 <code>matchesPattern</code></a></h5>
<p>The <code>matchesPattern</code> function has the following signature:</p>
<pre><code>Edm.Boolean matchesPattern(Edm.String,Edm.String)</code></pre>
<p>The second parameter MUST evaluate to a string containing an <a href="#ECMAScript"><strong>[ECMAScript]</strong></a> (JavaScript) regular expression. The <code>matchesPattern</code> function returns true if the first parameter evaluates to a string matching that regular expression, using syntax and semantics of <a href="#ECMAScript"><strong>[ECMAScript]</strong></a> regular expressions, otherwise it returns false.</p>
<h5 id="51171-matchespattern"><a name="matchespattern" href="#matchespattern">5.1.1.7.1 <code>matchespattern</code></a></h5>
<p>The <code>matchespattern</code> function has the following signature:</p>
<pre><code>Edm.Boolean matchespattern(Edm.String,Edm.String)</code></pre>
<p>The second parameter MUST evaluate to a string containing an <a href="#ECMAScript"><strong>[ECMAScript]</strong></a> (JavaScript) regular expression. The <code>matchespattern</code> function returns true if the first parameter evaluates to a string matching that regular expression, using syntax and semantics of <a href="#ECMAScript"><strong>[ECMAScript]</strong></a> regular expressions, otherwise it returns false.</p>
<div class="example">
<p>Example 81: all customers with a <code>CompanyName</code> that match the (percent-encoded) regular expression <code>^A.*e$</code></p>
<pre><code>http://host/service/Customers?$filter=matchesPattern(CompanyName,&#39;%5EA.*e$&#39;)</code></pre>
<pre><code>http://host/service/Customers?$filter=matchespattern(CompanyName,&#39;%5EA.*e$&#39;)</code></pre>
</div>
<h5 id="51172-tolower"><a name="tolower" href="#tolower">5.1.1.7.2 <code>tolower</code></a></h5>
<p>The <code>tolower</code> function has the following signature:</p>
Expand Down
12 changes: 6 additions & 6 deletions docs/odata-url-conventions/odata-url-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ For complete copyright information please see the full Notices section in an App
- [5.1.1.6.1 `hassubset`](#hassubset)
- [5.1.1.6.2 `hassubsequence`](#hassubsequence)
- [5.1.1.7 String Functions](#StringFunctions)
- [5.1.1.7.1 `matchesPattern`](#matchesPattern)
- [5.1.1.7.1 `matchespattern`](#matchespattern)
- [5.1.1.7.2 `tolower`](#tolower)
- [5.1.1.7.3 `toupper`](#toupper)
- [5.1.1.7.4 `trim`](#trim)
Expand Down Expand Up @@ -2247,17 +2247,17 @@ hassubsequence([1,2],[1,1,2])

#### <a name="StringFunctions" href="#StringFunctions">5.1.1.7 String Functions</a>

##### <a name="matchesPattern" href="#matchesPattern">5.1.1.7.1 `matchesPattern`</a>
##### <a name="matchespattern" href="#matchespattern">5.1.1.7.1 `matchespattern`</a>

The `matchesPattern` function has the following signature:
The `matchespattern` function has the following signature:

```
Edm.Boolean matchesPattern(Edm.String,Edm.String)
Edm.Boolean matchespattern(Edm.String,Edm.String)
```

The second parameter MUST evaluate to a string containing an
[**[ECMAScript]**](#ECMAScript) (JavaScript) regular expression. The
`matchesPattern` function returns true if the first parameter evaluates
`matchespattern` function returns true if the first parameter evaluates
to a string matching that regular expression, using syntax and semantics
of [**[ECMAScript]**](#ECMAScript) regular expressions, otherwise it
returns false.
Expand All @@ -2266,7 +2266,7 @@ returns false.
Example 81: all customers with a `CompanyName` that match the
(percent-encoded) regular expression `^A.*e$`
```
http://host/service/Customers?$filter=matchesPattern(CompanyName,'%5EA.*e$')
http://host/service/Customers?$filter=matchespattern(CompanyName,'%5EA.*e$')
```
:::

Expand Down
2 changes: 1 addition & 1 deletion odata-protocol/11 Data Service Requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ a `null` literal that can be used in comparisons.
<tr><td><code>hassubset</code></td><td><pre><code>hassubset([4,1,3],[3,1])</code></pre></td></tr>
<tr><td><code>hassubsequence</code></td><td><pre><code>hassubsequence([4,1,3,1],[1,1])</code></pre></td></tr>
<tr><td colspan="2"><strong>String Functions</strong></td></tr>
<tr><td><code>matchesPattern</code></td><td><pre><code>matchesPattern(CompanyName,'%5EA.*e$')</code></pre></td></tr>
<tr><td><code>matchespattern</code></td><td><pre><code>matchespattern(CompanyName,'%5EA.*e$')</code></pre></td></tr>
<tr><td><code>tolower</code></td><td><pre><code>tolower(CompanyName) eq 'alfreds futterkiste'</code></pre></td></tr>
<tr><td><code>toupper</code></td><td><pre><code>toupper(CompanyName) eq 'ALFREDS FUTTERKISTE'</code></pre></td></tr>
<tr><td><code>trim </code></td><td><pre><code>trim(CompanyName) eq 'Alfreds Futterkiste'</code></pre></td></tr>
Expand Down
10 changes: 5 additions & 5 deletions odata-url-conventions/5 Query Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -853,17 +853,17 @@ hassubsequence([1,2],[1,1,2])

#### ##subsubsubsec String Functions

##### ##subsubsubsubsec `matchesPattern`
##### ##subsubsubsubsec `matchespattern`

The `matchesPattern` function has the following signature:
The `matchespattern` function has the following signature:

```
Edm.Boolean matchesPattern(Edm.String,Edm.String)
Edm.Boolean matchespattern(Edm.String,Edm.String)
```

The second parameter MUST evaluate to a string containing an
[**[ECMAScript]**](#ECMAScript) (JavaScript) regular expression. The
`matchesPattern` function returns true if the first parameter evaluates
`matchespattern` function returns true if the first parameter evaluates
to a string matching that regular expression, using syntax and semantics
of [**[ECMAScript]**](#ECMAScript) regular expressions, otherwise it
returns false.
Expand All @@ -872,7 +872,7 @@ returns false.
Example ##ex: all customers with a `CompanyName` that match the
(percent-encoded) regular expression `^A.*e$`
```
http://host/service/Customers?$filter=matchesPattern(CompanyName,'%5EA.*e$')
http://host/service/Customers?$filter=matchespattern(CompanyName,'%5EA.*e$')
```
:::

Expand Down

0 comments on commit f8cbdd4

Please sign in to comment.