Skip to content

Commit

Permalink
feat: Add get_prop_names methods for scan results
Browse files Browse the repository at this point in the history
  • Loading branch information
haoxins committed Jan 2, 2024
1 parent baca6f1 commit 20d095d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions nebula3/sclient/BaseResult.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ def as_node(self):

return Node(vertex).set_decode_type(self._decode_type)

def get_prop_names(self):
"""get all prop names from the vertex data
:return: list<string>
"""
return self._col_names[self.PROP_START_INDEX :]

def get_prop_values(self):
"""get all prop values from the vertex data
Expand Down Expand Up @@ -197,6 +204,13 @@ def as_relationship(self):

return Relationship(edge).set_decode_type(self._decode_type)

def get_prop_names(self):
"""get all prop names from the edge data
:return: list<string>
"""
return self._col_names[self.PROP_START_INDEX :]

def get_prop_values(self):
"""get all prop values from the edge data
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
'pytz >= 2021.1',
],
packages=find_packages(),
platforms=['3.6, 3.7'],
platforms=['3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12'],
package_dir={'nebula3': 'nebula3'},
)

0 comments on commit 20d095d

Please sign in to comment.