-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial revision of the two-level graphs documentation
- Loading branch information
1 parent
57d0500
commit 94b3681
Showing
5 changed files
with
79 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ User's Guide | |
:maxdepth: 2 | ||
|
||
introduction | ||
sqlalchemy | ||
database | ||
subgraph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
Two-level graph | ||
=============== | ||
|
||
Two-level graph is a way to express business-logic once and provide it | ||
on-demand. | ||
|
||
Prerequisites | ||
~~~~~~~~~~~~~ | ||
|
||
In order to show this feature we will try to adapt our | ||
:doc:`previous example <database>`, ``actor`` table was removed and ``image`` | ||
table was added: | ||
|
||
.. literalinclude:: subgraph.py | ||
:lines: 3-36 | ||
|
||
Low-level graph definition | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. literalinclude:: subgraph.py | ||
:lines: 40-79 | ||
:linenos: | ||
:emphasize-lines: 33-34 | ||
|
||
Test helper: | ||
|
||
.. literalinclude:: subgraph.py | ||
:lines: 83-94 | ||
|
||
Test: | ||
|
||
.. literalinclude:: subgraph.py | ||
:lines: 97-104 | ||
:dedent: 4 | ||
|
||
High-level graph definition | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. literalinclude:: subgraph.py | ||
:lines: 108-134 | ||
|
||
Test: | ||
|
||
.. literalinclude:: subgraph.py | ||
:lines: 139-149 | ||
:dedent: 4 |