Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

ArangoDB: Drop a collection

ArangoCollection interface provides 'drop' method to Drop a collection.


void drop() throws ArangoDBException;

Drop a collection.


void drop(boolean isSystem) throws ArangoDBException;

'isSystem' must be set to true to drop a system collection.


Find the below working application.


import com.arangodb.ArangoCollection;
import com.arangodb.ArangoDB;
import com.arangodb.ArangoDatabase;
import com.arangodb.mapping.ArangoJack;

public class CollectionDropDemo {
private static final String USER_NAME = "root";
private static final String PASSWORD = "tiger";
private static final String HOST = "";
private static final int PORT = 8529;

public static void main(String args[]) {
// Get an ArangoDB instance
ArangoDB arangoDB = new ArangoDB.Builder().user(USER_NAME).password(PASSWORD).host(HOST, PORT)
.serializer(new ArangoJack()).build();

String databaseName = "testdb";

ArangoDatabase arangoDatabase = arangoDB.db(databaseName);

String collectionName = "users";


ArangoCollection arangoCollection = arangoDatabase.collection(collectionName);

// Dropping the collection and database




Previous                                                    Next                                                    Home

This post first appeared on Java Tutorial : Blog To Learn Java Programming, please read the originial post: here

Share the post

ArangoDB: Drop a collection


Subscribe to Java Tutorial : Blog To Learn Java Programming

Get updates delivered right to your inbox!

Thank you for your subscription