Closed haoxins closed 8 months ago
Thanks @haoxins !
This lead to the method properties(tag) in Node must provide the name of tag.
In the graph client case, a node could be multi-tagged but there are no multi-typed edges, thus those wrappers came with the nature that the node's properties are tag-key-mapped.
I think this as_node() is trying to align the data object of both g-client and s-client.
What is your suggestion to enable the ease of getting properties of tag in Node object from s-client?
BTW, it seems that https://github.com/vesoft-inc/nebula-python/blob/master/nebula3/data/DataObject.py#L1342 is not used any more?
You are right, that's a dead function of the class as for now.
I guess it's due to we have to manipulate edge.type(when it's a negative value, meaning this is scanned from the dst vertex's part), so we need that to instantiate the relationship, and for the node case, passing the vertex for the init is enough.
thanks for the explanation I raised a PR to make the tag param optional https://github.com/vesoft-inc/nebula-python/pull/302/files
thanks for the explanation I raised a PR to make the tag param optional https://github.com/vesoft-inc/nebula-python/pull/302/files
I loved your implementation 👍
Hi,
When we call
as_node()
fromVertexData
, https://github.com/vesoft-inc/nebula-python/blob/master/nebula3/sclient/BaseResult.py#L80 we define atags
to containtag
, but the list length always be1
. This lead to the methodproperties(tag)
inNode
must provide the name of tag. This is unnecessary and different fromRelationship
, https://github.com/vesoft-inc/nebula-python/blob/master/nebula3/data/DataObject.py#L1519BTW, it seems that https://github.com/vesoft-inc/nebula-python/blob/master/nebula3/data/DataObject.py#L1342 is not used any more?
So my question is that can we change the method
properties(tag)
inNode
, and then the signature will same asRelationship
.