diff options
Diffstat (limited to 'docs/reference/libtracker-sparql/examples.md')
-rw-r--r-- | docs/reference/libtracker-sparql/examples.md | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/docs/reference/libtracker-sparql/examples.md b/docs/reference/libtracker-sparql/examples.md index d544838e5..710ad8702 100644 --- a/docs/reference/libtracker-sparql/examples.md +++ b/docs/reference/libtracker-sparql/examples.md @@ -34,11 +34,16 @@ main loop is not blocked while these operations are executed. Once you end up with the query, remember to call [](tracker_sparql_cursor_close). The same applies to [](tracker_sparql_connection_close) when no longer needed. -<div class="gi-lang-c gi-lang-python gi-lang-javascript"> +<div class="gi-lang-c gi-lang-javascript"> {{ examples/connection-example.c }} </div> +<div class="gi-lang-python"> + +{{ examples/connection-example.py }} + +</div> ## Creating a private database @@ -60,11 +65,16 @@ main loop is not blocked while these operations are executed. Once you no longer need the connection, remember to call [](tracker_sparql_connection_close) on the [](TrackerSparqlConnection). -<div class="gi-lang-c gi-lang-python gi-lang-javascript"> +<div class="gi-lang-c gi-lang-javascript"> {{ examples/private-store-example.c }} </div> +<div class="gi-lang-python"> + +{{ examples/private-store-example.py }} + +</div> ## Creating a SPARQL endpoint @@ -77,11 +87,16 @@ concretely the creation of a D-Bus endpoint, that other applications may query e.g. through a connection created with [](tracker_sparql_connection_bus_new). -<div class="gi-lang-c gi-lang-python gi-lang-javascript"> +<div class="gi-lang-c gi-lang-javascript"> {{ examples/endpoint-example.c }} </div> +<div class="gi-lang-python"> + +{{ examples/endpoint-example.py }} + +</div> ## Receiving notification on changes @@ -94,8 +109,13 @@ on changes of certain RDF classes (Those with the This example demonstrates the use of [](TrackerNotifier) to receive notifications on database updates. -<div class="gi-lang-c gi-lang-python gi-lang-javascript"> +<div class="gi-lang-c gi-lang-javascript"> {{ examples/notifier-example.c }} </div> +<div class="gi-lang-python"> + +{{ examples/notifier-example.py }} + +</div> |