Author: doogie
Date: Mon Aug 2 17:41:55 2010
New Revision: 981616
URL:
http://svn.apache.org/viewvc?rev=981616&view=revLog:
FEATURE: Create a new StaticValue function, based on the contents of
FieldDef.
Modified:
ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Parser.jj
Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Parser.jj
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Parser.jj?rev=981616&r1=981615&r2=981616&view=diff==============================================================================
--- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Parser.jj (original)
+++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Parser.jj Mon Aug 2 17:41:55 2010
@@ -513,9 +513,9 @@ private FieldAll FieldAll(): {
{ return new FieldAll(n, excludeList); }
}
-private FieldDef FieldDef(): {
+private StaticValue StaticValue(): {
StaticValue v;
- String n, fieldAlias = null, fieldName;
+ String n, fieldName;
} {
(
n=NamePart() (
@@ -525,7 +525,14 @@ private FieldDef FieldDef(): {
)
| v=MathValue()
| v=Count()
- ) ( <AS> fieldAlias=NamePart() )? {
+ ) { return v; }
+}
+
+private FieldDef FieldDef(): {
+ StaticValue v;
+ String fieldAlias = null;
+} {
+ v=StaticValue() ( <AS> fieldAlias=NamePart() )? {
return new FieldDef(v, fieldAlias);
}
}