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


##########
gremlin-dotnet/src/Gremlin.Net/Driver/Messages/RequestMessage.cs:
##########
@@ -27,117 +27,119 @@
 namespace Gremlin.Net.Driver.Messages
 {
     /// <summary>
-    ///     The model for a request message sent to the server.
+    ///     The model for a 4.0 request message sent to the server.
     /// </summary>
     public class RequestMessage
     {
-        private RequestMessage(Guid requestId, string operation, string 
processor, Dictionary<string, object> arguments)
+        private RequestMessage(string gremlin, Dictionary<string, object> 
fields)
         {
-            RequestId = requestId;
-            Operation = operation;
-            Processor = processor;
-            Arguments = arguments;
+            Gremlin = gremlin ?? throw new 
ArgumentNullException(nameof(gremlin));
+            Fields = fields;
+            if (!Fields.ContainsKey(Tokens.ArgsLanguage))
+            {
+                Fields[Tokens.ArgsLanguage] = "gremlin-lang";
+            }
         }
 
         /// <summary>
-        ///     Gets the ID of this request message.
-        /// </summary>
-        /// <value>A UUID representing the unique identification for the 
request.</value>
-        public Guid RequestId { get; }
-
-        /// <summary>
-        ///     Gets the name of the operation that should be executed by the 
Gremlin Server.
+        ///     Gets the Gremlin query string.
         /// </summary>
-        /// <value>
-        ///     The name of the "operation" to execute based on the available 
OpProcessor configured in the Gremlin Server. This
-        ///     defaults to "eval" which evaluates a request script.
-        /// </value>
-        public string Operation { get; }
+        public string Gremlin { get; }
 
         /// <summary>
-        ///     Gets the name of the OpProcessor to utilize.
+        ///     Gets the fields map containing language, g, bindings, and 
other options.
         /// </summary>
-        /// <value>
-        ///     The name of the OpProcessor to utilize. This defaults to an 
empty string which represents the default
-        ///     OpProcessor for evaluating scripts.
-        /// </value>
-        public string Processor { get; }
-
-        /// <summary>
-        ///     Gets arguments of the <see cref="RequestMessage" />.
-        /// </summary>
-        public Dictionary<string, object> Arguments { get; }
+        public Dictionary<string, object> Fields { get; }
 
         /// <summary>
         ///     Initializes a <see cref="Builder" /> to build a <see 
cref="RequestMessage" />.
         /// </summary>
-        /// <param name="operation">The name of the OpProcessor to 
utilize.</param>
+        /// <param name="gremlin">The Gremlin query string.</param>
         /// <returns>A <see cref="Builder" /> to build a <see 
cref="RequestMessage" />.</returns>
-        public static Builder Build(string operation)
+        public static Builder Build(string gremlin)

Review Comment:
   This builder is missing a lot of convenience methods that would help users 
understand what the RequestMessage can contain. E.g. "materializeProperties", 
"chunkSize", etc.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to