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

docs: add readme #2

Merged
merged 3 commits into from
Feb 9, 2023
Merged

Conversation

MichaelScofield
Copy link
Collaborator

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

PLEASE DO NOT LEAVE THIS EMPTY !!!

Please explain IN DETAIL what the changes are in this PR and why they are needed:

  • Summarize your change (mandatory)
  • How does this PR work? Need a brief introduction for the changed logic (optional)
  • Describe clearly one logical change and avoid lazy messages (optional)
  • Describe any limitations of the current code (optional)

Checklist

  • I have written the necessary comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@MichaelScofield MichaelScofield changed the title doc: add readme docs: add readme Feb 9, 2023
use greptime_proto::prometheus::remote::*;
```

Copy link
Member

Choose a reason for hiding this comment

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

Consider add sections for usage after code generation.

Given a greptimedb instance and its host:4001 address, how to use generated code to call the service? As we are using Arrow Flight instead of original gRPC, a simple guide is needed to bridge the gap.

The response of `do_get` is handled in Arrow Flight's client. It's a stream of `FlightData`. You can find its definition in Arrow Flight's protobuf file. Special care must be taken when dealing with insertion, that GreptimeDB puts insertion result in `FlightData`'s metadata. Insertion results, either from `InsertRequest` or `INSERT INTO` SQL, are both have the same format, that "Affected Rows: x". "x" represents the rows that are successfully inserted. When dealing with this special `FlightData`, please ignore its `data_body` field, but directly strip the `app_metadata` field from it, and deserialize the bytes as `FlightMetadata` message. You will find the "affected rows" result in it.

We already have our SDK written in [Java](https://github.com/GreptimeTeam/greptimedb-client-java), [Rust]() and [Go](), feel free to take any of them as an example.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

() is leave empty on purpose because it's not done yet, I will update it in the future

@sunng87 sunng87 merged commit 9661615 into GreptimeTeam:main Feb 9, 2023
@MichaelScofield MichaelScofield deleted the doc/readme branch February 10, 2023 01:54
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.

3 participants