Skip to content

Commit

Permalink
Added example into "denormalize" function's docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
vmagamedov committed Sep 22, 2016
1 parent a515acf commit 31961ea
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hiku/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ def denormalize(graph, result, query):
This hierarchical structure will follow query structure.
Example::
query = hiku.readers.simple.read('[:foo]')
norm_result = hiku_engine.execute(graph, query)
result = hiku.result.denormalize(graph, norm_result, query)
assert result == {'foo': 'value'}
:param graph: :py:class:`~hiku.graph.Graph` definition
:param result: result of the query
:param query: executed query, instance of the :py:class:`~hiku.query.Edge`
Expand Down

0 comments on commit 31961ea

Please sign in to comment.