TODO
TODO
Options for creating a database. See Database.createDatabase.
(Cluster only.) Default write concern for new collections created in this database.
(Cluster only.) Default replication factor for new collections in this database.
Setting this to 1
disables replication. Setting this to "satellite"
will replicate to every DBServer.
(Cluster only.) The sharding method to use for new collections in the database.
Database users to create with the database.
(Cluster only.) Default write concern for new collections created in this database.
Database user to create with a database.
Whether the user is active.
Default: true
Additional data to store with the user object.
Password of the user to create.
Default: ""
Username of the user to create.
TODO
Options for explaining a query. See Database.explain.
If set to true, all possible execution plans will be returned as the
plans
property. Otherwise only the optimal execution plan will be
returned as the plan
property.
Default: false
Maximum number of plans that the optimizer is allowed to generate. Setting this to a low value limits the amount of work the optimizer does.
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.
TODO
Options for installing the service.
An object mapping configuration option names to values.
See also Database.getServiceConfiguration.
An object mapping dependency aliases to mount points.
See also Database.getServiceDependencies.
Whether the service should be installed in development mode.
See also Database.setServiceDevelopmentMode.
Default: false
Whether the service should be installed in legacy compatibility mode
This overrides the engines
option in the service manifest (if any).
Default: false
Whether the "setup" script should be executed.
Default: true
TODO
TODO
TODO
TODO
Options for executing a query. See Database.query.
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
The number of result values to be transferred by the server in each network roundtrip (or "batch").
Must be greater than zero.
If set to false
, the AQL query results cache lookup will be skipped for
this query.
Default: true
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
.
If set to true
, the query will throw an exception and abort if it would
otherwise produce a warning.
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.
(RocksDB only.) Maximum number of operations after which an intermediate commit is automatically performed.
(RocksDB only.) Maximum total size of operations in bytes after which an intermediate commit is automatically performed.
Limits the maximum number of plans that will be created by the AQL query optimizer.
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
(RocksDB only.) Maximum size of transactions in bytes.
Limits the maximum number of warnings a query will return.
The 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
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.
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
.
(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
(Enterprise Edition cluster only.) If set to true
, collections
inaccessible to the current user will result in an access error instead
of being treated as empty.
If set to true
, the query will be executed as a streaming query.
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.
The 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
TODO
Options for query tracking. See Database.queryTracking.
If set to false
, neither queries nor slow queries will be tracked.
The maximum query string length in bytes that will be kept in the list.
The maximum number of slow queries to be kept in the list.
The threshold execution time in seconds for when a query will be considered slow.
If set to true
, bind parameters will be tracked along with queries.
If set to true
and enabled
is also set to true
, slow queries will be
tracked if their execution time exceeds slowQueryThreshold
.
Options for replacing a service.
TODO
TODO
TODO
TODO
Test results for a Foxx service's tests using the default reporter.
Test results for a single test case using the default reporter.
Test stats for a Foxx service's tests.
Test results for a Foxx service's tests using the stream reporter.
Test results for a single test case using the stream reporter.
Test results for a single test suite using the suite reporter.
Test results for a Foxx service's tests using the suite reporter.
Test results for a single test case using the suite reporter.
Test results for a Foxx service's tests in TAP format.
Test results for a Foxx service's tests in XUnit format using the JSONML representation.
Test results for a single test case in XUnit format using the JSONML representation.
TODO
TODO
OpenAPI 2.0 description of a Foxx service.
Collections involved in a transaction.
An array of collections or a single collection that will be read from or written to during the transaction with no other writes being able to run in parallel.
An array of collections or a single collection that will be read from during the transaction.
An array of collections or a single collection that will be read from or written to during the transaction.
If ArangoDB is using the MMFiles storage engine, this option behaves
exactly like exclusive
, i.e. no other writes will run in parallel.
TODO
Options for how the transaction should be performed.
Whether the transaction may read from collections not specified for this
transaction. If set to false
, accessing any collections not specified
will result in the transaction being aborted to avoid potential deadlocks.
Default: true
.
(RocksDB only.) Determines the maximum number of operations after which an intermediate commit is performed automatically.
(RocksDB only.) Determine the maximum total size of operations after which an intermediate commit is performed automatically.
Determines how long the database will wait while attempting to gain locks on collections used by the transaction before timing out.
(RocksDB only.) Determines the transaction size limit in bytes.
Determines whether to force the transaction to write all data to disk before returning.
Options for uninstalling a service.
If set to true
, uninstalling a service that does not already exist
will be considered successful.
Default: false
Whether the service's "teardown" script should be executed prior to removing that service.
Default: true
Options for upgrading a service.
TODO
Indicates whether the given value represents a Database.
A value that might be a database.
Generated using TypeDoc
import { Database } from "arangojs/database";
The "database" module provides the Database class and associated types and interfaces for TypeScript.
The Database class is also re-exported by the "index" module.