Skip to content

Commit

Permalink
moved docstrings into functions
Browse files Browse the repository at this point in the history
  • Loading branch information
DvirDukhan committed Jul 26, 2022
1 parent 4f1358a commit 6403620
Showing 1 changed file with 12 additions and 24 deletions.
36 changes: 12 additions & 24 deletions redis/commands/graph/query_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,74 +325,62 @@ def _get_value(prop, statistics):
def _get_stat(self, stat):
return self.statistics[stat] if stat in self.statistics else 0

"""Returns the number of labels added in the query"""

@property
def labels_added(self):
"""Returns the number of labels added in the query"""
return self._get_stat(LABELS_ADDED)

"""Returns the number of labels removed in the query"""

@property
def labels_removed(self):
"""Returns the number of labels removed in the query"""
return self._get_stat(LABELS_REMOVED)

"""Returns the number of nodes created in the query"""

@property
def nodes_created(self):
"""Returns the number of nodes created in the query"""
return self._get_stat(NODES_CREATED)

"""Returns the number of nodes deleted in the query"""

@property
def nodes_deleted(self):
"""Returns the number of nodes deleted in the query"""
return self._get_stat(NODES_DELETED)

"""Returns the number of properties set in the query"""

@property
def properties_set(self):
"""Returns the number of properties set in the query"""
return self._get_stat(PROPERTIES_SET)

"""Returns the number of properties removed in the query"""

@property
def properties_removed(self):
"""Returns the number of properties removed in the query"""
return self._get_stat(PROPERTIES_REMOVED)

"""Returns the number of relationships created in the query"""

@property
def relationships_created(self):
"""Returns the number of relationships created in the query"""
return self._get_stat(RELATIONSHIPS_CREATED)

"""Returns the number of relationships deleted in the query"""

@property
def relationships_deleted(self):
"""Returns the number of relationships deleted in the query"""
return self._get_stat(RELATIONSHIPS_DELETED)

"""Returns the number of indices created in the query"""

@property
def indices_created(self):
"""Returns the number of indices created in the query"""
return self._get_stat(INDICES_CREATED)

"""Returns the number of indices deleted in the query"""

@property
def indices_deleted(self):
"""Returns the number of indices deleted in the query"""
return self._get_stat(INDICES_DELETED)

"""Returns whether or not the query execution plan was cached"""

@property
def cached_execution(self):
"""Returns whether or not the query execution plan was cached"""
return self._get_stat(CACHED_EXECUTION) == 1

"""Returns the server execution time of the query"""

@property
def run_time_ms(self):
"""Returns the server execution time of the query"""
return self._get_stat(INTERNAL_EXECUTION_TIME)

0 comments on commit 6403620

Please sign in to comment.