Skip to content

Commit 4942c39

Browse files
committed
docs(py): Document raises unsafe query error
1 parent 17148c5 commit 4942c39

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

pkg-py/src/querychat/_datasource.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,11 @@ def execute_query(self, query: str) -> pd.DataFrame:
262262
:
263263
Query results as pandas DataFrame
264264
265+
Raises
266+
------
267+
UnsafeQueryError
268+
If the query starts with a disallowed SQL operation
269+
265270
"""
266271
check_query(query)
267272
return self._conn.execute(query).df()
@@ -286,6 +291,8 @@ def test_query(
286291
287292
Raises
288293
------
294+
UnsafeQueryError
295+
If the query starts with a disallowed SQL operation
289296
MissingColumnsError
290297
If require_all_columns is True and result is missing required columns
291298
@@ -526,6 +533,11 @@ def execute_query(self, query: str) -> pd.DataFrame:
526533
:
527534
Query results as pandas DataFrame
528535
536+
Raises
537+
------
538+
UnsafeQueryError
539+
If the query starts with a disallowed SQL operation
540+
529541
"""
530542
check_query(query)
531543
with self._get_connection() as conn:
@@ -551,6 +563,8 @@ def test_query(
551563
552564
Raises
553565
------
566+
UnsafeQueryError
567+
If the query starts with a disallowed SQL operation
554568
MissingColumnsError
555569
If require_all_columns is True and result is missing required columns
556570

0 commit comments

Comments
 (0)