diff --git a/README.md b/README.md index 7075a8f6..037d8471 100644 --- a/README.md +++ b/README.md @@ -141,5 +141,6 @@ while resp.has_next(): | Nebula2-Python Version | NebulaGraph Version | |---|---| | 2.0.0.post1 | 2.0.0beta | -| 2.0.0rc1 | 2.0.0-RC1 | +| 2.0.0rc1 | 2.0.0-rc1 | +| 2.0.0ga | 2.0.0-ga | diff --git a/example/GraphClientSimpleExample.py b/example/GraphClientSimpleExample.py index 39601b3b..812c56ea 100644 --- a/example/GraphClientSimpleExample.py +++ b/example/GraphClientSimpleExample.py @@ -6,10 +6,8 @@ # This source code is licensed under Apache 2.0 License, # attached with Common Clause Condition 1.0, found in the LICENSES directory. -import sys import time - from nebula2.gclient.net import ConnectionPool from nebula2.Config import Config from FormatResp import print_resp @@ -34,13 +32,23 @@ time.sleep(6) # insert vertex - resp = client.execute('INSERT VERTEX person(name, age) VALUES "Bob":("Bob", 10)') + resp = client.execute('INSERT VERTEX person(name, age) VALUES "Bob":("Bob", 10), "Lily":("Lily", 9)') + assert resp.is_succeeded(), resp.error_msg() + + # Insert edges + client.execute('INSERT EDGE like(likeness) VALUES "Bob"->"Lily":(80.0);') + assert resp.is_succeeded(), resp.error_msg() + assert resp.is_succeeded(), resp.error_msg() resp = client.execute('FETCH PROP ON person "Bob"') assert resp.is_succeeded(), resp.error_msg() print_resp(resp) + resp = client.execute('FETCH PROP ON like "Bob"->"Lily"') + assert resp.is_succeeded(), resp.error_msg() + print_resp(resp) + except Exception as x: import traceback print(traceback.format_exc()) diff --git a/nebula2/graph/ttypes.py b/nebula2/graph/ttypes.py index 483680eb..d652d345 100644 --- a/nebula2/graph/ttypes.py +++ b/nebula2/graph/ttypes.py @@ -48,6 +48,7 @@ class ErrorCode: E_BAD_PERMISSION = -11 E_SEMANTIC_ERROR = -12 E_TOO_MANY_CONNECTIONS = -13 + E_PARTIAL_SUCCEEDED = -14 _VALUES_TO_NAMES = { 0: "SUCCEEDED", @@ -64,6 +65,7 @@ class ErrorCode: -11: "E_BAD_PERMISSION", -12: "E_SEMANTIC_ERROR", -13: "E_TOO_MANY_CONNECTIONS", + -14: "E_PARTIAL_SUCCEEDED", } _NAMES_TO_VALUES = { @@ -81,6 +83,7 @@ class ErrorCode: "E_BAD_PERMISSION": -11, "E_SEMANTIC_ERROR": -12, "E_TOO_MANY_CONNECTIONS": -13, + "E_PARTIAL_SUCCEEDED": -14, } class ProfilingStats: diff --git a/setup.py b/setup.py index c1a47e3c..63b04d5d 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name='nebula2-python', - version='2.0.0rc1', + version='2.0.0ga', license="Apache 2.0 + Common Clause 1.0", author='vesoft-inc', author_email='info@vesoft.com', @@ -18,10 +18,8 @@ url='https://github.com/vesoft-inc/nebula-python', install_requires=['httplib2', 'future', - 'six', - 'futures; python_version == "2.7"'], + 'six'], packages=find_packages(), - platforms=["2.7, 3.5, 3.7"], - package_dir={'nebula2': 'nebula2', - 'thirft': 'thirft'}, + platforms=["3.5, 3.7"], + package_dir={'nebula2': 'nebula2'}, )