Telerik OpenAccess Classic

Telerik OpenAccess ORM Send comments on this topic.
BNC Syntax Diagrams
See Also
Programmer's Guide > OpenAccess ORM Classic (Old API) > Telerik OpenAccess ORM OQL Reference > OQL - Object Query Language > BNC Syntax Diagrams

Glossary Item Box

This documentation article is a legacy resource describing the functionality of the deprecated OpenAccess Classic only. The contemporary documentation of Telerik OpenAccess ORM is available here.

OQL General Syntax

OQL Copy Code
SELECT <result-SET>
 
FROM <SET-definition> {, SET-definition}
   {
WHERE <expression> }
     {
ORDER BY <member-list> }
WHERE:
 
<result-SET>
: * | SET-var | SET-var.member
 
<SET-definition>
: SET {AS} SET-var | SET-var IN SET
 
<SET>
: extent | embedded-SET | result-SET-id
 
<expression>
: <compare-predicate>
   {
AND | OR } {<compare-predicate>}
 
<compare-predicate>
: <path expression> <operator> <literal>
|
<AVG Statement> <operator> NUMBER | <COUNT Statement> <operator>
NUMBER | <MIN Statement> <operator> NUMBER | <MAX Statement> <operator>
NUMBER | <SUM Statement> <operator> NUMBER
| <EXISTS Statement> { <operator> TRUE | false }
 
<path expression>
: {SET-var.}{{embeddedObj | ondemand | pointer | SET}.}member (AND MORE indirections)
 
<literal>
: literal basetype (string, INT, ...)
 
<operator>
: { basic-operator | extended-operator }
 
<basic-operator>
: { = | == | != | <> | > | < | >= | <=
|
LIKE | NOT LIKE }
 
<extended-operator>
: { =<operator-parameter-list>
|
==<operator-parameter-list>
|
!=<operator-parameter-list>
|
<><operator-parameter-list>
|
><operator-parameter-list>
|
<<operator-parameter-list>
|
>=<operator-parameter-list>
|
<=<operator-parameter-list>
|
LIKE<operator-parameter-list>| NOT LIKE<operator-parameter-list> }
 
<member-list>
: <path expression> { ASC | DESC }
{
, <path expression> { ASC | DESC } }

OQL COUNT Statement Syntax

OQL Copy Code
COUNT ( <select-statement> )
OR
SELECT
COUNT (*)
FROM ...
WHERE ...

OQL AVG Statement Syntax

OQL Copy Code
AVG ( <select-statement> )
OR
SELECT
AVG (*)
FROM ...
WHERE ...

OQL MIN Statement Syntax

OQL Copy Code
MIN ( <select-statement> )
OR
SELECT
MIN (*)
FROM ...
WHERE ...

OQL MAX Statement Syntax

OQL Copy Code
MAX ( <select-statement> )
OR
SELECT
MAX (*)
FROM ...
WHERE ...

OQL SUM Statement Syntax

OQL Copy Code
SUM ( <select-statement> )
OR
SELECT
SUM (*)
FROM ...
WHERE ...

OQL FOR ALL Statement Syntax

OQL Copy Code
FOR ALL <extent-var> IN <extent> :
<compare-predicate>

OQL DEFINE Statement Syntax

OQL Copy Code
DEFINE <identifier> AS <oql-statement>;

OQL ELEMENT Statement Syntax

OQL Copy Code
ELEMENT ( <oql-statement> )

See Also