blob: 724bb414d9db7cf1bd3ca96c48a8de07b91187e9 [file]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en-us" lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="DC.Type" content="reference"/>
<meta name="DC.Title" content="BNF for the Object Query Language"/>
<meta name="DC.Relation" scheme="URI" content="../reference/oqlsyntax.html"/>
<meta name="copyright" content="Copyright (c) 2008, 2010 SAP AG and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html " type="primary"/>
<meta name="DC.Rights.Owner" content="Copyright (c) 2008, 2010 SAP AG and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html " type="primary"/>
<meta name="DC.Format" content="XHTML"/>
<meta name="DC.Identifier" content="ref_bnfofoql"/>
<meta name="DC.Language" content="en-us"/>
<link rel="stylesheet" type="text/css" href="../styles/commonltr.css"/>
<title>BNF for the Object Query Language</title>
</head>
<body id="ref_bnfofoql">
<h1 class="title topictitle1">BNF for the Object Query Language</h1>
<div class="body refbody">
<div class="section">
<table cellpadding="4" cellspacing="0" summary="" id="ref_bnfofoql__oql_table" border="1" class="simpletable"><tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">SelectStatement</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">"SELECT" SelectList FromClause ( WhereClause )? ( UnionClause )?</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">SelectList</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">(( "DISTINCT" | "AS RETAINED SET" )? ( "*" | "OBJECTS" SelectItem | SelectItem ( "," SelectItem )* ))</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">SelectItem</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">( PathExpression | EnvVarPathExpression ) ( "AS" ( &lt;STRING_LITERAL&gt; | &lt;IDENTIFIER&gt; ) )?</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">PathExpression</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">( ObjectFacet | BuiltInFunction ) ( "." ObjectFacet | "[" SimpleExpression ( ":" SimpleExpression)? "]" )*</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">EnvVarPathExpression</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">( "$" "{" &lt;IDENTIFIER&gt; "}" ) ( "." ObjectFacet | "[" SimpleExpression ( ":" SimpleExpression)? "]" )*</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">ObjectFacet</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">( ( "@" )? &lt;IDENTIFIER&gt; ( ParameterList )? )</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">ParameterList</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">"(" ( ( SimpleExpression ( "," SimpleExpression )* ) )? ")"</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">FromClause</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">"FROM" ( "OBJECTS" )? ( "INSTANCEOF" )? ( FromItem | "(" SelectStatement ")" ) ( &lt;IDENTIFIER&gt; )?</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">FromItem</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">( ClassName | &lt;STRING_LITERAL&gt; | ObjectAddress ( "," ObjectAddress )* | ObjectId ( "," ObjectId )* | EnvVarPathExpression )</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">ClassName</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">( &lt;IDENTIFIER&gt; ( "." &lt;IDENTIFIER&gt; )* ( "[]" )* )</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">ObjectAddress</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">&lt;HEX_LITERAL&gt;</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">ObjectId</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">&lt;INTEGER_LITERAL&gt;</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">WhereClause</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">"WHERE" ConditionalOrExpression</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">ConditionalOrExpression</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">ConditionalAndExpression ( "or" ConditionalAndExpression )*</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">ConditionalAndExpression</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">EqualityExpression ( "and" EqualityExpression )*</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">EqualityExpression</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">RelationalExpression ( ( "=" RelationalExpression | "!=" RelationalExpression ) )*</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">RelationalExpression</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">( SimpleExpression ( ( "&lt;" SimpleExpression | "&gt;" SimpleExpression | "&lt;=" SimpleExpression | "&gt;=" SimpleExpression | ( LikeClause | InClause ) | "implements" ClassName ) )? )</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">LikeClause</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">( "NOT" )? "LIKE" &lt;STRING_LITERAL&gt;</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">InClause</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">( "NOT" )? "IN" SimpleExpression</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">SimpleExpression</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">MultiplicativeExpression ( "+" MultiplicativeExpression | "-" MultiplicativeExpression )*</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">MultiplicativeExpression</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">PrimaryExpression ( "*" PrimaryExpression | "/" PrimaryExpression )*</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">PrimaryExpression</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">Literal</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock"> </pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">|</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">"(" ( ConditionalOrExpression | SubQuery ) ")</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock"> </pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">|</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">PathExpression</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock"> </pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">|</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">EnvVarPathExpression</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">SubQuery</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">SelectStatement</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">Function</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">( ( "toHex" | "toString" | "dominators" | "outbounds" | "inbounds" | "classof" | "dominatorof" ) "(" ConditionalOrExpression ")" )</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">Literal</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">( &lt;INTEGER_LITERAL&gt; | &lt;LONG_LITERAL&gt; | &lt;FLOATING_POINT_LITERAL&gt; | &lt;CHARACTER_LITERAL&gt; | &lt;STRING_LITERAL&gt; | BooleanLiteral | NullLiteral )</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">BooleanLiteral</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">"true"</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock"> </pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">|</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">"false"</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">NullLiteral</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">&lt;NULL&gt;</pre>
</td>
</tr>
<tr class="strow">
<td valign="top" class="stentry"><pre class="pre codeblock">UnionClause</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">::=</pre>
</td>
<td valign="top" class="stentry"><pre class="pre codeblock">( "UNION" "(" SelectStatement ")" )+</pre>
</td>
</tr>
</table>
</div>
</div>
<div class="related-links">
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../reference/oqlsyntax.html">OQL Syntax</a></div>
</div>
</div>
</body>
</html>