File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -231,16 +231,23 @@ func (cl *BaseCypherVisitor) VisitOC_Skip(c *parser.OC_SkipContext) interface{}
231
231
func (cl * BaseCypherVisitor ) VisitOC_ProjectionItems (c * parser.OC_ProjectionItemsContext ) interface {} {
232
232
items := make ([]QueryProjectionItem , 0 )
233
233
for i := range c .AllOC_ProjectionItem () {
234
- item := QueryProjectionItem {}
235
- item .Expression = c .OC_ProjectionItem (i ).Accept (cl ).(QueryExpression )
236
- item .Alias = c .OC_ProjectionItem (i ).GetText ()
234
+ item := c .OC_ProjectionItem (i ).Accept (cl ).(QueryProjectionItem )
237
235
items = append (items , item )
238
236
}
239
237
return items
240
238
}
241
239
242
240
func (cl * BaseCypherVisitor ) VisitOC_ProjectionItem (c * parser.OC_ProjectionItemContext ) interface {} {
243
- return c .OC_Expression ().Accept (cl )
241
+ item := QueryProjectionItem {}
242
+
243
+ item .Expression = c .OC_Expression ().Accept (cl ).(QueryExpression )
244
+
245
+ if c .OC_Variable () != nil {
246
+ item .Alias = c .OC_Variable ().Accept (cl ).(string )
247
+ } else {
248
+ item .Alias = c .GetText ()
249
+ }
250
+ return item
244
251
}
245
252
246
253
func (cl * BaseCypherVisitor ) VisitOC_ReadingClause (c * parser.OC_ReadingClauseContext ) interface {} {
You can’t perform that action at this time.
0 commit comments