Skip to content

Commit b9fd1a5

Browse files
Lingling PengLingling Peng
authored andcommitted
edit docstring; add concrete type constant
1 parent 9a6fe4f commit b9fd1a5

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

synapseclient/core/constants/concrete_types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,5 @@
103103
QUERY_BUNDLE_REQUEST = "org.sagebionetworks.repo.model.table.QueryBundleRequest"
104104

105105
QUERY_RESULT = "org.sagebionetworks.repo.model.table.QueryResult"
106+
107+
QUERY_TABLE_CSV_RESULT = "org.sagebionetworks.repo.model.table.DownloadFromTableResult"

synapseclient/models/mixins/table_components.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ async def _query_table_csv(
194194
quote_character: The character used for quoting fields in the CSV.
195195
The default is a double quote (").
196196
escape_character: The character used for escaping special characters in the CSV.
197-
The default is a backslash (\).
197+
The default character '\\' will be used if this is not provided by the caller.
198198
line_end: The string used to separate lines in the CSV.
199199
The default is the system's line separator.
200200
separator: The character used to separate fields in the CSV.
@@ -312,7 +312,6 @@ async def _query_table_row_set(
312312
Args:
313313
query (str): The SQL query string to execute.
314314
synapse (Synapse): An authenticated Synapse client instance.
315-
synapse (Synapse): An authenticated Synapse client instance.
316315
limit (int, optional): Maximum number of rows to return. Defaults to None.
317316
offset (int, optional): Number of rows to skip before starting to return rows. Defaults to None.
318317
part_mask (optional): Bit mask to specify which parts of the query result bundle to return. See Synapse REST docs for details.

synapseclient/models/table_components.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
QUERY_BUNDLE_REQUEST,
2323
QUERY_RESULT,
2424
QUERY_TABLE_CSV_REQUEST,
25+
QUERY_TABLE_CSV_RESULT,
2526
)
2627
from synapseclient.core.utils import delete_none_keys, from_unix_epoch_time
2728
from synapseclient.models.mixins.asynchronous_job import AsynchronousCommunicator
@@ -928,7 +929,7 @@ class QueryJob(AsynchronousCommunicator):
928929
headers: Optional[List[SelectColumn]] = None
929930
"""The column headers from the query result"""
930931

931-
response_concrete_type: Optional[str] = None
932+
response_concrete_type: Optional[str] = QUERY_TABLE_CSV_RESULT
932933
"""The concrete type of the response (usually DownloadFromTableResult)"""
933934

934935
def to_synapse_request(self) -> Dict[str, Any]:

0 commit comments

Comments
 (0)