From c4540ed8b9ad02372783d03c2bcd47eec340d74a Mon Sep 17 00:00:00 2001
From: Romin <15949-romin.benfer@users.noreply.git.rwth-aachen.de>
Date: Mon, 4 Nov 2024 16:52:24 +0100
Subject: [PATCH] add docstring

---
 src/coscine/metadata.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/coscine/metadata.py b/src/coscine/metadata.py
index 6858706..6e284dc 100644
--- a/src/coscine/metadata.py
+++ b/src/coscine/metadata.py
@@ -688,6 +688,13 @@ class QueryResult:
         Computes the union between a list of files, a file (coscine.FileObject)
         property and the property reflected in the SPARQL query result
         identified via the column it appears in.
+
+        Example
+        -------
+        result = resource.query(r"SELECT ?path ?p ?o WHERE { ?path ?p ?o . }")
+        files = resource.files(recursive=True)
+        for f in result.union(files, coscine.FileObject.uri, "path"):
+            print(f.name)
         """
         result = []
         column_index = self.headers.index(column)
-- 
GitLab