MCPcopy Create free account
hub / github.com/couchbase/couchbase-python-client / QueryOptions

Class QueryOptions

couchbase/options.py:1510–1561  ·  view source on GitHub ↗

Available options to for a N1QL (SQL++) query. .. warning:: Importing options from ``couchbase.cluster`` is deprecated. All options should be imported from ``couchbase.options``. Args: timeout (timedelta, optional): The timeout for this operation. Defaults to global

Source from the content-addressed store, hash-verified

1508
1509
1510class QueryOptions(QueryOptionsBase):
1511 """Available options to for a N1QL (SQL++) query.
1512
1513 .. warning::
1514 Importing options from ``couchbase.cluster`` is deprecated.
1515 All options should be imported from ``couchbase.options``.
1516
1517 Args:
1518 timeout (timedelta, optional): The timeout for this operation. Defaults to global
1519 query operation timeout.
1520 read_only (bool, optional): Specifies that this query should be executed in read-only mode,
1521 disabling the ability for the query to make any changes to the data. Defaults to False.
1522 scan_consistency (:class:`~couchbase.n1ql.QueryScanConsistency`, optional): Specifies the consistency
1523 requirements when executing the query.
1524 adhoc (bool, optional): Specifies whether this is an ad-hoc query, or if it should be prepared for
1525 faster execution in the future. Defaults to True.
1526 client_context_id (str, optional): The returned client context id for this query. Defaults to None.
1527 max_parallelism (int, optional): This is an advanced option, see the query service reference for more
1528 information on the proper use and tuning of this option. Defaults to None.
1529 positional_parameters (Iterable[JSONType], optional): Positional values to be used for the placeholders
1530 within the query. Defaults to None.
1531 named_parameters (Iterable[Dict[str, JSONType]], optional): Named values to be used for the placeholders
1532 within the query. Defaults to None.
1533 pipeline_batch (int, optional): This is an advanced option, see the query service reference for more
1534 information on the proper use and tuning of this option. Defaults to None.
1535 pipeline_cap (int, optional): This is an advanced option, see the query service reference for more
1536 information on the proper use and tuning of this option. Defaults to None.
1537 profile (:class:`~couchbase.n1ql.QueryProfile`, optional): Specifies the level of profiling that should
1538 be used for the query. Defaults to `Off`.
1539 query_context (str, optional): Specifies the context within which this query should be executed. This can
1540 be scoped to a scope or a collection within the dataset. Defaults to None.
1541 scan_cap (int, optional): This is an advanced option, see the query service reference for more
1542 information on the proper use and tuning of this option. Defaults to None.
1543 scan_wait (timedelta, optional): This is an advanced option, see the query service reference for more
1544 information on the proper use and tuning of this option. Defaults to None.
1545 metrics (bool, optional): Specifies whether metrics should be captured as part of the execution of the query.
1546 Defaults to False.
1547 flex_index (bool, optional): Specifies whether flex-indexes should be enabled. Allowing the use of full-text
1548 search from the query service. Defaults to False.
1549 preserve_expiry (bool, optional): Specifies that any existing expiry on the document should be preserved.
1550 Defaults to False.
1551 use_replica (bool, optional): Specifies that the query engine should use replica nodes for KV fetches if the
1552 active node is down. Defaults to None.
1553 consistent_with (:class:`~couchbase.mutation_state.MutationState`, optional): Specifies a
1554 :class:`~couchbase.mutation_state.MutationState` which the query should be consistent with. Defaults to
1555 None.
1556 serializer (:class:`~couchbase.serializer.Serializer`, optional): Specifies an explicit serializer
1557 to use for this specific N1QL operation. Defaults to
1558 :class:`~couchbase.serializer.DefaultJsonSerializer`.
1559 raw (Dict[str, Any], optional): Specifies any additional parameters which should be passed to the query engine
1560 when executing the query. Defaults to None.
1561 """
1562
1563
1564class AnalyticsOptions(AnalyticsOptionsBase):

Callers 15

build_query_requestMethod · 0.90
create_query_objectMethod · 0.90
test_consistent_withMethod · 0.90
test_params_adhocMethod · 0.90
test_params_baseMethod · 0.90
test_params_metricsMethod · 0.90

Calls

no outgoing calls