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

Let result of checkpwd to be aliased #2641

Merged
merged 3 commits into from
Oct 9, 2018

Conversation

srfrog
Copy link
Contributor

@srfrog srfrog commented Oct 8, 2018

This changes query response to use any specified alias for response.
It also brings default checkpwd response to be in-line with count().
e.g.,

// before
"pass": [
  {
    "checkpwd": true
  }
]

// now
"checkpwd(pass)": true

Closes: #2630


This change is Reviewable

This changes query response to use any specified alias for response.
It also brings default checkpwd response to be in-line with count().
e.g.,

```
// before
"pass": [
  {
    "checkpwd": true
  }
]

// now
"checkpwd(pass)": true
```

Closes: #2630
@srfrog srfrog requested a review from manishrjain October 8, 2018 19:27
Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

:lgtm: One question.

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @srfrog and @manishrjain)


query/query.go, line 329 at r1 (raw file):

func addCheckPwd(pc *SubGraph, vals []*pb.TaskValue, dst outputNode) {
	c := types.ValueForType(types.BoolID)
	if len(vals) == 0 {

Is this condition not possible?

Copy link
Contributor Author

@srfrog srfrog left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @srfrog)


query/query.go, line 329 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Is this condition not possible?

hmm not directly from query, but it could from when processing the subgraph. thanks

Copy link
Contributor Author

@srfrog srfrog left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @manishrjain)


query/query.go, line 329 at r1 (raw file):

Previously, srfrog (Gus) wrote…

hmm not directly from query, but it could from when processing the subgraph. thanks

Done.

@srfrog srfrog merged commit a7c31a8 into master Oct 9, 2018
@srfrog srfrog deleted the feature/issue_2630-alias-on-checkpwd branch October 9, 2018 16:37
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 19, 2019
* Let result of checkpwd to be aliased

This changes query response to use any specified alias for response.
It also brings default checkpwd response to be in-line with count().
e.g.,

```
// before
"pass": [
  {
    "checkpwd": true
  }
]

// now
"checkpwd(pass)": true
```

Closes: hypermodeinc#2630
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants