--
PedroRio - 27 Dec 2010
XeoQL - XEO Query Language ( also known as BOQL )
XEO Query Language (XEOQL a.k.a BOQL - Business Object Query Language) is a language designed to query instances of XEO Object Models. It's very similar to SQL and has many of the same constructors. SQL is designed to return records from a relational database, while XEOQL is designed to return Object Model instances from its datasource (tipically a relational database).
Using XEO's Java API to issue a XEOQL expression against the datasource will produce a
boObjectList instance which can be used to iterate through all elements that are the result of the query. The methods available in
ObjectListManager allow you to create a boObjectList instance from a XEOQL query.The syntax for a XEOQL expression is the following:
SELECT [MY] [USING user/pwd] [attlist FROM] objname [WHERE whereStatement (AND | OR whereStament)* ]
Although the syntax may seem complicated usually you'll not use every option in the syntax. Let's start with the simplest of queries, selecting all instances of a given Object Model, for example the system Object Model
Ebo_Perf (which represents a user).
select Ebo_Perf
aa
a
a
a
a
Special Constants
There are a number of special constants which can be used when creating a XEOQL expression.The following table summarizes them.
Table XEOQL.1 - Special constants in XEOQL
a
a
a
a
a