Accessing Views
These functions implement the HTTP API for accessing Views.
Note: Views were introduced in ArangoDB 3.4 and are not supported by earlier versions of ArangoDB.
database.arangoSearchView
database.arangoSearchView(viewName): ArangoSearchView
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>
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>
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 ArangoSearch View instances