You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Matt Frantz (JIRA)" <ji...@apache.org> on 2015/06/11 20:35:01 UTC
[jira] [Comment Edited] (TINKERPOP3-723) constant step
[ https://issues.apache.org/jira/browse/TINKERPOP3-723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14582347#comment-14582347 ]
Matt Frantz edited comment on TINKERPOP3-723 at 6/11/15 6:34 PM:
-----------------------------------------------------------------
[~okram] [~dkuppitz] I'll take a crack at it.
was (Author: mhfrantz):
[~okram][~dkuppitz] I'll take a crack at it.
> constant step
> -------------
>
> Key: TINKERPOP3-723
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-723
> Project: TinkerPop 3
> Issue Type: Improvement
> Reporter: Matt Frantz
> Assignee: Daniel Kuppitz
>
> The proposed {{constant}} step would be like a {{map}} that always returns the same value. It is most useful as an {{option}} or as an argument of {{coalesce}} or {{branch}}.
> {noformat}
> gremlin> g.V().coalesce(__.hasLabel('person').values('name'), __.constant('nonperson'))
> gremlin> g.V().coalesce(__.hasLabel('person').values('name'), __.map{it -> 'nonperson'})
> ==>marko
> ==>vadas
> ==>nonperson
> ==>josh
> ==>nonperson
> ==>peter
> {noformat}
> It was mentioned by [~dkuppitz] in the comments of TINKERPOP3-700.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)