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

Define and implement a new query interface #832

Merged
merged 1 commit into from
Sep 23, 2019

Conversation

dennwc
Copy link
Member

@dennwc dennwc commented Sep 23, 2019

Current query interface (in Go) is weird. The user must know that Execute should be called in a goroutine, and then returned values should be Collated. This is a very non-intuitive way to expose query results.

This PR defines a new interface that returns a regular iterator. The type of query results is controlled by an option. This way the query language will collate value internally, providing only useful values to the user.

This is a breaking change, since it replaces the old interface completely. However, internal query interface was not documented, and was not intended for external use, so I think it's worth changing anyway.

This change also adds an extendable Options parameter to Execute, unlocking future progress on #821.


This change is Reviewable

@dennwc dennwc added this to the v0.7.6 milestone Sep 23, 2019
@dennwc dennwc self-assigned this Sep 23, 2019
@dennwc dennwc merged commit 1884ec7 into cayleygraph:master Sep 23, 2019
@dennwc dennwc deleted the query_iface branch September 23, 2019 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant