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

Added input and output graph lists. #74

Merged
merged 2 commits into from
Jun 15, 2017

Conversation

apr94
Copy link
Contributor

@apr94 apr94 commented Jun 14, 2017

This PR is to add input and output graph lists to the statement, along with the regular graph lists. The idea is to use the regular graph lists to collect graphs for creation/deletion, and the input graph lists to collect graphs that act as a source of information (such as information queried in a WHERE clause) and the output graph lists to collect graphs that act as a destination of information (such as triples added in an INSERT or CONSTRUCT clause).

There are a couple of reasons for this change. Primarily, there needs to be a distinction between input and output graphs in a CONSTRUCT...WHERE BQL statement. Also, having the distinction helps to reason through the code.

Copy link
Member

@xllora xllora left a comment

Choose a reason for hiding this comment

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

Minor nit.

func TestAcceptDeleteDataFromGraphOpsByParseAndSemantic(t *testing.T) {
table := []struct {
query string
graphs int
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather suggest to use []string{"?graph",...} instead of testing for length. Here and on the other tests. Since this aso improves on correctness.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Also added tests for the construct statement.

@apr94
Copy link
Contributor Author

apr94 commented Jun 15, 2017

PTAL, thanks!

Copy link
Member

@xllora xllora left a comment

Choose a reason for hiding this comment

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

LGTM :D

@xllora xllora merged commit 9b7b7f6 into google:master Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants