ArangoDB v3.4 reached End of Life (EOL) and is no longer supported.

This documentation is outdated. Please see the most recent version here: Latest Docs

Accessing views

These functions implement the HTTP API for accessing views.

database.arangoSearchView

database.arangoSearchView(viewName): ArangoSearchView

This method is only available when targeting ArangoDB 3.4 or later, see Compatibility.

Returns a ArangoSearchView instance for the given view name.

Arguments

  • viewName: string

    Name of the arangosearch view.

Examples

const db = new Database();
const view = db.arangoSearchView("potatoes");

database.listViews

async database.listViews(): Array<Object>

This method is only available when targeting ArangoDB 3.4 or later, see Compatibility.

Fetches all views from the database and returns an array of view descriptions.

Examples

const db = new Database();

const views = await db.listViews();
// views is an array of view descriptions

database.views

async database.views([excludeSystem]): Array<View>

This method is only available when targeting ArangoDB 3.4 or later, see Compatibility.

Fetches all views from the database and returns an array of ArangoSearchView instances for the views.

Examples

const db = new Database();

const views = await db.views();
// views is an array of ArangoSearchView instances