Skip to content

Commit 27146e5

Browse files
authored
Merge pull request #137 from SebastianDWT/sprints_terminus_sebastian
dataframe_doc
2 parents 8454edb + 4160a4f commit 27146e5

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

terminusdb_client/woqldataframe/woqlDataframe.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,36 @@
1515

1616

1717
class EmptyException(Exception):
18+
""" Exception inherited from the built-in Exception Class
19+
20+
Parameters
21+
----------
22+
msg : str
23+
Error message that is describing the exception
24+
25+
Raises
26+
------
27+
EmptyException
28+
If the result table of the query is empty
29+
30+
"""
1831
pass
1932

2033

2134
def _is_empty(query):
35+
"""Checks if the result table of a query is empty
36+
37+
Parameters
38+
----------
39+
query : dict
40+
JSON of the result of the query
41+
42+
Returns
43+
-------
44+
bool
45+
TRUE if the result table is empty, else FALSE
46+
47+
"""
2248
return len(query["bindings"]) == 0
2349

2450

0 commit comments

Comments
 (0)