Skip to content

Document CDL Operators vs CAP Java Operators #1892

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

Merged
merged 2 commits into from
Jun 4, 2025
Merged
Changes from all commits
Commits
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
56 changes: 31 additions & 25 deletions java/working-with-cql/query-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1474,8 +1474,14 @@ These comparison operators are supported:
<table>
<thead>
<tr>
<th colspan="2" align=center>Operator</th><th/><th/>
</tr>
<tr>
<th>
CAP Java
</th>
<th>
Predicate
CDL
</th>
<th width="400">
Description
Expand All @@ -1488,11 +1494,9 @@ These comparison operators are supported:

<tbody>
<tr>
<td>EQ</td><td>=</td>
<td>
EQ
</td>
<td>
Test if this value equals a given value. NULL values might be treated as unknown resulting in a three-valued logic as in SQL.
Test if this value equals a given value. NULL values might be treated as unknown resulting in a <i>three-valued logic</i> as in SQL.
</td>
<td align="left">
<code>Select.from("bookshop.Books")
Expand All @@ -1502,11 +1506,9 @@ EQ
</tr>

<tr>
<td>NE</td><td>&lt;&gt;</td>
<td>
NE
</td>
<td>
Test if this value is NOT equal to a given value. NULL values might be treated as unknown resulting in a three-valued logic as in SQL.
Test if this value is NOT equal to a given value. NULL values might be treated as unknown resulting in a <i>three-valued logic</i> as in SQL.
</td>
<td>
<code>Select.from("bookshop.Books")
Expand All @@ -1516,11 +1518,9 @@ NE
</tr>

<tr>
<td>IS</td><td>==</td>
<td>
IS
</td>
<td>
Test if this value equals a given value. NULL values are treated as any other value.
Test if this value equals a given value. NULL values are treated as any other value (<i>Boolean logic</i>).
</td>
<td>

Expand All @@ -1532,11 +1532,9 @@ IS
</tr>

<tr>
<td>IS NOT</td><td>!=</td>
<td>
IS NOT
</td>
<td>
Test if this value is NOT equal to a given value. NULL values are treated as any other value.
Test if this value is NOT equal to a given value. NULL values are treated as any other value (<i>Boolean logic</i>).
</td>
<td>

Expand All @@ -1548,9 +1546,7 @@ IS NOT
</tr>

<tr>
<td>
GT
</td>
<td>GT</td><td>&gt;</td>
<td>
Test if this value is greater than a given value.
</td>
Expand All @@ -1564,9 +1560,21 @@ GT
</tr>

<tr>
<td>GE</td><td>&gt;=</td>
<td>
LT
Test if this value is greater than or equal to a given value.
</td>
<td>

<code>Select.from("bookshop.Books")
.where(b -> b.get("stock")
.<span class="na">ge</span>(5));</code>

</td>
</tr>

<tr>
<td>LT</td><td>&lt;</td>
<td>
Test if this value is less than a given value.
</td>
Expand All @@ -1580,9 +1588,7 @@ LT
</tr>

<tr>
<td>
LE
</td>
<td>LE</td><td>&lt;=</td>
<td>
Test if this value is less than or equal to a given value.
</td>
Expand All @@ -1596,7 +1602,7 @@ LE
</tr>

<tr>
<td>
<td colspan="2">
BETWEEN
</td>
<td>
Expand Down