[ 
https://issues.apache.org/jira/browse/TINKERPOP-2334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17779176#comment-17779176
 ] 

ASF GitHub Bot commented on TINKERPOP-2334:
-------------------------------------------

kenhuuu commented on code in PR #2307:
URL: https://github.com/apache/tinkerpop/pull/2307#discussion_r1370543709


##########
docs/src/dev/provider/gremlin-semantics.asciidoc:
##########
@@ -892,6 +892,36 @@ None
 
 None
 
+[[format-step]]
+=== format()
+
+*Description:* a mid-traversal step which will handle result formatting to 
string values.
+
+*Syntax:* `format(String)`
+
+[width="100%",options="header"]
+|=========================================================
+|Start Step |Mid Step |Modulated |Domain |Range
+|N |Y |N |`any` |`String`
+|=========================================================
+
+*Arguments:*
+
+Format string. Variables can be represented using `%{variable_name}` notation.
+The variable values are used in the order that the first one will be found: 
Element properties, than Scope values.
+If value for some variable was not found than result for input is skipped.
+
+*Exceptions*
+
+None
+
+*Modulation:*
+
+None
+
+See: 
link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/FromatStep.java[source],

Review Comment:
   Typo in "FromatStep.java"





> Add format() step
> -----------------
>
>                 Key: TINKERPOP-2334
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2334
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.4.4
>            Reporter: Stephen Mallette
>            Assignee: Valentyn Kahamlyk
>            Priority: Major
>
> Provide for a {{format()}} step which will handle result formatting to string 
> values. This change will help resolve the need for string concatenation 
> functions while providing a lot of flexibility to how results can be formed:
> {code}
> gremlin> g.V().hasLabel('person').format("%{n} is %{a} years old.").by('n',
> 'name').by('a', 'age')
> ==>marko is 29 years old.
> ==>vadas is 27 years old.
> ==>josh is 32 years old.
> ==>peter is 35 years old.
> gremlin> g.V().hasLabel('person').format("%{name} is %{age} years old.")
> ==>marko is 29 years old.
> ==>vadas is 27 years old.
> ==>josh is 32 years old.
> ==>peter is 35 years old.
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to