Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "collection"

import type {
  DocumentCollection,
  EdgeCollection,
} from "arangojs/collection";

The "collection" module provides collection related types and interfaces for TypeScript.

Index

Type aliases

CollectionChecksumOptions

CollectionChecksumOptions: { withData?: undefined | false | true; withRevisions?: undefined | false | true }

Options for retrieving a collection checksum.

Type declaration

  • Optional withData?: undefined | false | true

    If set to true, document data will be included in the calculation of the checksum.

    Default: false

  • Optional withRevisions?: undefined | false | true

    If set to true, revision IDs will be included in the calculation of the checksum.

    Default: false

CollectionDropOptions

CollectionDropOptions: { isSystem?: undefined | false | true }

Options for dropping collections.

Type declaration

  • Optional isSystem?: undefined | false | true

    Whether the collection is a system collection. If the collection is a system collection, this option must be set to true or ArangoDB will refuse to drop the collection.

    Default: false

CollectionEdgesResult

CollectionEdgesResult<T>: { edges: Edge<T>[]; stats: { filtered: number; scannedIndex: number } }

Result of retrieving edges in a collection.

Type parameters

  • T: object

Type declaration

  • edges: Edge<T>[]
  • stats: { filtered: number; scannedIndex: number }
    • filtered: number
    • scannedIndex: number

CollectionImportOptions

CollectionImportOptions: { complete?: undefined | false | true; details?: undefined | false | true; fromPrefix?: undefined | string; onDuplicate?: "error" | "update" | "replace" | "ignore"; overwrite?: undefined | false | true; toPrefix?: undefined | string; waitForSync?: undefined | false | true }

Options for bulk importing documents into a collection.

Type declaration

  • Optional complete?: undefined | false | true

    If set to true, the import will abort if any error occurs.

  • Optional details?: undefined | false | true

    Whether the response should contain additional details about documents that could not be imported.

  • Optional fromPrefix?: undefined | string

    (Edge collections only.) Prefix to prepend to _from attribute values.

  • Optional onDuplicate?: "error" | "update" | "replace" | "ignore"

    Controls behavior when a unique constraint is violated on the document key.

    • "error": the document will not be imported.
    • "update: the document will be merged into the existing document.
    • "replace": the document will replace the existing document.
    • "ignore": the document will not be imported and the unique constraint error will be ignored.

    Default: "error"

  • Optional overwrite?: undefined | false | true

    If set to true, the collection is truncated before the data is imported.

    Default: false

  • Optional toPrefix?: undefined | string

    (Edge collections only.) Prefix to prepend to _to attribute values.

  • Optional waitForSync?: undefined | false | true

    Whether to wait for the documents to have been synced to disk.

CollectionImportResult

CollectionImportResult: { created: number; details?: string[]; empty: number; error: false; errors: number; ignored: number; updated: number }

Result of a collection bulk import.

Type declaration

  • created: number

    Number of new documents imported.

  • Optional details?: string[]

    Additional details about any errors encountered during the import.

  • empty: number

    Number of empty documents.

  • error: false

    Whether the import failed.

  • errors: number

    Number of documents that failed with an error.

  • ignored: number

    Number of documents that failed with an error that is ignored.

  • updated: number

    Number of documents updated.

CollectionInsertOptions

CollectionInsertOptions: { overwrite?: undefined | false | true; overwriteMode?: "ignore" | "update" | "replace" | "conflict"; returnNew?: undefined | false | true; silent?: undefined | false | true; waitForSync?: undefined | false | true }

Options for inserting a new document into a collection.

Type declaration

  • Optional overwrite?: undefined | false | true

    If set to true, a document with the same _key or _id already existing will be overwritten instead of resulting in an exception.

    deprecated

    This option has been deprecated in ArangoDB 3.7 and replaced with the overwriteMode option.

  • Optional overwriteMode?: "ignore" | "update" | "replace" | "conflict"

    Defines what should happen if a document with the same _key or _id already exists, instead of throwing an exception.

    Default: `"conflict"

  • Optional returnNew?: undefined | false | true

    If set to true, the complete new document will be returned as the new property on the result object. Has no effect if silent is set to true.

    Default: false

  • Optional silent?: undefined | false | true

    If set to true, no data will be returned by the server. This option can be used to reduce network traffic.

    Default: false

  • Optional waitForSync?: undefined | false | true

    If set to true, data will be synchronized to disk before returning.

    Default: false

CollectionKeyOptions

CollectionKeyOptions: { allowUserKeys?: undefined | false | true; increment?: undefined | number; offset?: undefined | number; type?: KeyGenerator }

An object defining the collection's key generation.

Type declaration

  • Optional allowUserKeys?: undefined | false | true

    Unless set to false, documents can be created with a user-specified _key attribute.

    Default: true

  • Optional increment?: undefined | number

    (Autoincrement only.) How many steps to increment the key each time.

  • Optional offset?: undefined | number

    (Autoincrement only.) Initial offset for the key.

  • Optional type?: KeyGenerator

    Type of key generator to use.

CollectionKeyProperties

CollectionKeyProperties: { allowUserKeys: boolean; increment?: undefined | number; lastValue: number; offset?: undefined | number; type: KeyGenerator }

An object defining the collection's key generation.

Type declaration

  • allowUserKeys: boolean

    Whether documents can be created with a user-specified _key attribute.

  • Optional increment?: undefined | number

    (Autoincrement only.) How many steps to increment the key each time.

  • lastValue: number

    Most recent key that has been generated.

  • Optional offset?: undefined | number

    (Autoincrement only.) Initial offset for the key.

  • type: KeyGenerator

    Type of key generator to use.

CollectionMetadata

CollectionMetadata: { globallyUniqueId: string; isSystem: boolean; name: string; status: CollectionStatus; type: CollectionType }

General information about a collection.

Type declaration

  • globallyUniqueId: string

    A globally unique identifier for this collection.

  • isSystem: boolean
    internal

    Whether the collection is a system collection.

  • name: string

    Collection name.

  • status: CollectionStatus

    An integer indicating the collection loading status.

  • type: CollectionType

    An integer indicating the collection type.

CollectionProperties

CollectionProperties: { distributeShardsLike?: undefined | string; doCompact?: undefined | false | true; indexBuckets?: undefined | number; isVolatile?: undefined | false | true; journalSize?: undefined | number; keyOptions: CollectionKeyProperties; minReplicationFactor?: undefined | number; numberOfShards?: undefined | number; replicationFactor?: undefined | number; schema: SchemaProperties | null; shardKeys?: string[]; shardingStrategy?: ShardingStrategy; smartJoinAttribute?: undefined | string; statusString: string; waitForSync: boolean; writeConcern: number }

An object defining the properties of a collection.

Type declaration

  • Optional distributeShardsLike?: undefined | string

    (Enterprise Edition cluster only.) If set to a collection name, sharding of the new collection will follow the rules for that collection. As long as the new collection exists, the indicated collection can not be dropped.

  • Optional doCompact?: undefined | false | true

    (MMFiles only.) Whether the collection will be compacted.

  • Optional indexBuckets?: undefined | number

    (MMFiles only.) Number of buckets into which indexes using hash tables are split.

  • Optional isVolatile?: undefined | false | true

    (MMFiles only.) If set to true, the collection will only be kept in-memory and discarded when unloaded, resulting in full data loss.

  • Optional journalSize?: undefined | number

    (MMFiles only.) Maximum size for each journal or datafile in bytes.

  • keyOptions: CollectionKeyProperties

    An object defining the collection's key generation.

  • Optional minReplicationFactor?: undefined | number

    (Cluster only.) Write concern for this collection.

    deprecated

    Renamed to writeConcern in ArangoDB 3.6.

  • Optional numberOfShards?: undefined | number

    (Cluster only.) Number of shards of this collection.

  • Optional replicationFactor?: undefined | number

    (Cluster only.) Replication factor of the collection.

  • schema: SchemaProperties | null

    Properties for validating documents in the collection.

  • Optional shardKeys?: string[]

    (Cluster only.) Keys of this collection that will be used for sharding.

  • Optional shardingStrategy?: ShardingStrategy

    (Cluster only.) Sharding strategy of the collection.

  • Optional smartJoinAttribute?: undefined | string

    (Enterprise Edition cluster only.) Attribute containing the shard key value of the referred-to smart join collection.

  • statusString: string

    A human-readable representation of the collection loading status.

  • waitForSync: boolean

    Whether data should be synchronized to disk before returning from a document create, update, replace or removal operation.

  • writeConcern: number

    (Cluster only.) Write concern for this collection.

CollectionPropertiesOptions

CollectionPropertiesOptions: { journalSize?: undefined | number; schema?: SchemaOptions; waitForSync?: undefined | false | true }

Options for setting a collection's properties.

See DocumentCollection.properties and EdgeCollection.properties.

Type declaration

  • Optional journalSize?: undefined | number

    (MMFiles only.) Maximum size for each journal or datafile in bytes.

    Must be a number greater than or equal to 1048576 (1 MiB).

  • Optional schema?: SchemaOptions

    Options for validating documents in this collection.

  • Optional waitForSync?: undefined | false | true

    Whether data should be synchronized to disk before returning from a document create, update, replace or removal operation.

CollectionReadOptions

CollectionReadOptions: { allowDirtyRead?: undefined | false | true; graceful?: undefined | false | true }

Options for retrieving a document from a collection.

Type declaration

  • Optional allowDirtyRead?: undefined | false | true

    If set to true, the request will explicitly permit ArangoDB to return a potentially dirty or stale result and arangojs will load balance the request without distinguishing between leaders and followers.

  • Optional graceful?: undefined | false | true

    If set to true, null is returned instead of an exception being thrown if the document does not exist.

CollectionRemoveOptions

CollectionRemoveOptions: { returnOld?: undefined | false | true; silent?: undefined | false | true; waitForSync?: undefined | false | true }

Options for removing a document from a collection.

Type declaration

  • Optional returnOld?: undefined | false | true

    If set to true, the complete old document will be returned as the old property on the result object. Has no effect if silent is set to true.

    Default: false

  • Optional silent?: undefined | false | true

    If set to true, no data will be returned by the server. This option can be used to reduce network traffic.

    Default: false

  • Optional waitForSync?: undefined | false | true

    If set to true, changes will be synchronized to disk before returning.

    Default: false

CollectionReplaceOptions

CollectionReplaceOptions: { ignoreRevs?: undefined | false | true; returnNew?: undefined | false | true; returnOld?: undefined | false | true; silent?: undefined | false | true; waitForSync?: undefined | false | true }

Options for replacing an existing document in a collection.

Type declaration

  • Optional ignoreRevs?: undefined | false | true

    If set to false, the existing document will only be modified if its _rev property matches the same property on the new data.

    Default: true

  • Optional returnNew?: undefined | false | true

    If set to true, the complete new document will be returned as the new property on the result object. Has no effect if silent is set to true.

    Default: false

  • Optional returnOld?: undefined | false | true

    If set to true, the complete old document will be returned as the old property on the result object. Has no effect if silent is set to true.

    Default: false

  • Optional silent?: undefined | false | true

    If set to true, no data will be returned by the server. This option can be used to reduce network traffic.

    Default: false

  • Optional waitForSync?: undefined | false | true

    If set to true, data will be synchronized to disk before returning.

    Default: false

CollectionUpdateOptions

CollectionUpdateOptions: { ignoreRevs?: undefined | false | true; keepNull?: undefined | false | true; mergeObjects?: undefined | false | true; returnNew?: undefined | false | true; returnOld?: undefined | false | true; silent?: undefined | false | true; waitForSync?: undefined | false | true }

Options for updating a document in a collection.

Type declaration

  • Optional ignoreRevs?: undefined | false | true

    If set to false, the existing document will only be modified if its _rev property matches the same property on the new data.

    Default: true

  • Optional keepNull?: undefined | false | true

    If set to false, properties with a value of null will be removed from the new document.

    Default: true

  • Optional mergeObjects?: undefined | false | true

    If set to false, object properties that already exist in the old document will be overwritten rather than merged. This does not affect arrays.

    Default: true

  • Optional returnNew?: undefined | false | true

    If set to true, the complete new document will be returned as the new property on the result object. Has no effect if silent is set to true.

    Default: false

  • Optional returnOld?: undefined | false | true

    If set to true, the complete old document will be returned as the old property on the result object. Has no effect if silent is set to true.

    Default: false

  • Optional silent?: undefined | false | true

    If set to true, no data will be returned by the server. This option can be used to reduce network traffic.

    Default: false

  • Optional waitForSync?: undefined | false | true

    If set to true, data will be synchronized to disk before returning.

    Default: false

CreateCollectionOptions

CreateCollectionOptions: { distributeShardsLike?: undefined | string; doCompact?: undefined | false | true; enforceReplicationFactor?: undefined | false | true; indexBuckets?: undefined | number; isSystem?: undefined | false | true; isVolatile?: undefined | false | true; journalSize?: undefined | number; keyOptions?: CollectionKeyOptions; minReplicationFactor?: undefined | number; numberOfShards?: undefined | number; replicationFactor?: undefined | number; schema?: SchemaOptions; shardKeys?: string[]; shardingStrategy?: ShardingStrategy; smartJoinAttribute?: undefined | string; waitForSync?: undefined | false | true; waitForSyncReplication?: undefined | false | true; writeConcern?: undefined | number }

Type declaration

  • Optional distributeShardsLike?: undefined | string

    (Enterprise Edition cluster only.) If set to a collection name, sharding of the new collection will follow the rules for that collection. As long as the new collection exists, the indicated collection can not be dropped.

  • Optional doCompact?: undefined | false | true

    (MMFiles only.) Whether the collection will be compacted.

    Default: true

  • Optional enforceReplicationFactor?: undefined | false | true

    (Cluster only.) Unless set to false, the server will check whether enough replicas are available at creation time and bail out otherwise.

    Default: true

  • Optional indexBuckets?: undefined | number

    (MMFiles only.) Number of buckets into which indexes using hash tables are split.

    Must be a power of 2 and less than or equal to 1024.

    Default: 16

  • Optional isSystem?: undefined | false | true
    internal

    Whether the collection should be created as a system collection.

    Default: false

  • Optional isVolatile?: undefined | false | true

    (MMFiles only.) If set to true, the collection will only be kept in-memory and discarded when unloaded, resulting in full data loss.

    Default: false

  • Optional journalSize?: undefined | number

    (MMFiles only.) Maximum size for each journal or datafile in bytes.

    Must be a number greater than or equal to 1048576 (1 MiB).

  • Optional keyOptions?: CollectionKeyOptions

    An object defining the collection's key generation.

  • Optional minReplicationFactor?: undefined | number

    (Cluster only.) Write concern for this collection.

    deprecated

    Renamed to writeConcern in ArangoDB 3.6.

  • Optional numberOfShards?: undefined | number

    (Cluster only.) Number of shards to distribute the collection across.

    Default: 1

  • Optional replicationFactor?: undefined | number

    (Cluster only.) How many copies of each document should be kept in the cluster.

    Default: 1

  • Optional schema?: SchemaOptions

    Options for validating documents in the collection.

  • Optional shardKeys?: string[]

    (Cluster only.) Document attributes to use to determine the target shard for each document.

    Default: ["_key"]

  • Optional shardingStrategy?: ShardingStrategy

    (Cluster only.) Sharding strategy to use.

  • Optional smartJoinAttribute?: undefined | string

    (Enterprise Edition cluster only.) Attribute containing the shard key value of the referred-to smart join collection.

  • Optional waitForSync?: undefined | false | true

    If set to true, data will be synchronized to disk before returning from a document create, update, replace or removal operation.

    Default: false

  • Optional waitForSyncReplication?: undefined | false | true

    (Cluster only.) Unless set to false, the server will wait for all replicas to create the collection before returning.

    Default: true

  • Optional writeConcern?: undefined | number

    (Cluster only.) Write concern for this collection.

KeyGenerator

KeyGenerator: "traditional" | "autoincrement" | "uuid" | "padded"

Type of key generator.

SchemaOptions

SchemaOptions: { level?: ValidationLevel; message?: undefined | string; rule: any }

Options for validating collection documents.

Type declaration

  • Optional level?: ValidationLevel

    When validation should be applied.

    Default: "strict"

  • Optional message?: undefined | string

    Message to be used if validation fails.

  • rule: any

    JSON Schema description of the validation schema for documents.

SchemaProperties

SchemaProperties: { level: ValidationLevel; message: string; rule: any; type: "json" }

Properties for validating documents in a collection.

Type declaration

  • level: ValidationLevel

    When validation should be applied.

  • message: string

    Message to be used if validation fails.

  • rule: any

    JSON Schema description of the validation schema for documents.

  • type: "json"

    Type of document validation.

ShardingStrategy

ShardingStrategy: "hash" | "enterprise-hash-smart-edge" | "community-compat" | "enterprise-compat" | "enterprise-smart-edge-compat"

Strategy for sharding a collection.

SimpleQueryAllOptions

SimpleQueryAllOptions: { batchSize?: undefined | number; limit?: undefined | number; skip?: undefined | number; stream?: undefined | false | true; ttl?: undefined | number }

Options for retrieving all documents in a collection.

deprecated

Simple Queries have been deprecated in ArangoDB 3.4 and can be replaced with AQL queries.

Type declaration

  • Optional batchSize?: undefined | number

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

    Must be greater than zero.

    See also QueryOptions.

  • Optional limit?: undefined | number

    Maximum number of documents to return.

  • Optional skip?: undefined | number

    Number of documents to skip in the query.

  • Optional stream?: undefined | false | true

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

    See also QueryOptions.

  • Optional ttl?: undefined | number

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

    See also QueryOptions.

SimpleQueryByExampleOptions

SimpleQueryByExampleOptions: { batchSize?: undefined | number; limit?: undefined | number; skip?: undefined | number; ttl?: undefined | number }

Options for retrieving documents by example.

deprecated

Simple Queries have been deprecated in ArangoDB 3.4 and can be replaced with AQL queries.

Type declaration

  • Optional batchSize?: undefined | number

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

    Must be greater than zero.

    See also QueryOptions.

  • Optional limit?: undefined | number

    Maximum number of documents to return.

  • Optional skip?: undefined | number

    Number of documents to skip in the query.

  • Optional ttl?: undefined | number

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

    See also QueryOptions.

SimpleQueryFulltextOptions

SimpleQueryFulltextOptions: { index?: undefined | string; limit?: undefined | number; skip?: undefined | number }

Options for performing a fulltext query.

deprecated

Simple Queries have been deprecated in ArangoDB 3.4 and can be replaced with AQL queries.

Type declaration

  • Optional index?: undefined | string

    Unique identifier of the fulltext index to use to perform the query.

  • Optional limit?: undefined | number

    Maximum number of documents to return.

  • Optional skip?: undefined | number

    Number of documents to skip in the query.

SimpleQueryListType

SimpleQueryListType: "id" | "key" | "path"

Type of document reference.

See DocumentCollection.list and EdgeCollection.list.

deprecated

Simple Queries have been deprecated in ArangoDB 3.4 and can be replaced with AQL queries.

SimpleQueryRemoveByExampleOptions

SimpleQueryRemoveByExampleOptions: { limit?: undefined | number; waitForSync?: undefined | false | true }

Options for removing documents by example.

deprecated

Simple Queries have been deprecated in ArangoDB 3.4 and can be replaced with AQL queries.

Type declaration

  • Optional limit?: undefined | number

    Maximum number of documents to return.

  • Optional waitForSync?: undefined | false | true

    If set to true, the request will wait until all modifications have been synchronized to disk before returning successfully.

    Default: false

SimpleQueryRemoveByExampleResult

SimpleQueryRemoveByExampleResult: { deleted: number }

Result of removing documents by an example.

See DocumentCollection.removeByExample and EdgeCollection.removeByExample.

deprecated

Simple Queries have been deprecated in ArangoDB 3.4 and can be replaced with AQL queries.

Type declaration

  • deleted: number

    Number of documents removed.

SimpleQueryRemoveByKeysOptions

SimpleQueryRemoveByKeysOptions: { returnOld?: undefined | false | true; silent?: undefined | false | true; waitForSync?: undefined | false | true }

Options for removing documents by keys.

deprecated

Simple Queries have been deprecated in ArangoDB 3.4 and can be replaced with AQL queries.

Type declaration

  • Optional returnOld?: undefined | false | true

    If set to true, the complete old document will be returned as the old property on the result object. Has no effect if silent is set to true.

    Default: false

  • Optional silent?: undefined | false | true

    If set to true, no data will be returned by the server. This option can be used to reduce network traffic.

    Default: false

  • Optional waitForSync?: undefined | false | true

    If set to true, the request will wait until all modifications have been synchronized to disk before returning successfully.

    Default: false

SimpleQueryRemoveByKeysResult

SimpleQueryRemoveByKeysResult<T>: { ignored: number; old?: DocumentMetadata[] | Document<T>[]; removed: number }

Result of removing documents by keys.

See DocumentCollection.removeByKeys and EdgeCollection.removeByKeys.

deprecated

Simple Queries have been deprecated in ArangoDB 3.4 and can be replaced with AQL queries.

Type parameters

  • T: object

Type declaration

  • ignored: number

    Number of documents not removed.

  • Optional old?: DocumentMetadata[] | Document<T>[]

    Documents that have been removed.

  • removed: number

    Number of documents removed.

SimpleQueryReplaceByExampleOptions

SimpleQueryReplaceByExampleOptions: SimpleQueryRemoveByExampleOptions

Options for replacing documents by example.

deprecated

Simple Queries have been deprecated in ArangoDB 3.4 and can be replaced with AQL queries.

SimpleQueryReplaceByExampleResult

SimpleQueryReplaceByExampleResult: { replaced: number }

Result of replacing documents by an example.

See DocumentCollection.replaceByExample and EdgeCollection.replaceByExample.

deprecated

Simple Queries have been deprecated in ArangoDB 3.4 and can be replaced with AQL queries.

Type declaration

  • replaced: number

    Number of documents replaced.

SimpleQueryUpdateByExampleOptions

SimpleQueryUpdateByExampleOptions: { keepNull?: undefined | false | true; limit?: undefined | number; mergeObjects?: undefined | false | true; waitForSync?: undefined | false | true }

Options for updating documents by example.

deprecated

Simple Queries have been deprecated in ArangoDB 3.4 and can be replaced with AQL queries.

Type declaration

  • Optional keepNull?: undefined | false | true

    If set to false, properties with a value of null will be removed from the new document.

    Default: true

  • Optional limit?: undefined | number

    Maximum number of documents to return.

  • Optional mergeObjects?: undefined | false | true

    If set to false, object properties that already exist in the old document will be overwritten rather than merged. This does not affect arrays.

    Default: true

  • Optional waitForSync?: undefined | false | true

    If set to true, the request will wait until all modifications have been synchronized to disk before returning successfully.

    Default: false

SimpleQueryUpdateByExampleResult

SimpleQueryUpdateByExampleResult: { updated: number }

Result of updating documents by an example.

See DocumentCollection.updateByExample and EdgeCollection.updateByExample.

deprecated

Simple Queries have been deprecated in ArangoDB 3.4 and can be replaced with AQL queries.

Type declaration

  • updated: number

    Number of documents updated.

TraversalOptions

TraversalOptions: { direction?: "inbound" | "outbound" | "any"; expander?: undefined | string; filter?: undefined | string; init?: undefined | string; itemOrder?: "forward" | "backward"; maxDepth?: undefined | number; maxIterations?: undefined | number; minDepth?: undefined | number; order?: "preorder" | "postorder" | "preorder-expander"; sort?: undefined | string; strategy?: "depthfirst" | "breadthfirst"; uniqueness?: undefined | { edges?: "none" | "global" | "path"; vertices?: "none" | "global" | "path" }; visitor?: undefined | string }

Options for performing a graph traversal.

deprecated

Simple Queries have been deprecated in ArangoDB 3.4 and can be replaced with AQL queries.

Type declaration

  • Optional direction?: "inbound" | "outbound" | "any"

    Direction of the traversal, relative to the starting vertex if expander is not set.

  • Optional expander?: undefined | string

    A string evaluating to the body of a JavaScript function to be executed on the server to use when direction is not set.

    The code has access to three variables: config, vertex, path. The code must return an array of objects with edge and vertex attributes representing the connections for the vertex.

    Note: This code will be evaluated and executed on the server inside ArangoDB's embedded JavaScript environment and can not access any other variables.

    See the official ArangoDB documentation for the JavaScript @arangodb module for information about accessing the database from within ArangoDB's server-side JavaScript environment.

  • Optional filter?: undefined | string

    A string evaluating to the body of a JavaScript function to be executed on the server to filter nodes.

    The code has access to three variables: config, vertex, path. The code may include a return statement for the following values:

    • "exclude": The vertex will not be visited.
    • "prune": The edges of the vertex will not be followed.
    • "" or undefined: The vertex will be visited and its edges followed.
    • an array including any of the above values.

    Note: This code will be evaluated and executed on the server inside ArangoDB's embedded JavaScript environment and can not access any other variables.

    See the official ArangoDB documentation for the JavaScript @arangodb module for information about accessing the database from within ArangoDB's server-side JavaScript environment.

  • Optional init?: undefined | string

    A string evaluating to the body of a JavaScript function to be executed on the server to initialize the traversal result object.

    The code has access to two variables: config, result. The code may modify the result object.

    Note: This code will be evaluated and executed on the server inside ArangoDB's embedded JavaScript environment and can not access any other variables.

    See the official ArangoDB documentation for the JavaScript @arangodb module for information about accessing the database from within ArangoDB's server-side JavaScript environment.

  • Optional itemOrder?: "forward" | "backward"

    Item iteration order.

  • Optional maxDepth?: undefined | number

    If specified, only nodes in at most this depth will be visited.

  • Optional maxIterations?: undefined | number

    Maximum number of iterations before a traversal is aborted because of a potential endless loop.

  • Optional minDepth?: undefined | number

    If specified, only nodes in at least this depth will be visited.

  • Optional order?: "preorder" | "postorder" | "preorder-expander"

    Traversal order.

  • Optional sort?: undefined | string

    A string evaluating to the body of a JavaScript function to be executed on the server to sort edges if expander is not set.

    The code has access to two variables representing edges: l, r. The code must return -1 if l < r, 1 if l > r or 0 if both values are equal.

    Note: This code will be evaluated and executed on the server inside ArangoDB's embedded JavaScript environment and can not access any other variables.

    See the official ArangoDB documentation for the JavaScript @arangodb module for information about accessing the database from within ArangoDB's server-side JavaScript environment.

  • Optional strategy?: "depthfirst" | "breadthfirst"

    Traversal strategy.

  • Optional uniqueness?: undefined | { edges?: "none" | "global" | "path"; vertices?: "none" | "global" | "path" }

    Specifies uniqueness for vertices and edges.

  • Optional visitor?: undefined | string

    A string evaluating to the body of a JavaScript function to be executed on the server when a node is visited.

    The code has access to five variables: config, result, vertex, path, connected. The code may modify the result object.

    Note: This code will be evaluated and executed on the server inside ArangoDB's embedded JavaScript environment and can not access any other variables.

    See the official ArangoDB documentation for the JavaScript @arangodb module for information about accessing the database from within ArangoDB's server-side JavaScript environment.

ValidationLevel

ValidationLevel: "none" | "new" | "moderate" | "strict"

When a validation should be applied.

  • "none": No validation.
  • "new": Newly inserted documents are validated.
  • "moderate": New and modified documents are validated unless the modified document was already invalid.
  • "strict": New and modified documents are always validated.

Functions

collectionToString

isArangoCollection

  • isArangoCollection(collection: any): collection is ArangoCollection
  • Indicates whether the given value represents an ArangoCollection.

    Parameters

    • collection: any

      A value that might be a collection.

    Returns collection is ArangoCollection

Generated using TypeDoc