@@ -29,7 +29,7 @@ def __init__(self, driver, session_state, session, tx_mode):
29
29
30
30
:param driver: A driver instance
31
31
:param session_state: A state of session
32
- :param tx_mode: Transaction mode, which is a one from the following choises :
32
+ :param tx_mode: Transaction mode, which is a one from the following choices :
33
33
1) QuerySerializableReadWrite() which is default mode;
34
34
2) QueryOnlineReadOnly(allow_inconsistent_reads=False);
35
35
3) QuerySnapshotReadOnly();
@@ -142,32 +142,40 @@ async def execute(
142
142
exec_mode : Optional [base .QueryExecMode ] = None ,
143
143
concurrent_result_sets : Optional [bool ] = False ,
144
144
settings : Optional [BaseRequestSettings ] = None ,
145
+ * ,
146
+ stats_mode : Optional [base .QueryStatsMode ] = None ,
145
147
) -> AsyncResponseContextIterator :
146
148
"""Sends a query to Query Service
147
149
148
150
:param query: (YQL or SQL text) to be executed.
149
151
:param parameters: dict with parameters and YDB types;
150
152
:param commit_tx: A special flag that allows transaction commit.
151
- :param syntax: Syntax of the query, which is a one from the following choises :
153
+ :param syntax: Syntax of the query, which is a one from the following choices :
152
154
1) QuerySyntax.YQL_V1, which is default;
153
155
2) QuerySyntax.PG.
154
- :param exec_mode: Exec mode of the query, which is a one from the following choises :
156
+ :param exec_mode: Exec mode of the query, which is a one from the following choices :
155
157
1) QueryExecMode.EXECUTE, which is default;
156
158
2) QueryExecMode.EXPLAIN;
157
159
3) QueryExecMode.VALIDATE;
158
160
4) QueryExecMode.PARSE.
159
161
:param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False;
162
+ :param stats_mode: Mode of query statistics to gather, which is a one from the following choices:
163
+ 1) QueryStatsMode:NONE, which is default;
164
+ 2) QueryStatsMode.BASIC;
165
+ 3) QueryStatsMode.FULL;
166
+ 4) QueryStatsMode.PROFILE;
160
167
161
168
:return: Iterator with result sets
162
169
"""
163
170
await self ._ensure_prev_stream_finished ()
164
171
165
172
stream_it = await self ._execute_call (
166
173
query = query ,
174
+ parameters = parameters ,
167
175
commit_tx = commit_tx ,
168
176
syntax = syntax ,
169
177
exec_mode = exec_mode ,
170
- parameters = parameters ,
178
+ stats_mode = stats_mode ,
171
179
concurrent_result_sets = concurrent_result_sets ,
172
180
settings = settings ,
173
181
)
0 commit comments