@@ -174,7 +174,9 @@ def execute(self,
174
174
intermediate_commit_size = None ,
175
175
satellite_sync_wait = None ,
176
176
read_collections = None ,
177
- write_collections = None ):
177
+ write_collections = None ,
178
+ stream = None ,
179
+ skip_inaccessible_cols = None ):
178
180
"""Execute the query and return the result cursor.
179
181
180
182
:param query: Query to execute.
@@ -231,7 +233,7 @@ def execute(self,
231
233
:type intermediate_commit_size: int
232
234
:param satellite_sync_wait: Number of seconds in which the server must
233
235
synchronize the satellite collections involved in the query. When
234
- the threshold is reached, the query is stopped. Applies only to
236
+ the threshold is reached, the query is stopped. Available only for
235
237
enterprise version of ArangoDB.
236
238
:type satellite_sync_wait: int | float
237
239
:param read_collections: Names of collections read during query
@@ -240,6 +242,28 @@ def execute(self,
240
242
:param write_collections: Names of collections written to during query
241
243
execution. Required for :doc:`transactions <transaction>`.
242
244
:type write_collections: [str | unicode]
245
+ :param stream: If set to True, query is executed in streaming fashion:
246
+ query result is not stored server-side but calculated on the fly.
247
+ Note: long-running queries hold collection locks for as long as the
248
+ cursor exists. If set to False, query is executed right away in its
249
+ entirety. Results are either returned right away (if the result set
250
+ is small enough), or stored server-side and accessible via cursors
251
+ (while respecting the ttl). You should use this parameter only for
252
+ short-running queries or without exclusive locks (write-locks on
253
+ MMFiles). Note: parameters **cache**, **count** and **full_count**
254
+ do not work for streaming queries. Query statistics, warnings and
255
+ profiling data are made available only after the query is finished.
256
+ Default value is False.
257
+ :type stream: bool
258
+ :param skip_inaccessible_cols: If set to True, collections without user
259
+ access are skipped, and query executes normally instead of raising
260
+ an error. This helps certain use cases: a graph may contain several
261
+ collections, and users with different access levels may execute the
262
+ same query. This parameter lets you limit the result set by user
263
+ access. Cannot be used in :doc:`transactions <transaction>` and is
264
+ available only for enterprise version of ArangoDB. Default value is
265
+ False.
266
+ :type skip_inaccessible_cols: bool
243
267
:return: Result cursor.
244
268
:rtype: arango.cursor.Cursor
245
269
:raise arango.exceptions.AQLQueryExecuteError: If execute fails.
@@ -277,6 +301,11 @@ def execute(self,
277
301
options ['intermediateCommitSize' ] = intermediate_commit_size
278
302
if satellite_sync_wait is not None :
279
303
options ['satelliteSyncWait' ] = satellite_sync_wait
304
+ if stream is not None :
305
+ options ['stream' ] = stream
306
+ if skip_inaccessible_cols is not None :
307
+ options ['skipInaccessibleCollections' ] = skip_inaccessible_cols
308
+
280
309
if options :
281
310
data ['options' ] = options
282
311
data .update (options )
0 commit comments