Skip to content

Commit

Permalink
Update readme for v3.4 release (#250)
Browse files Browse the repository at this point in the history
* Fix format

* Update README
  • Loading branch information
Aiee authored Feb 6, 2023
1 parent cc22333 commit 2aa065d
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 117 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**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.**

Official Nebula Go client which communicates with the server using [fbthrift](https://github.com/facebook/fbthrift/). Currently the latest stable release is **[v3.3.0](https://github.com/vesoft-inc/nebula-go/tree/release-v3.3)**
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.
Expand All @@ -22,6 +22,7 @@ To Use the console with a stable release of NebulaGraph, please check the branch
| **[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 @@ -37,7 +38,7 @@ $ go get -u -v github.com/vesoft-inc/nebula-go/v3@master
You can specify the version of Nebula-go by substituting `<tag>` in `$ go get -u -v github.com/vesoft-inc/nebula-go@<tag>`.
For example:

for v3: `$ go get -u -v github.com/vesoft-inc/nebula-go/v3@v3.3.0`
for v3: `$ go get -u -v github.com/vesoft-inc/nebula-go/v3@v3.4.0`

for v2: `$ go get -u -v github.com/vesoft-inc/nebula-go/[email protected]`

Expand Down
112 changes: 57 additions & 55 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,62 +103,64 @@ func (session *Session) Execute(stmt string) (*ResultSet, error) {

// ExecuteJson returns the result of the given query as a json string
// Date and Datetime will be returned in UTC
//
// JSON struct:
// {
// "results":[
// {
// "columns":[
// ],
// "data":[
// {
// "row":[
// "row-data"
// ],
// "meta":[
// "metadata"
// ]
// }
// ],
// "latencyInUs":0,
// "spaceName":"",
// "planDesc ":{
// "planNodeDescs":[
// {
// "name":"",
// "id":0,
// "outputVar":"",
// "description":{
// "key":""
// },
// "profiles":[
// {
// "rows":1,
// "execDurationInUs":0,
// "totalDurationInUs":0,
// "otherStats":{}
// }
// ],
// "branchInfo":{
// "isDoBranch":false,
// "conditionNodeId":-1
// },
// "dependencies":[]
// }
// ],
// "nodeIndexMap":{},
// "format":"",
// "optimize_time_in_us":0
// },
// "comment ":""
// }
// ],
// "errors":[
// {
// "code": 0,
// "message": ""
// }
// ]
// }
//
// {
// "results":[
// {
// "columns":[
// ],
// "data":[
// {
// "row":[
// "row-data"
// ],
// "meta":[
// "metadata"
// ]
// }
// ],
// "latencyInUs":0,
// "spaceName":"",
// "planDesc ":{
// "planNodeDescs":[
// {
// "name":"",
// "id":0,
// "outputVar":"",
// "description":{
// "key":""
// },
// "profiles":[
// {
// "rows":1,
// "execDurationInUs":0,
// "totalDurationInUs":0,
// "otherStats":{}
// }
// ],
// "branchInfo":{
// "isDoBranch":false,
// "conditionNodeId":-1
// },
// "dependencies":[]
// }
// ],
// "nodeIndexMap":{},
// "format":"",
// "optimize_time_in_us":0
// },
// "comment ":""
// }
// ],
// "errors":[
// {
// "code": 0,
// "message": ""
// }
// ]
// }
func (session *Session) ExecuteJson(stmt string) ([]byte, error) {
return session.ExecuteJsonWithParameter(stmt, map[string]interface{}{})
}
Expand Down
114 changes: 58 additions & 56 deletions session_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,70 +146,72 @@ func (pool *SessionPool) ExecuteWithParameter(stmt string, params map[string]int

// ExecuteJson returns the result of the given query as a json string
// Date and Datetime will be returned in UTC
//
// JSON struct:
// {
// "results":[
// {
// "columns":[
// ],
// "data":[
// {
// "row":[
// "row-data"
// ],
// "meta":[
// "metadata"
// ]
// }
// ],
// "latencyInUs":0,
// "spaceName":"",
// "planDesc ":{
// "planNodeDescs":[
// {
// "name":"",
// "id":0,
// "outputVar":"",
// "description":{
// "key":""
// },
// "profiles":[
// {
// "rows":1,
// "execDurationInUs":0,
// "totalDurationInUs":0,
// "otherStats":{}
// }
// ],
// "branchInfo":{
// "isDoBranch":false,
// "conditionNodeId":-1
// },
// "dependencies":[]
// }
// ],
// "nodeIndexMap":{},
// "format":"",
// "optimize_time_in_us":0
// },
// "comment ":""
// }
// ],
// "errors":[
// {
// "code": 0,
// "message": ""
// }
// ]
// }
//
// {
// "results":[
// {
// "columns":[
// ],
// "data":[
// {
// "row":[
// "row-data"
// ],
// "meta":[
// "metadata"
// ]
// }
// ],
// "latencyInUs":0,
// "spaceName":"",
// "planDesc ":{
// "planNodeDescs":[
// {
// "name":"",
// "id":0,
// "outputVar":"",
// "description":{
// "key":""
// },
// "profiles":[
// {
// "rows":1,
// "execDurationInUs":0,
// "totalDurationInUs":0,
// "otherStats":{}
// }
// ],
// "branchInfo":{
// "isDoBranch":false,
// "conditionNodeId":-1
// },
// "dependencies":[]
// }
// ],
// "nodeIndexMap":{},
// "format":"",
// "optimize_time_in_us":0
// },
// "comment ":""
// }
// ],
// "errors":[
// {
// "code": 0,
// "message": ""
// }
// ]
// }
func (pool *SessionPool) ExecuteJson(stmt string) ([]byte, error) {
return pool.ExecuteJsonWithParameter(stmt, map[string]interface{}{})
}

// ExecuteJson returns the result of the given query as a json string
// Date and Datetime will be returned in UTC
// The result is a JSON string in the same format as ExecuteJson()
//TODO(Aiee) check the space name
// TODO(Aiee) check the space name
func (pool *SessionPool) ExecuteJsonWithParameter(stmt string, params map[string]interface{}) ([]byte, error) {
return nil, fmt.Errorf("not implemented")

Expand Down
8 changes: 4 additions & 4 deletions value_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,10 @@ func (valWrap ValueWrapper) GetType() string {
//
// Maps in the output will be sorted by key value in alphabetical order.
//
// For vetex, the output is in form (vid: tagName{propKey: propVal, propKey2, propVal2}),
// For edge, the output is in form (SrcVid)-[name]->(DstVid)@Ranking{prop1: val1, prop2: val2}
// where arrow direction depends on edgeType.
// For path, the output is in form (v1)-[name@edgeRanking]->(v2)-[name@edgeRanking]->(v3)
// For vetex, the output is in form (vid: tagName{propKey: propVal, propKey2, propVal2}),
// For edge, the output is in form (SrcVid)-[name]->(DstVid)@Ranking{prop1: val1, prop2: val2}
// where arrow direction depends on edgeType.
// For path, the output is in form (v1)-[name@edgeRanking]->(v2)-[name@edgeRanking]->(v3)
//
// For time, and dateTime, String returns the value calculated using the timezone offset
// from graph service by default.
Expand Down

0 comments on commit 2aa065d

Please sign in to comment.