cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: EJBQL: Arithmetic operations
Date Mon, 15 Aug 2016 06:30:26 GMT
Hi Hugi,

Sorry for delayed reply. I swear we had the BNF for EJBQL in the docs, but apparently we don't.
Here is the closest thing to it - a JavaCC grammar:

https://github.com/apache/cayenne/blob/master/cayenne-server/src/main/jjtree/org/apache/cayenne/ejbql/EJBQLParser.jjt

We do support simple arithmetic operations. Search for 'arithmetic_' clauses in the .jjt.

Andrus

> On Aug 11, 2016, at 2:31 PM, Hugi Thordarson <hugi@karlmenn.is> wrote:
> 
> Hi all.
> 
> Can I write EJBQL that performs arithmetic operations, like multiplication? Something
like:
> 
> select e.text, e.price-(e.price*e.discountPercentage) from Entry e ?
> 
> On a related note; does there exist a complete reference of Cayenne’s EJBQL?
> 
> Cheers,
> - hugi


Mime
View raw message