Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TINKERPOP-2070: Introduce Connection and ResultSet abstractions #966

Merged
merged 2 commits into from
Nov 5, 2018

Conversation

jorgebay
Copy link
Contributor

https://issues.apache.org/jira/browse/TINKERPOP-2070

Extract Connection implementation out of the DriverRemoteConnection.

The DriverRemoteConnection now uses a Client instance, a Client instance may contain one or more Connection instances, similar to the Python and .NET glv.

Introduce ResultSet that is aligned to other GLVs:

  • Client and Connection submit() methods return a ResultSet instance
  • DriverRemoteConnection submissions returns an instance of RemoteTraversal.

This is a large-ish refactor but it doesn't represent a breaking change for the user.

Additionally, I've identified an issue when we introduced script submission support in gremlin-javascript (my bad!): We exposed a property named traversers (see previous code examples). I've maintained that property and marked it as deprecated, to be removed in 3.4, and updated all code examples to stop referencing to it.

Extract Connection implementation out of the DriverRemoteConnection.
The DriverRemoteConnection uses a Client instance, a Client instance
may contain one or more Connection instances.
- Client and Connection submit() method returns a ResultSet instance
- DriverRemoteConnection returns an instance of RemoteTraversal
- Include gremlin script submission via gremlin-javascript in
reference docs
- ResultSet tests and other test fixes
@jorgebay
Copy link
Contributor Author

VOTE +1

.then(response => {
console.log(response.traversers.length);
console.log(response.traversers[0]);
client.submit('g.V().tail()')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we usually don't edit past upgrade notes - they are static and bound to that version, but i think i see what you're trying to do here, i.e. hide away traversers....i guess that's ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the idea is to hide a deprecated property :)

@spmallette
Copy link
Contributor

VOTE +1

@jorgebay jorgebay merged commit 6541c81 into tp33 Nov 5, 2018
@jorgebay jorgebay deleted the TINKERPOP-2070 branch November 5, 2018 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants