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

Fix docs for querying schema #112

Merged
merged 2 commits into from
Jan 2, 2020
Merged

Fix docs for querying schema #112

merged 2 commits into from
Jan 2, 2020

Conversation

mangalaman93
Copy link
Contributor

@mangalaman93 mangalaman93 commented Dec 29, 2019

Fixes #111


This change is Reviewable

Copy link

@prashant-shahi prashant-shahi left a comment

Choose a reason for hiding this comment

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

A couple of comments to be addressed and :lgtm:

Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @danielmai, @mangalaman93, and @prashant-shahi)


README.md, line 195 at r1 (raw file):

When running a schema query for name predicate, the schema response is found in the Json field of the api.Response, as shown below:

We should let users know that the schema query is for the name predicate because if they don't have one, they will be getting an empty response.


README.md, line 210 at r1 (raw file):

res, err := txn.Query(ctx, q)
fmt.Println(res.Json)

fmt.Printf("%s\n", res.Json)

It will print []uint8 otherwise.

Copy link
Contributor

@danielmai danielmai left a comment

Choose a reason for hiding this comment

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

Address comments from @prashant-shahi and then :lgtm:.

Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @danielmai, @mangalaman93, and @prashant-shahi)

Copy link
Contributor

@danielmai danielmai left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @danielmai, @mangalaman93, and @prashant-shahi)

Copy link

@prashant-shahi prashant-shahi 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, 3 unresolved discussions (waiting on @mangalaman93 and @prashant-shahi)


README.md, line 209 at r1 (raw file):

}`

res, err := txn.Query(ctx, q)
if err != nil {
    log.Fatal(err)
}

we should handle the error since the err variable is already initialized here.

Copy link
Contributor Author

@mangalaman93 mangalaman93 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, 3 unresolved discussions (waiting on @prashant-shahi)


README.md, line 195 at r1 (raw file):

Previously, prashant-shahi (Prashant Shahi) wrote…

When running a schema query for name predicate, the schema response is found in the Json field of the api.Response, as shown below:

We should let users know that the schema query is for the name predicate because if they don't have one, they will be getting an empty response.

Done.


README.md, line 209 at r1 (raw file):

Previously, prashant-shahi (Prashant Shahi) wrote…
if err != nil {
    log.Fatal(err)
}

we should handle the error since the err variable is already initialized here.

Done.


README.md, line 210 at r1 (raw file):

Previously, prashant-shahi (Prashant Shahi) wrote…

fmt.Printf("%s\n", res.Json)

It will print []uint8 otherwise.

Done. Good catch.

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.

v2 Documentation for getting Schema in api.Response
3 participants