QueryOptions: { allowDirtyRead?: boolean; batchSize?: number; cache?: boolean; count?: boolean; failOnWarning?: boolean; fillBlockCache?: boolean; fullCount?: boolean; intermediateCommitCount?: number; intermediateCommitSize?: number; maxNodesPerCallstack?: number; maxPlans?: number; maxRuntime?: number; maxTransactionSize?: number; maxWarningsCount?: number; memoryLimit?: number; optimizer?: { rules: string[] }; profile?: boolean | number; retryOnConflict?: number; satelliteSyncWait?: number; skipInaccessibleCollections?: boolean; stream?: boolean; timeout?: number; ttl?: number }

Options for executing a query.

See query.

Type declaration

  • Optional allowDirtyRead?: boolean

    If set to true, the query will be executed with support for dirty reads enabled, permitting ArangoDB to return a potentially dirty or stale result and arangojs will load balance the request without distinguishing between leaders and followers.

    Note that dirty reads are only supported for read-only queries, not data modification queries (e.g. using INSERT, UPDATE, REPLACE or REMOVE) and only when using ArangoDB 3.4 or later.

    Default: false

  • Optional batchSize?: number

    Number of result values to be transferred by the server in each network roundtrip (or "batch").

    Must be greater than zero.

  • Optional cache?: boolean

    If set to false, the AQL query results cache lookup will be skipped for this query.

    Default: true

  • Optional count?: boolean

    Unless set to false, the number of result values in the result set will be returned in the count attribute. This may be disabled by default in a future version of ArangoDB if calculating this value has a performance impact for some queries.

    Default: true.

  • Optional failOnWarning?: boolean

    If set to true, the query will throw an exception and abort if it would otherwise produce a warning.

  • Optional fillBlockCache?: boolean

    If set to false, the query data will not be stored in the RocksDB block cache. This can be used to avoid thrashing he block cache when reading a lot of data.

  • Optional fullCount?: boolean

    If set to true and the query has a LIMIT clause, the total number of values matched before the last top-level LIMIT in the query was applied will be returned in the extra.stats.fullCount attribute.

  • Optional intermediateCommitCount?: number

    (RocksDB only.) Maximum number of operations after which an intermediate commit is automatically performed.

  • Optional intermediateCommitSize?: number

    (RocksDB only.) Maximum total size of operations in bytes after which an intermediate commit is automatically performed.

  • Optional maxNodesPerCallstack?: number

    Controls after how many execution nodes in a query a stack split should be performed.

    Default: 250 (200 on macOS)

  • Optional maxPlans?: number

    Limits the maximum number of plans that will be created by the AQL query optimizer.

  • Optional maxRuntime?: number

    Maximum allowed execution time before the query will be killed in seconds.

    If set to 0, the query will be allowed to run indefinitely.

    Default: 0

  • Optional maxTransactionSize?: number

    (RocksDB only.) Maximum size of transactions in bytes.

  • Optional maxWarningsCount?: number

    Limits the maximum number of warnings a query will return.

  • Optional memoryLimit?: number

    Maximum memory size in bytes that the query is allowed to use. Exceeding this value will result in the query failing with an error.

    If set to 0, the memory limit is disabled.

    Default: 0

  • Optional optimizer?: { rules: string[] }

    An object with a rules property specifying a list of optimizer rules to be included or excluded by the optimizer for this query. Prefix a rule name with + to include it, or - to exclude it. The name all acts as an alias matching all optimizer rules.

    • rules: string[]
  • Optional profile?: boolean | number

    If set to 1 or true, additional query profiling information will be returned in the extra.profile attribute if the query is not served from the result cache.

    If set to 2, the query will return execution stats per query plan node in the extra.stats.nodes attribute. Additionally the query plan is returned in extra.plan.

  • Optional retryOnConflict?: number

    If set to a positive number, the query will automatically be retried at most this many times if it results in a write-write conflict.

    Default: 0

  • Optional satelliteSyncWait?: number

    (Enterprise Edition cluster only.) Limits the maximum time in seconds a DBServer will wait to bring satellite collections involved in the query into sync. Exceeding this value will result in the query being stopped.

    Default: 60

  • Optional skipInaccessibleCollections?: boolean

    (Enterprise Edition cluster only.) If set to true, collections inaccessible to current user will result in an access error instead of being treated as empty.

  • Optional stream?: boolean

    If set to true, the query will be executed as a streaming query.

  • Optional timeout?: number

    Maximum time in milliseconds arangojs will wait for a server response. Exceeding this value will result in the request being cancelled.

    Note: Setting a timeout for the client does not guarantee the query will be killed by ArangoDB if it is already being executed. See the maxRuntime option for limiting the execution time within ArangoDB.

  • Optional ttl?: number

    Time-to-live for the cursor in seconds. The cursor results may be garbage collected by ArangoDB after this much time has passed.

    Default: 30

Generated using TypeDoc