arangodbfoxx

Arangodb: Is it possible to use an existing collection within Foxx


I am interested in created a FOXX application for Arango - but I want to use a collection I already have and will use in other ways. From the interface and the documentation it seems that I need to create a new collection.

Is there some work around where I can use an existing collection?


Solution

  • Yes, you can, you can skip creation of new collection when adding new fox service.

    And then use any collection in your DB, For instance

    var db = require('org/arangodb').db;
    db.yourcollectionname.save({yourdocument});
    

    Here you can find collection methods https://docs.arangodb.com/3.11/develop/javascript-api/@arangodb/collection-object/#documents