Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions bulbs/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,17 @@ def map(self):
log.debug("This is deprecated; use data() instead.")
return self.data()

def custom_step(self,script,params={}):
"""
Execute a custom gremlin step starting from the current element.
Do not use "_id" as a key in params.
e.g.: >>> node.custom_step('outE(x).bothV',{'x':'A'})
"""
full_script = 'g.v(_id).'+script
params['_id']=self._id
resp = self._client.gremlin(full_script,params)
return initialize_elements(self._client,resp)



#
Expand Down