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

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

kenhuuu commented on PR #3727:
URL: https://github.com/apache/tinkerpop/pull/3727#issuecomment-6514346672

   The original issue is already solved in Java, Python, .NET, and Go: 
`g.with("language", ...)` is extracted into the request options. Adding 
connection-level defaults across every GLV is unnecessary and creates 
inconsistent transaction behavior: Java, Python, .NET, and Go drop the default 
when creating a transaction-bound connection, while JavaScript preserves it. 
Users would therefore get different engines for equivalent transactional 
traversals depending on the GLV.
   
   Please reduce this PR to:
   
   - Add language to JavaScript’s traversal-option allowlist.
   - Add focused JavaScript tests.
   - Update documentation only as needed for traversal-level selection.




> Provide a path for selecting script engine for traversals in TP4
> ----------------------------------------------------------------
>
>                 Key: TINKERPOP-3095
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3095
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: driver
>    Affects Versions: 4.0.0
>            Reporter: Valentyn Kahamlyk
>            Priority: Critical
>
> For string queries there is now a simple way to select script engine which 
> the query will be executed
> {code:java}
> final RequestOptions ro = 
> RequestOptions.build().language("gremlin-lang").create();
> final List result = client.submit("g.inject(1)", ro).toList();{code}
> We need to do the same thing for traversal based requests, Something like
> {code:java}
> final GraphTraversalSource g = 
> traversal().with(DriverRemoteConnection.using(cluster)).with("language", 
> "gremlin-lang");
> final List result = g.inject(1).toList());{code}
> *or*
> {code:java}
> final GraphTraversalSource g = 
> traversal().with(DriverRemoteConnection.using(cluster, "g",  "gremlin-lang));
> final List result = g.inject(1).toList());{code}



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to