Hi all,

I've been looking through the codebase and noticed we use several terms
interchangeably for the same concept which is the map of named values
substituted into a Gremlin query at evaluation time. Depending on where you
look, these are called "bindings," "parameters," or "variables."

A quick summary of the current state:

"bindings" - used in the wire protocol (Tokens.ARGS_BINDINGS), server-side
validation (INVALID_BINDINGS_KEYS), and throughout gremlin-server.
"parameters" - used in RequestOptions (getParameters/addParameter), and
server Settings.maxParameters.
"variables" - used in JSR-223 where a binding entry becomes a "variable" in
the script engine scope.

The practical effect is that Client.java has a line that reads:
options.getParameters().ifPresent(params ->
request.addArg(Tokens.ARGS_BINDINGS, params));

This makes the code harder to follow than it needs to be, especially for
new contributors.

I'd recommend standardizing on "parameters", it's the term people know from
the broader database world (JDBC, GraphQL, etc.) and it's already where our
GLVs are heading.

This would mean that we would rename the "bindings" field in the HTTP API
to "parameters" and clean up all the other references in both the code and
documentation.

Any thoughts or concerns on this?

Thanks,
Ken

Reply via email to