Closed GoogleCodeExporter closed 9 years ago
And also for path. :)
It would be also easier to pass the output through mustache and other libs.
Original comment by b...@topicmapslab.de
on 14 Dec 2010 at 11:43
In path the named result columns are confusing.
Do you mean in projection or for path at all? How do you think the syntax looks
like?
path-expression ::= navigation AS element
ex: topic >> instances AS "name"
Original comment by Sven.Kro...@googlemail.com
on 4 Jan 2011 at 10:27
Original comment by Sven.Kro...@googlemail.com
on 4 Jan 2011 at 10:28
Initially I thought about projections only and I'm not sure if it useful when
not using projections. When going through the grammar from projection-postfix,
I think I'd put it in tuple-expression, after asc/desc. But as this is used
elsewhere, I'm not sure if this is a good place.
Original comment by bnjmn...@gmail.com
on 4 Jan 2011 at 11:31
Yes it is, I added a new production called alias
alias ::= AS literal
and added them at the end of a value-expression like
tuple-expression ::= < alias-value-expression >
alias-value-expression ::= value-expression [ alias ]
In this way, the grammar and syntax is the same for select, flwr and path
projection which all uses tuple-expressions
Original comment by Sven.Kro...@googlemail.com
on 4 Jan 2011 at 11:35
The feature is implemented in current SNAPSHOT.
The alias can be used after a simple navigation, within a projection, the
select clause and the return clause.. The syntax is similar two tokens at the
end of value-expression:
AS string-literal
The result and resultset classes are extended with getter using the column
alias instead the numerical index.
Original comment by Sven.Kro...@googlemail.com
on 5 Jan 2011 at 11:15
Original issue reported on code.google.com by
h.niederhausen@googlemail.com
on 14 Dec 2010 at 11:15