Skip to content

Commit

Permalink
Format table and fix typo (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
hezhizhen committed Mar 31, 2023
1 parent b304ce0 commit 94abfb9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
1 change: 0 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,3 @@ For answers to common questions about this code of conduct, see the FAQ at
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ ssl-test-self-signed:
run-examples:
go run examples/basic_example/graph_client_basic_example.go && \
go run examples/parameter_example/parameter_example.go && \
go run examples/gorountines_example/graph_client_goroutines_example.go && \
go run examples/goroutines_example/graph_client_goroutines_example.go && \
go run examples/json_example/parse_json_example.go && \
go run examples/session_pool_example/session_pool_example.go
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@
[![codecov](https://codecov.io/gh/vesoft-inc/nebula-go/branch/master/graph/badge.svg?token=dzUo5KdSux)](https://codecov.io/gh/vesoft-inc/nebula-go)

**IMPORTANT: Code of Nebula go client has been transferred from [nebula-clients](https://github.com/vesoft-inc/nebula-clients) to this repository(nebula-go), and new releases in the future will be published in this repository.
Please update your go.mod and imports correspondingly.**
Please update your `go.mod` and imports correspondingly.**

Official Nebula Go client which communicates with the server using [fbthrift](https://github.com/facebook/fbthrift/). Currently the latest stable release is **[v3.4.0](https://github.com/vesoft-inc/nebula-go/tree/release-v3.4)**

The code in **master branch** will be updated to accommodate the nightly changes made in NebulaGraph.
To Use the console with a stable release of NebulaGraph, please check the branches and use the corresponding version.

| Client version | Nebula Service Version|
|:--------------:|:-------------------:|
| **[v1.0.0](https://github.com/vesoft-inc/nebula-go/tree/v1.0)** | 1.x.x |
| **[v2.0.0-ga](https://github.com/vesoft-inc/nebula-go/tree/v2.0.0-ga)** | 2.0.0-ga, 2.0.1 |
| **[v2.5.1](https://github.com/vesoft-inc/nebula-go/tree/v2.5.1)** | 2.5.0 |
| **[v2.6.0](https://github.com/vesoft-inc/nebula-go/tree/v2.6.0)** | 2.6.0 |
| **[v3.0.0](https://github.com/vesoft-inc/nebula-go/tree/v3.0.0)** | 3.0.0 |
| **[v3.1.x](https://github.com/vesoft-inc/nebula-go/tree/v3.1.0)** | 3.1.x |
| **[v3.2.x](https://github.com/vesoft-inc/nebula-go/tree/v3.2.0)** | 3.1.x-3.2.x |
| **[v3.3.x](https://github.com/vesoft-inc/nebula-go/tree/v3.3.0)** | 3.1.x-3.3.x |
| **[v3.4.x](https://github.com/vesoft-inc/nebula-go/tree/v3.4.0)** | 3.1.x-3.4.x |
| **[master](https://github.com/vesoft-inc/nebula-go/tree/master)** | 3.x-nightly |
| Client version | Nebula Service Version |
| :---------------------------------------------------------------------: | :--------------------: |
| **[v1.0.0](https://github.com/vesoft-inc/nebula-go/tree/v1.0)** | 1.x.x |
| **[v2.0.0-ga](https://github.com/vesoft-inc/nebula-go/tree/v2.0.0-ga)** | 2.0.0-ga, 2.0.1 |
| **[v2.5.1](https://github.com/vesoft-inc/nebula-go/tree/v2.5.1)** | 2.5.0 |
| **[v2.6.0](https://github.com/vesoft-inc/nebula-go/tree/v2.6.0)** | 2.6.0 |
| **[v3.0.0](https://github.com/vesoft-inc/nebula-go/tree/v3.0.0)** | 3.0.0 |
| **[v3.1.x](https://github.com/vesoft-inc/nebula-go/tree/v3.1.0)** | 3.1.x |
| **[v3.2.x](https://github.com/vesoft-inc/nebula-go/tree/v3.2.0)** | 3.1.x-3.2.x |
| **[v3.3.x](https://github.com/vesoft-inc/nebula-go/tree/v3.3.0)** | 3.1.x-3.3.x |
| **[v3.4.x](https://github.com/vesoft-inc/nebula-go/tree/v3.4.0)** | 3.1.x-3.4.x |
| **[master](https://github.com/vesoft-inc/nebula-go/tree/master)** | 3.x-nightly |

Please be careful not to modify the files in the nebula directory, these codes were all generated by fbthrift.

Expand All @@ -49,27 +49,27 @@ For example:
> go: github.com/vesoft-inc/nebula-go/v2 master => v2.0.0-20210506025434-97d4168c5c4d
> ```
>
> Here the `20210506025434-97d4168c5c4d` is a version tag auto-generated by Github using commit date and SHA.
> Here the `20210506025434-97d4168c5c4d` is a version tag auto-generated by GitHub using commit date and SHA.
> This should match the latest commit in the master branch.
## Usage example

[Simple Code Example](https://github.com/vesoft-inc/nebula-go/tree/master/examples/basic_example/graph_client_basic_example.go)

[Code Example with Gorountines](https://github.com/vesoft-inc/nebula-go/tree/master/examples/gorountines_example/graph_client_goroutines_example.go)
[Code Example with Goroutines](https://github.com/vesoft-inc/nebula-go/tree/master/examples/goroutines_example/graph_client_goroutines_example.go)

[Session Pool Example](https://github.com/vesoft-inc/nebula-go/blob/master/examples/session_pool_example/session_pool_example.go)

There are some limitations while using the session pool:
1. There MUST be an existing space in the DB before initializing the session pool.
2. Each session pool is corresponding to a single USER and a single Space. This is to ensure that the user's access control is consistent. i.g. The same user may have different access privileges in different spaces. If you need to run queries in different spaces, you may have multiple session pools.
3. Every time when sessinPool.execute() is called, the session will execute the query in the space set in the session pool config.
3. Every time when `sessionPool.Execute()` is called, the session will execute the query in the space set in the session pool config.
4. Commands that alter passwords or drop users should NOT be executed via session pool.

## Code of Conduct

This project and everyone participating in it is governed by the
[Vesoft Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are
This project and everyone participating in it is governed by the
[Vesoft Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are
expected to uphold this code.

## Licensing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,5 @@ func main() {
wg.Wait()

fmt.Print("\n")
log.Info("Nebula Go Client Gorountines Example Finished")
log.Info("Nebula Go Client Goroutines Example Finished")
}

0 comments on commit 94abfb9

Please sign in to comment.