1
0
Fork 0
arangodb/Documentation/Books/Drivers/Java/Reference/Collection
Simran fd1019c51e Doc - Sync external repos 2018-09-26 (#6476) 2018-10-01 18:12:56 +02:00
..
BulkImport.md Doc - Sync external repos 2018-09-26 (#6476) 2018-10-01 18:12:56 +02:00
CollectionManipulation.md Doc - Sync external repos 2018-09-26 (#6476) 2018-10-01 18:12:56 +02:00
DocumentManipulation.md Doc - Sync external repos 2018-09-26 (#6476) 2018-10-01 18:12:56 +02:00
Indexes.md Doc - Sync external repos 2018-09-26 (#6476) 2018-10-01 18:12:56 +02:00
README.md Doc - Sync external repos 2018-09-26 (#6476) 2018-10-01 18:12:56 +02:00

README.md

Collection API

These functions implement the HTTP API for collections.

The ArangoCollection API is used for all collections, regardless of their specific type (document/edge collection).

Getting information about the collection

See the HTTP API documentation for details.

ArangoCollection.exists

ArangoCollection.exists() : boolean

Checks whether the collection exists

Examples

ArangoDB arango = new ArangoDB.Builder().build();
ArangoDatabase db = arango.db("myDB");
ArangoCollection collection = db.collection("potatos");

boolean exists = collection.exists();

ArangoCollection.getInfo

ArangoCollection.getInfo() : CollectionEntity

Returns information about the collection.

Examples

ArangoDB arango = new ArangoDB.Builder().build();
ArangoDatabase db = arango.db("myDB");
ArangoCollection collection = db.collection("potatos");

CollectionEntity info = collection.getInfo();

ArangoCollection.getProperties

ArangoCollection.getProperties() : CollectionPropertiesEntity

Reads the properties of the specified collection.

Examples

ArangoDB arango = new ArangoDB.Builder().build();
ArangoDatabase db = arango.db("myDB");
ArangoCollection collection = db.collection("potatos");

CollectionPropertiesEntity properties = collection.getProperties();

ArangoCollection.getRevision

ArangoCollection.getRevision() : CollectionRevisionEntity

Retrieve the collections revision.

Examples

ArangoDB arango = new ArangoDB.Builder().build();
ArangoDatabase db = arango.db("myDB");
ArangoCollection collection = db.collection("potatos");

CollectionRevisionEntity revision = collection.getRevision();

ArangoCollection.getIndexes

ArangoCollection.getIndexes() : Collection<IndexEntity>

Fetches a list of all indexes on this collection.

Examples

ArangoDB arango = new ArangoDB.Builder().build();
ArangoDatabase db = arango.db("myDB");
ArangoCollection collection = db.collection("potatos");

Collection<IndexEntity> indexes = collection.getIndexes();