Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ArangoSearchView

Represents an ArangoSearch View in a Database.

Hierarchy

Index

Accessors

isArangoView

  • get isArangoView(): true
  • internal

    Indicates that this object represents an ArangoDB View.

    Returns true

name

  • get name(): string
  • Name of the View.

    Returns string

Methods

create

drop

  • drop(): Promise<boolean>
  • Deletes the View from the database.

    example
    const db = new Database();
    const view = db.view("some-view");
    await view.drop();
    // the View "some-view" no longer exists
    

    Returns Promise<boolean>

exists

  • exists(): Promise<boolean>
  • Checks whether the View exists.

    example
    const db = new Database();
    const view = db.view("some-view");
    const exists = await view.exists();
    console.log(exists); // indicates whether the View exists
    

    Returns Promise<boolean>

get

  • Retrieves general information about the View.

    example
    const db = new Database();
    const view = db.view("some-view");
    const data = await view.get();
    // data contains general information about the View
    

    Returns Promise<ViewDescription & ArangoResponseMetadata>

properties

rename

  • Renames the View and updates the instance's name to newName.

    Additionally removes the instance from the Database's internal cache.

    Note: Renaming Views may not be supported when ArangoDB is running in a cluster configuration.

    example
    const db = new Database();
    const view1 = db.view("some-view");
    await view1.rename("other-view");
    const view2 = db.view("some-view");
    const view3 = db.view("other-view");
    // Note all three View instances are different objects but
    // view1 and view3 represent the same ArangoDB view!
    

    Parameters

    • newName: string

      The new name of the View.

    Returns Promise<ViewDescription & ArangoResponseMetadata>

replaceProperties

updateProperties

Generated using TypeDoc