ArangoDB uses a Node.js compatible module system. You can use the function
require() in order to load a module or library. It returns the exported
variables and functions of the module.
The following global variables are available throughout ArangoDB and Foxx:
Node compatibility modules
ArangoDB supports a number of modules for compatibility with Node.js, including:
assert implements basic assertion and testing functions.
events implements an event emitter.
module provides direct access to the module system.
path implements functions dealing with filenames and paths.
querystring provides utilities for dealing with query strings.
stream provides a streaming interface.
string_decoder implements logic for decoding buffers into strings.
url provides utilities for URL resolution and parsing.
util provides general utility functions like
Additionally ArangoDB provides partial implementations for the following modules:
cwd; stubs for
timers: stubs for
The following Node.js modules are not available at all:
There are a large number of ArangoDB-specific modules using the
namespace, mostly for internal use by ArangoDB itself. The following modules
noteworthy however and intended to be used by the user:
@arangodb provides direct access to the database and its collections.
@arangodb/analyzers provides an interface to manage ArangoSearch Analyzers.
AQL related modules:
@arangodb/aql/queries offers methods to track and kill AQL queries.
@arangodb/aql/cache allows to control the AQL query caching feature.
@arangodb/aql/explainer provides methods to debug, explain and profile AQL queries.
@arangodb/aql/functions provides an interface to (un-)register user-defined AQL functions.
@arangodb/crypto provides various cryptography functions including hashing algorithms.
@arangodb/foxx is the namespace providing the various building blocks of the Foxx microservice framework.
- @arangodb/locals is a helper module to use Foxx together with Webpack.
Graph related modules:
@arangodb/request provides the functionality for making synchronous HTTP/HTTPS requests.
@arangodb/tasks implements task management methods
@arangodb/users provides an interface for user management.
@arangodb/pregel provides an interface for Pregel management.