public class ArangoDriver extends BaseArangoDriver
Constructor and Description |
---|
ArangoDriver(ArangoConfigure configure)
Constructor to create an instance of the driver that uses the default
database.
|
ArangoDriver(ArangoConfigure configure,
String database)
Constructor to create an instance of the driver that uses the provided
database.
|
Modifier and Type | Method and Description |
---|---|
void |
cancelBatchMode()
This method cancels the batch execution mode.
|
String |
checkDocument(String documentHandle)
This method returns the current revision of a document.
|
String |
checkDocument(String collectionName,
String documentKey)
This method returns the current revision of a document.
|
<T> CursorEntity<T> |
continueQuery(long cursorId,
Class<?>... clazz)
Continues data retrieval for an existing cursor
|
DefaultEntity |
createAqlFunction(String name,
String code)
Creates an AQL Function
|
CollectionEntity |
createCollection(String name)
Creates a new collection.
|
CollectionEntity |
createCollection(String name,
CollectionOptions collectionOptions)
Creates a new collection.
|
BooleanResultEntity |
createDatabase(String database,
UserEntity... users)
This method creates a database
|
<T> DocumentEntity<T> |
createDocument(String collectionName,
String documentKey,
T value)
Creates a document in the collection defined by the collection's name.
|
<T> DocumentEntity<T> |
createDocument(String collectionName,
String documentKey,
T value,
Boolean waitForSync)
Creates a document in the collection defined by the collection's name.
|
<T> DocumentEntity<T> |
createDocument(String collectionName,
T value)
Creates a document in the collection defined by the collection's name
|
<T> DocumentEntity<T> |
createDocument(String collectionName,
T value,
Boolean waitForSync)
Creates a document in the collection defined by the collection's name.
|
DocumentEntity<String> |
createDocumentRaw(String collectionName,
String rawJsonString,
Boolean waitForSync)
Creates a document in the collection defined by the collection's name
|
<T> EdgeEntity<T> |
createEdge(String collectionName,
String documentKey,
T value,
String fromHandle,
String toHandle,
Boolean waitForSync)
Create an edge in an edge collection.
|
<T> EdgeEntity<T> |
createEdge(String collectionName,
T value,
String fromHandle,
String toHandle,
Boolean waitForSync)
Create an edge in an edge collection.
|
BooleanResultEntity |
createEndpoint(String endpoint,
String... databases)
This method creates an endpoint.
|
IndexEntity |
createFulltextIndex(String collectionName,
Integer minLength,
String... fields)
This method creates a full text index for a collection.
|
IndexEntity |
createFulltextIndex(String collectionName,
String... fields)
This method creates a full text index for a collection.
|
IndexEntity |
createGeoIndex(String collectionName,
boolean unique,
String... fields)
This method creates a geo index for a collection.
|
GraphEntity |
createGraph(GraphEntity graph,
Boolean waitForSync)
Creates a graph.
|
GraphEntity |
createGraph(String graphName,
Boolean waitForSync)
Creates an empty graph.
|
GraphEntity |
createGraph(String graphName,
List<EdgeDefinitionEntity> edgeDefinitions,
List<String> orphanCollections,
Boolean waitForSync)
Creates a graph.
|
IndexEntity |
createHashIndex(String collectionName,
boolean unique,
boolean sparse,
String... fields)
This method creates a hash index for a collection.
|
IndexEntity |
createHashIndex(String collectionName,
boolean unique,
String... fields)
This method creates a hash index for a collection.
|
IndexEntity |
createIndex(String collectionName,
IndexType type,
boolean unique,
boolean sparse,
String... fields)
This method creates an index for a collection.
|
IndexEntity |
createIndex(String collectionName,
IndexType type,
boolean unique,
String... fields)
This method creates an index for a collection.
|
IndexEntity |
createPersistentIndex(String collectionName,
boolean unique,
boolean sparse,
String... fields)
It is possible to define a persistent index on one or more attributes (or
paths) of documents.
|
IndexEntity |
createSkipListIndex(String collectionName,
boolean unique,
boolean sparse,
String... fields)
This method creates a skip list index for a collection.
|
IndexEntity |
createSkipListIndex(String collectionName,
boolean unique,
String... fields)
This method creates a skip list index for a collection.
|
TransactionEntity |
createTransaction(String action)
Creates a transaction entity.
|
DefaultEntity |
createUser(String username,
String passwd,
Boolean active,
Map<String,Object> extra)
Creates a database user.
|
void |
deleteAllJobs()
Deletes all job from ArangoDB.
|
DefaultEntity |
deleteAqlFunction(String name,
boolean isNameSpace)
Delete an AQL function.
|
CollectionEntity |
deleteCollection(String name)
Deletes a collection by name.
|
BooleanResultEntity |
deleteDatabase(String database)
This method deletes a database
|
DocumentEntity<?> |
deleteDocument(String documentHandle)
Deletes a document from the database.
|
DocumentEntity<?> |
deleteDocument(String collectionName,
String documentKey)
Deletes a document from the database.
|
DocumentEntity<?> |
deleteDocument(String collectionName,
String documentKey,
String rev)
Deletes a document from the database.
|
BooleanResultEntity |
deleteEndpoint(String endpoint)
This method deletes an endpoint
|
void |
deleteExpiredJobs(int timeStamp)
Deletes all jobs by a provided expiration date.
|
DeletedEntity |
deleteGraph(String graphName)
Delete a graph by its name.
|
void |
deleteGraph(String graphName,
Boolean dropCollections)
Delete a graph by its name.
|
IndexEntity |
deleteIndex(String indexHandle)
Deletes an index from a collection
|
void |
deleteJobById(String jobId)
Deletes a job from ArangoDB.
|
DefaultEntity |
deleteQueryCache()
Clears the AQL query cache (since ArangoDB 2.7)
|
DefaultEntity |
deleteSlowQueries()
Clears the list of slow AQL queries of the default database
|
DefaultEntity |
deleteSlowQueries(String database)
Clears the list of slow AQL queries of the default database
|
DefaultEntity |
deleteUser(String username)
Deletes a database user.
|
<T> CursorResult<T> |
executeAqlQuery(String query,
Map<String,Object> bindVars,
AqlQueryOptions aqlQueryOptions,
Class<T> clazz)
This method executes an AQL query and returns a CursorResult
|
String |
executeAqlQueryJSON(String query,
Map<String,Object> bindVars,
AqlQueryOptions aqlQueryOptions)
Executes an AQL query and returns the raw JSON response
|
CursorRawResult |
executeAqlQueryRaw(String query,
Map<String,Object> bindVars,
AqlQueryOptions aqlQueryOptions)
This method executes an AQL query and returns a CursorRawResult.
|
<T,S extends DocumentEntity<T>> |
executeAqlQueryWithDocumentCursorResult(String query,
Map<String,Object> bindVars,
AqlQueryOptions aqlQueryOptions,
Class<S> classDocumentEntity,
Class<T> clazz)
This method executes an AQL query and returns a DocumentCursorResult
|
DefaultEntity |
executeBatch()
This method sends all stacked requests as batch to ArangoDB.
|
<T> CursorEntity<T> |
executeCursorEntityQuery(String query,
Map<String,Object> bindVars,
Boolean calcCount,
Integer batchSize,
Boolean fullCount,
Class<?>... clazz)
This method executes an AQL query and returns a CursorEntity.
|
<T> DocumentCursor<T> |
executeDocumentQuery(String query,
Map<String,Object> bindVars,
AqlQueryOptions aqlQueryOptions,
Class<T> clazz)
This method executes an AQL query and returns a DocumentCursor
|
<T> EdgeCursor<T> |
executeEdgeQuery(String query,
Map<String,Object> bindVars,
AqlQueryOptions aqlQueryOptions,
Class<T> clazz)
Returns edges as an EdgeCursor by a given query
|
DefaultEntity |
executeScript(String jsCode)
Executes a javascript code.
|
<T> DocumentCursor<T> |
executeSimpleAllDocuments(String collectionName,
int skip,
int limit,
Class<T> clazz)
Returns all documents of a collections.
|
<T> ScalarExampleEntity<T> |
executeSimpleAny(String collectionName,
Class<T> clazz)
Returns a random document from the collection
|
<T> DocumentCursor<T> |
executeSimpleByExampleDocuments(String collectionName,
Map<String,Object> example,
int skip,
int limit,
Class<T> clazz)
This will find all documents matching a given example.
|
<T> ScalarExampleEntity<T> |
executeSimpleFirstExample(String collectionName,
Map<String,Object> example,
Class<T> clazz)
Returns the first document matching the example
|
<T> DocumentCursor<T> |
executeSimpleFulltextWithDocuments(String collectionName,
String attribute,
String query,
int skip,
int limit,
String index,
Class<T> clazz)
This will find all documents from the collection that match the fulltext
query specified in query.
|
<T> DocumentCursor<T> |
executeSimpleRangeWithDocuments(String collectionName,
String attribute,
Object left,
Object right,
Boolean closed,
int skip,
int limit,
Class<T> clazz)
This will find all documents within a given range.
|
SimpleByResultEntity |
executeSimpleRemoveByExample(String collectionName,
Map<String,Object> example,
Boolean waitForSync,
Integer limit)
This will remove all documents in the collection that match the specified
example object.
|
SimpleByResultEntity |
executeSimpleReplaceByExample(String collectionName,
Map<String,Object> example,
Map<String,Object> newValue,
Boolean waitForSync,
Integer limit)
This will replace all documents in the collection that match the
specified example object.
|
SimpleByResultEntity |
executeSimpleUpdateByExample(String collectionName,
Map<String,Object> example,
Map<String,Object> newValue,
Boolean keepNull,
Boolean waitForSync,
Integer limit)
This will update all documents in the collection that match the specified
example object.
|
TransactionResultEntity |
executeTransaction(TransactionEntity transactionEntity)
Executes the transaction on the database server.
|
<T> VertexCursor<T> |
executeVertexQuery(String query,
Map<String,Object> bindVars,
AqlQueryOptions aqlQueryOptions,
Class<T> clazz)
Returns vertices as a VertexCursor by a given query
|
boolean |
exists(String documentHandle)
The exists method determines whether a document exists given its
identifier.
|
boolean |
exists(String collectionName,
String documentKey)
The exists method determines whether a document exists given its
identifier.
|
DefaultEntity |
finishQuery(long cursorId)
Deletes a cursor from the database.
|
AqlFunctionsEntity |
getAqlFunctions(String namespace)
Gets all AQL functions whithin a given namespace
|
<T> T |
getBatchResponseByRequestId(String requestId)
This method returns the result of a call to ArangoDB executed within a
batch request.
|
CollectionEntity |
getCollection(String name)
Returns a collection from ArangoDB by name
|
CollectionEntity |
getCollectionChecksum(String name,
Boolean withRevisions,
Boolean withData)
Returns a collection from ArangoDB by name including the collection
checksum
|
CollectionEntity |
getCollectionCount(String name)
Returns a collection from ArangoDB by name including the document count
|
CollectionEntity |
getCollectionFigures(String name)
Returns a collection from ArangoDB by name including the collection
figures
|
CollectionEntity |
getCollectionProperties(String name)
Returns a collection from ArangoDB including all properties by name
|
CollectionsEntity |
getCollections()
Returns all collections from ArangoDB
|
CollectionsEntity |
getCollections(Boolean excludeSystem)
Returns all collections from ArangoDB
|
DatabaseEntity |
getCurrentDatabase()
Returns the current database
|
QueriesResultEntity |
getCurrentlyRunningQueries()
Returns a list of currently running AQL queries of the default database
|
QueriesResultEntity |
getCurrentlyRunningQueries(String database)
Returns a list of currently running AQL queries of a database
|
StringsResultEntity |
getDatabases()
Returns all databases
|
StringsResultEntity |
getDatabases(boolean currentUserAccessableOnly)
Returns all databases
|
StringsResultEntity |
getDatabases(String username,
String password)
Returns all databases the user identified by his credentials can access
|
AqlQueryOptions |
getDefaultAqlQueryOptions()
Creates a default AqlQueryOptions object
|
String |
getDefaultDatabase()
Returns the default database.
|
<T> DocumentEntity<T> |
getDocument(String documentHandle,
Class<T> clazz)
Returns a document entity.
|
<T> DocumentEntity<T> |
getDocument(String documentHandle,
Class<T> clazz,
String ifNoneMatchRevision,
String ifMatchRevision)
Returns a document entity.
|
<T> DocumentEntity<T> |
getDocument(String collectionName,
String documentKey,
Class<T> clazz)
Returns a document entity.
|
String |
getDocumentRaw(String documentHandle,
String ifNoneMatchRevision,
String ifMatchRevision)
Returns the document as a JSON string.
|
List<String> |
getDocuments(String collectionName)
This method returns all document handles from a collection.
|
List<Endpoint> |
getEndpoints()
This method returns all endpoints.
|
GraphEntity |
getGraph(String graphName)
Get graph object by name, including its edge definitions and vertex
collections.
|
List<String> |
getGraphList()
Creates a list of the names of all available graphs of the default
database.
|
GraphsEntity |
getGraphs()
Returns a GraphsEntity containing all graph as GraphEntity object of the
default database.
|
HttpManager |
getHttpManager()
Returns the HTTP manager of the driver
|
IndexEntity |
getIndex(String indexHandle)
Returns an index from a collection.
|
IndexesEntity |
getIndexes(String collectionName)
Returns all indices from a collection.
|
List<String> |
getJobIds()
Returns a list of all job identifiers of asynchronous executed jobs.
|
<T> T |
getJobResult(String jobId)
Returns the job result for a given job id.
|
List<String> |
getJobs(JobsEntity.JobState jobState)
Returns a list of all job identifiers of asynchronous executed jobs,
filtered by job state.
|
List<String> |
getJobs(JobsEntity.JobState jobState,
int count)
Returns a list of all job identifiers of asynchronous executed jobs,
filtered by job state.
|
String |
getLastJobId()
Returns the identifier of the last asynchronous executed job.
|
QueryCachePropertiesEntity |
getQueryCacheProperties()
Returns the global configuration for the AQL query cache (since ArangoDB
2.7)
|
QueryTrackingPropertiesEntity |
getQueryTrackingProperties()
Returns the configuration for the AQL query tracking
|
ReplicationApplierConfigEntity |
getReplicationApplierConfig()
Returns the configuration of the replication applier.
|
ReplicationApplierStateEntity |
getReplicationApplierState()
Returns the state of the replication applier, regardless of whether the
applier is currently running or not.
|
<T> void |
getReplicationDump(String collectionName,
Long from,
Long to,
Integer chunkSize,
Boolean ticks,
Class<T> clazz,
DumpHandler<T> handler)
Returns the data from the collection for the requested range.
|
ReplicationInventoryEntity |
getReplicationInventory()
Returns the list of collections and indexes available on the server.
|
ReplicationInventoryEntity |
getReplicationInventory(boolean includeSystem)
Returns the list of collections and indexes available on the server.
|
ReplicationLoggerConfigEntity |
getReplicationLoggerConfig()
Returns the configuration of the replication logger
|
ReplicationLoggerStateEntity |
getReplicationLoggerState()
Returns the current state of the server's replication logger.
|
String |
getReplicationServerId()
Returns the servers id.
|
AdminLogEntity |
getServerLog(Integer logLevel,
Boolean logLevelUpTo,
Integer start,
Integer size,
Integer offset,
Boolean sortAsc,
String text)
Returns the server log, for the parameters *logLevel* and *logLevelUpTo*
please note the following: fatal or 0 error or 1 warning or 2 info or 3
debug or 4 The default value is info.
|
QueriesResultEntity |
getSlowQueries()
Returns a list of slow running AQL queries of the default database
|
QueriesResultEntity |
getSlowQueries(String database)
Returns a list of slow running AQL queries of a database
|
StatisticsEntity |
getStatistics()
Returns the current statistics
|
StatisticsDescriptionEntity |
getStatisticsDescription()
Returns the statistics description
|
ArangoUnixTime |
getTime()
Returns the current server time
|
<V,E> TraversalEntity<V,E> |
getTraversal(TraversalQueryOptions traversalQueryOptions,
Class<V> vertexClazz,
Class<E> edgeClazz)
Do a graph traversal.
|
UserEntity |
getUser(String username)
Returns a database user.
|
List<UserEntity> |
getUsers()
Returns all database user.
|
List<DocumentEntity<UserEntity>> |
getUsersDocument()
Returns all database user as document.
|
ArangoVersion |
getVersion()
Returns the database version
|
DefaultEntity |
grantDatabaseAccess(String username,
String database)
Grants the User access to the given database.
|
<T> EdgeEntity<T> |
graphCreateEdge(String graphName,
String edgeCollectionName,
String key,
String fromHandle,
String toHandle)
Stores a new edge with no further information into the given collection.
|
<T> EdgeEntity<T> |
graphCreateEdge(String graphName,
String edgeCollectionName,
String key,
String fromHandle,
String toHandle,
T value,
Boolean waitForSync)
Stores a new edge with the information contained within the body into the
given collection.
|
<T> EdgeEntity<T> |
graphCreateEdge(String graphName,
String edgeCollectionName,
String fromHandle,
String toHandle,
T value,
Boolean waitForSync)
Stores a new edge with the information contained within the body into the
given collection.
|
GraphEntity |
graphCreateEdgeDefinition(String graphName,
EdgeDefinitionEntity edgeDefinition)
Adds a new edge definition to an existing graph
|
<T> VertexEntity<T> |
graphCreateVertex(String graphName,
String collectionName,
String key,
T vertex,
Boolean waitForSync)
Stores a new vertex with the information contained within the document
into the given collection.
|
<T> VertexEntity<T> |
graphCreateVertex(String graphName,
String collectionName,
T vertex,
Boolean waitForSync)
Stores a new vertex with the information contained within the document
into the given collection.
|
GraphEntity |
graphCreateVertexCollection(String graphName,
String collectionName)
Creates a vertex collection
|
DeletedEntity |
graphDeleteEdge(String graphName,
String edgeCollectionName,
String key)
Deletes an edge with the given id, if it is contained within the graph.
|
DeletedEntity |
graphDeleteEdge(String graphName,
String edgeCollectionName,
String key,
Boolean waitForSync)
Deletes an edge with the given id, if it is contained within the graph.
|
DeletedEntity |
graphDeleteEdge(String graphName,
String edgeCollectionName,
String key,
Boolean waitForSync,
String ifMatchRevision,
String ifNoneMatchRevision)
Deletes an edge with the given id, if it is contained within the graph.
|
GraphEntity |
graphDeleteEdgeDefinition(String graphName,
String edgeCollectionName,
Boolean dropCollection)
Removes an existing edge definition from this graph.
|
DeletedEntity |
graphDeleteVertex(String graphName,
String collectionName,
String key)
Deletes a vertex with the given key, if it is contained within the graph.
|
DeletedEntity |
graphDeleteVertex(String graphName,
String collectionName,
String key,
Boolean waitForSync)
Deletes a vertex with the given key, if it is contained within the graph.
|
DeletedEntity |
graphDeleteVertex(String graphName,
String collectionName,
String key,
Boolean waitForSync,
String ifMatchRevision,
String ifNoneMatchRevision)
Deletes a vertex with the given key, if it is contained within the graph.
|
DeletedEntity |
graphDeleteVertexCollection(String graphName,
String collectionName,
Boolean dropCollection)
Removes a vertex collection from the graph and optionally deletes the
collection, if it is not used in any other graph.
|
<T> EdgeEntity<T> |
graphGetEdge(String graphName,
String edgeCollectionName,
String key,
Class<T> clazz)
Loads an edge with the given key if it is contained within your graph.
|
<T> EdgeEntity<T> |
graphGetEdge(String graphName,
String edgeCollectionName,
String key,
Class<T> clazz,
String ifMatchRevision,
String ifNoneMatchRevision)
Loads an edge with the given key if it is contained within your graph.
|
List<String> |
graphGetEdgeCollections(String graphName)
Returns a list of all edge collection of a graph that are defined in the
graphs edgeDefinitions
|
EdgeCursor<PlainEdgeEntity> |
graphGetEdgeCursor(String graphName)
Returns all Edges of a graph, each edge as a PlainEdgeEntity.
|
<T> EdgeCursor<T> |
graphGetEdgeCursor(String graphName,
Class<T> clazz,
Object vertexExample,
GraphEdgesOptions graphEdgesOptions,
AqlQueryOptions aqlQueryOptions)
Deprecated.
use AQL instead
|
<T> EdgeCursor<T> |
graphGetEdgeCursorByExample(String graphName,
Class<T> clazz,
Object vertexExample)
Returns all Edges of a given vertex.
|
<V,E> ShortestPathEntity<V,E> |
graphGetShortestPath(String graphName,
Object startVertexExample,
Object endVertexExample,
ShortestPathOptions shortestPathOptions,
Class<V> vertexClass,
Class<E> edgeClass)
Deprecated.
use AQL instead
|
<T> VertexEntity<T> |
graphGetVertex(String graphName,
String collectionName,
String key,
Class<T> clazz)
Gets a vertex with the given key if it is contained within your graph.
|
<T> VertexEntity<T> |
graphGetVertex(String graphName,
String collectionName,
String key,
Class<T> clazz,
String ifNoneMatchRevision,
String ifMatchRevision)
Gets a vertex with the given key if it is contained within your graph.
|
List<String> |
graphGetVertexCollections(String graphName)
Returns a list of all vertex collection of a graph that are defined in
the graphs edgeDefinitions (in "from", "to", and "orphanCollections")
|
List<String> |
graphGetVertexCollections(String graphName,
boolean excludeOrphan)
Returns a list of all vertex collection of a graph that are defined in
the graphs edgeDefinitions (in "from", "to", and "orphanCollections")
|
<T> VertexCursor<T> |
graphGetVertexCursor(String graphName,
Class<T> clazz,
Object vertexExample,
GraphVerticesOptions graphVerticesOptions,
AqlQueryOptions aqlQueryOptions)
Deprecated.
use AQL instead
|
<T> EdgeEntity<T> |
graphReplaceEdge(String graphName,
String edgeCollectionName,
String key,
String fromHandle,
String toHandle,
T value)
Replaces an edge with the given key by the content in the body.
|
<T> EdgeEntity<T> |
graphReplaceEdge(String graphName,
String edgeCollectionName,
String key,
String fromHandle,
String toHandle,
T value,
Boolean waitForSync,
String ifMatchRevision,
String ifNoneMatchRevision)
Replaces an edge with the given key by the content in the body.
|
GraphEntity |
graphReplaceEdgeDefinition(String graphName,
String edgeCollectionName,
EdgeDefinitionEntity edgeDefinition)
Replaces an existing edge definition to an existing graph.
|
<T> VertexEntity<T> |
graphReplaceVertex(String graphName,
String collectionName,
String key,
T vertex)
Replaces a vertex with the given key by the content in the body.
|
<T> VertexEntity<T> |
graphReplaceVertex(String graphName,
String collectionName,
String key,
T vertex,
Boolean waitForSync,
String ifMatchRevision,
String ifNoneMatchRevision)
Replaces a vertex with the given key by the content in the body.
|
<T> EdgeEntity<T> |
graphUpdateEdge(String graphName,
String edgeCollectionName,
String key,
String fromHandle,
String toHandle,
T value,
Boolean keepNull)
Updates an edge with the given key by adding the content in the body.
|
<T> EdgeEntity<T> |
graphUpdateEdge(String graphName,
String edgeCollectionName,
String key,
String fromHandle,
String toHandle,
T value,
Boolean waitForSync,
Boolean keepNull,
String ifMatchRevision,
String ifNoneMatchRevision)
Updates an edge with the given key by adding the content in the body.
|
<T> VertexEntity<T> |
graphUpdateVertex(String graphName,
String collectionName,
String key,
T vertex,
Boolean keepNull)
Updates a vertex with the given key by adding the content in the body.
|
<T> VertexEntity<T> |
graphUpdateVertex(String graphName,
String collectionName,
String key,
T vertex,
Boolean keepNull,
Boolean waitForSync,
String ifMatchRevision,
String ifNoneMatchRevision)
Updates a vertex with the given key by adding the content in the body.
|
ImportResultEntity |
importDocuments(String collection,
Collection<?> values)
Creates documents in a collection.
|
ImportResultEntity |
importDocuments(String collection,
Collection<?> values,
ImportOptionsJson importOptionsJson)
Creates documents in a collection.
|
ImportResultEntity |
importDocumentsByHeaderValues(String collection,
Collection<? extends Collection<?>> headerValues)
Creates documents in a collection.
|
ImportResultEntity |
importDocumentsByHeaderValues(String collection,
Collection<? extends Collection<?>> headerValues,
ImportOptions importOptions)
Creates documents in a collection.
|
ImportResultEntity |
importDocumentsByHeaderValuesRaw(String collection,
String headerValues,
ImportOptions importOptions)
Creates documents in a collection.
|
ImportResultEntity |
importDocumentsRaw(String collection,
String values,
ImportOptionsRaw importOptionsRaw)
Creates documents in a collection.
|
DefaultEntity |
killQuery(String id)
Kills an AQL query
|
DefaultEntity |
killQuery(String database,
String id)
Kills an AQL query
|
CollectionEntity |
loadCollection(String name)
Returns the collection and loads it into memory.
|
CollectionEntity |
loadCollection(String name,
Boolean count)
Returns the collection and loads it into memory.
|
DefaultEntity |
reloadRouting()
Triggers the routes reloading in ArangoDB
|
CollectionEntity |
renameCollection(String name,
String newName)
Returns the collection and changes it's name.
|
DocumentEntity<?> |
replaceDocument(String collectionName,
String documentKey,
Object value,
String rev,
Boolean waitForSync)
This method replaces the content of the document defined by documentKey.
|
<T> DocumentEntity<T> |
replaceDocument(String collectionName,
String documentKey,
T value)
This method replaces the content of the document defined by documentKey.
|
<T> DocumentEntity<T> |
replaceDocument(String documentHandle,
T value)
This method replaces the content of the document defined by
documentHandle.
|
<T> DocumentEntity<T> |
replaceDocument(String documentHandle,
T value,
String rev,
Boolean waitForSync)
This method replaces the content of the document defined by
documentHandle.
|
DocumentEntity<String> |
replaceDocumentRaw(String documentHandle,
String rawJsonString,
String rev,
Boolean waitForSync)
This method replaces the content of the document defined by
documentHandle.
|
DefaultEntity |
replaceUser(String username,
String passwd,
Boolean active,
Map<String,Object> extra)
Replaces the data of a database user.
|
CollectionEntity |
setCollectionProperties(String name,
Boolean newWaitForSync,
Long journalSize)
Returns the collection and changes it's journalSize and waitForSync.
|
void |
setDefaultDatabase(String database)
Sets the default database.
|
QueryCachePropertiesEntity |
setQueryCacheProperties(QueryCachePropertiesEntity properties)
Changes the configuration for the AQL query cache (since ArangoDB 2.7)
|
QueryTrackingPropertiesEntity |
setQueryTrackingProperties(QueryTrackingPropertiesEntity properties)
Changes the configuration for the AQL query tracking
|
ReplicationApplierConfigEntity |
setReplicationApplierConfig(ReplicationApplierConfigEntity replicationApplierConfigEntity)
Sets the configuration of the replication applier.
|
ReplicationApplierConfigEntity |
setReplicationApplierConfig(String endpoint,
String database,
String username,
String password,
Integer maxConnectRetries,
Integer connectTimeout,
Integer requestTimeout,
Integer chunkSize,
Boolean autoStart,
Boolean adaptivePolling)
Sets the configuration of the replication applier.
|
ReplicationLoggerConfigEntity |
setReplicationLoggerConfig(Boolean autoStart,
Boolean logRemoteChanges,
Long maxEvents,
Long maxEventsSize)
Sets the replication logger configuration
|
void |
startAsyncMode(boolean fireAndForget)
This method sets the driver to asynchronous execution.
|
void |
startBatchMode()
This method enables batch execution.
|
ReplicationApplierStateEntity |
startReplicationApplier(Long from)
Starts the replication applier.
|
boolean |
startReplicationLogger()
Starts the replication logger
|
void |
stopAsyncMode()
This method sets the driver back to synchronous execution.
|
ReplicationApplierStateEntity |
stopReplicationApplier()
Stops the replication applier.
|
boolean |
stopReplicationLogger()
Stops the replication logger
|
ReplicationSyncEntity |
syncReplication(String endpoint,
String database,
String username,
String password,
RestrictType restrictType,
String... restrictCollections)
Starts a full data synchronization from a remote endpoint into the local
ArangoDB database.
|
CollectionEntity |
truncateCollection(String name)
Returns the collection and deletes all documents.
|
CollectionEntity |
unloadCollection(String name)
Returns the collection and deletes it from memory.
|
DocumentEntity<?> |
updateDocument(String collectionName,
String documentKey,
Object value)
This method updates a document defined by documentKey.
|
DocumentEntity<?> |
updateDocument(String collectionName,
String documentKey,
Object value,
Boolean keepNull)
This method updates a document defined by documentKey.
|
DocumentEntity<?> |
updateDocument(String collectionName,
String documentKey,
Object value,
String rev,
Boolean waitForSync,
Boolean keepNull)
This method updates a document defined by documentKey.
|
<T> DocumentEntity<T> |
updateDocument(String documentHandle,
T value)
This method updates a document defined by documentHandle.
|
<T> DocumentEntity<T> |
updateDocument(String documentHandle,
T value,
Boolean keepNull)
This method updates a document defined by documentKey.
|
<T> DocumentEntity<T> |
updateDocument(String documentHandle,
T value,
String rev,
Boolean waitForSync,
Boolean keepNull)
This method updates a document defined by documentHandle.
|
DocumentEntity<String> |
updateDocumentRaw(String documentHandle,
String rawJsonString,
String rev,
Boolean waitForSync,
Boolean keepNull)
This method updates a document defined by documentHandle.
|
DefaultEntity |
updateUser(String username,
String passwd,
Boolean active,
Map<String,Object> extra)
Updates the data of a database user.
|
CursorEntity<?> |
validateQuery(String query)
This method validates a given AQL query string and returns a CursorEntity
|
createDocumentEndpointUrl, createDocumentHandle, createDocumentHandle, createEndpointUrl, createEndpointUrl, createEntity, createEntity, createEntity, createEntity, createEntityImpl, createGharialEndpointUrl, createIndexEndpointUrl, createJobEndpointUrl, createUserEndpointUrl, getJSONResponseText, setKeyValueHeader, setStatusCode, toReplicationDumpHeader, validate, validateCollectionName, validateDatabaseName, validateDocumentHandle
public ArangoDriver(ArangoConfigure configure)
configure
- A configuration object.public ArangoDriver(ArangoConfigure configure, String database)
configure
- A configuration object.database
- the name of the database that will be used.public void startBatchMode() throws ArangoException
ArangoException
cancelBatchMode()
,
executeBatch()
,
getBatchResponseByRequestId(String)
public void startAsyncMode(boolean fireAndForget) throws ArangoException
fireAndForget
- if set to true the asynchronous mode is set to 'fire and
forget'.ArangoException
stopAsyncMode()
,
getJobResult(String)
,
getJobs(com.arangodb.entity.JobsEntity.JobState,
int)
,
deleteExpiredJobs(int)
,
getLastJobId()
public void stopAsyncMode() throws ArangoException
public String getLastJobId()
startAsyncMode(boolean)
,
stopAsyncMode()
,
getJobResult(String)
,
getJobs(com.arangodb.entity.JobsEntity.JobState,
int)
,
deleteExpiredJobs(int)
,
getLastJobId()
public List<String> getJobIds()
startAsyncMode(boolean)
,
stopAsyncMode()
,
getJobResult(String)
,
getJobs(com.arangodb.entity.JobsEntity.JobState,
int)
,
deleteExpiredJobs(int)
,
getLastJobId()
public List<String> getJobs(JobsEntity.JobState jobState, int count) throws ArangoException
jobState
- the job state as a filter.count
- a limit for the result set.ArangoException
startAsyncMode(boolean)
,
stopAsyncMode()
,
getJobResult(String)
,
getJobIds()
,
deleteExpiredJobs(int)
,
getLastJobId()
public List<String> getJobs(JobsEntity.JobState jobState) throws ArangoException
jobState
- the job state as a filter.ArangoException
startAsyncMode(boolean)
,
stopAsyncMode()
,
getJobResult(String)
,
getJobIds()
,
deleteExpiredJobs(int)
,
getLastJobId()
public void deleteAllJobs() throws ArangoException
public void deleteJobById(String jobId) throws ArangoException
jobId
- the identifier of the jobArangoException
startAsyncMode(boolean)
,
stopAsyncMode()
,
getJobResult(String)
,
getJobIds()
,
deleteExpiredJobs(int)
,
getLastJobId()
public void deleteExpiredJobs(int timeStamp) throws ArangoException
timeStamp
- a unix timestamp, every older job is deleted.ArangoException
startAsyncMode(boolean)
,
stopAsyncMode()
,
getJobResult(String)
,
getJobIds()
,
deleteExpiredJobs(int)
,
getLastJobId()
public <T> T getJobResult(String jobId) throws ArangoException
jobId
- the job id.ArangoException
startAsyncMode(boolean)
,
stopAsyncMode()
,
getJobResult(String)
,
getJobIds()
,
deleteExpiredJobs(int)
,
getLastJobId()
public DefaultEntity executeBatch() throws ArangoException
ArangoException
startBatchMode()
,
cancelBatchMode()
public <T> T getBatchResponseByRequestId(String requestId) throws ArangoException
requestId
- the id of a request.ArangoException
startBatchMode()
,
executeBatch()
,
cancelBatchMode()
public void cancelBatchMode() throws ArangoException
ArangoException
startBatchMode()
,
executeBatch()
public String getDefaultDatabase()
public void setDefaultDatabase(String database)
database
- public CollectionEntity createCollection(String name) throws ArangoException
name
- the name of the collectionArangoException
public CollectionEntity createCollection(String name, CollectionOptions collectionOptions) throws ArangoException
name
- the name of the collectioncollectionOptions
- an object containing the various options.ArangoException
public CollectionEntity getCollection(String name) throws ArangoException
name
- the name of the collection.ArangoException
public CollectionEntity getCollectionProperties(String name) throws ArangoException
name
- the name of the collection.ArangoException
public CollectionEntity getCollectionCount(String name) throws ArangoException
name
- the name of the collection.ArangoException
public CollectionEntity getCollectionFigures(String name) throws ArangoException
name
- the name of the collection.ArangoException
public CollectionEntity getCollectionChecksum(String name, Boolean withRevisions, Boolean withData) throws ArangoException
name
- the id of the collection.withRevisions
- includes the revision into the checksum calculationwithData
- includes the collections data into the checksum calculationArangoException
public CollectionsEntity getCollections() throws ArangoException
ArangoException
public CollectionsEntity getCollections(Boolean excludeSystem) throws ArangoException
excludeSystem
- if set to true system collections will not be added to the
resultArangoException
public CollectionEntity loadCollection(String name) throws ArangoException
name
- the name of the collection.ArangoException
public CollectionEntity loadCollection(String name, Boolean count) throws ArangoException
name
- the name of the collection.count
- if set to true the documents count is returned.ArangoException
public CollectionEntity unloadCollection(String name) throws ArangoException
name
- the name of the collection.ArangoException
public CollectionEntity truncateCollection(String name) throws ArangoException
name
- the name of the collection.ArangoException
public CollectionEntity setCollectionProperties(String name, Boolean newWaitForSync, Long journalSize) throws ArangoException
name
- the name of the collection.newWaitForSync
- a new value for the waitForSyncPropertyjournalSize
- a new value for the collections journalSizeArangoException
public CollectionEntity renameCollection(String name, String newName) throws ArangoException
name
- the name of the collection.newName
- the new name for the collectionArangoException
public CollectionEntity deleteCollection(String name) throws ArangoException
name
- the name of the collection.ArangoException
public <T> DocumentEntity<T> createDocument(String collectionName, T value) throws ArangoException
collectionName
- The name of the collectionvalue
- An object containing the documents attributesArangoException
public <T> DocumentEntity<T> createDocument(String collectionName, String documentKey, T value) throws ArangoException
collectionName
- The name of the collectiondocumentKey
- the desired document keyvalue
- An object containing the documents attributesArangoException
CollectionKeyOption.allowUserKeys
public <T> DocumentEntity<T> createDocument(String collectionName, T value, Boolean waitForSync) throws ArangoException
collectionName
- The name of the collectionvalue
- An object containing the documents attributeswaitForSync
- if set to true the response is returned when the server has
finished.ArangoException
CollectionKeyOption.allowUserKeys
public <T> DocumentEntity<T> createDocument(String collectionName, String documentKey, T value, Boolean waitForSync) throws ArangoException
collectionName
- The name of the collectiondocumentKey
- the desired document keyvalue
- An object containing the documents attributeswaitForSync
- if set to true the response is returned when the server has
finished.ArangoException
CollectionKeyOption.allowUserKeys
public <T> DocumentEntity<T> replaceDocument(String collectionName, String documentKey, T value) throws ArangoException
collectionName
- The collection's name.documentKey
- The document's key.value
- An object containing the documents attributesArangoException
public <T> DocumentEntity<T> replaceDocument(String documentHandle, T value) throws ArangoException
documentHandle
- The document handle.value
- An object containing the documents attributesArangoException
public DocumentEntity<?> replaceDocument(String collectionName, String documentKey, Object value, String rev, Boolean waitForSync) throws ArangoException
collectionName
- The collection's name.documentKey
- The document's key.value
- An object containing the new attributes of the document.rev
- the desired revision.waitForSync
- if set to true the response is returned when the server has
finished.ArangoException
public <T> DocumentEntity<T> replaceDocument(String documentHandle, T value, String rev, Boolean waitForSync) throws ArangoException
documentHandle
- The document's handle.value
- An object containing the new attributes of the document.rev
- the desired revision.waitForSync
- if set to true the response is returned when the server has
finished.ArangoException
public DocumentEntity<?> updateDocument(String collectionName, String documentKey, Object value) throws ArangoException
collectionName
- The collection's name.documentKey
- The document's key.value
- An object containing the documents attributesArangoException
public <T> DocumentEntity<T> updateDocument(String documentHandle, T value) throws ArangoException
documentHandle
- The document's handle.value
- An object containing the documents attributesArangoException
public DocumentEntity<?> updateDocument(String collectionName, String documentKey, Object value, Boolean keepNull) throws ArangoException
collectionName
- The collection name.documentKey
- The document key.value
- An object containing the documents attributeskeepNull
- If true null values are kept.ArangoException
public <T> DocumentEntity<T> updateDocument(String documentHandle, T value, Boolean keepNull) throws ArangoException
documentHandle
- The document handle.value
- An object containing the documents attributeskeepNull
- If true null values are kept.ArangoException
public DocumentEntity<?> updateDocument(String collectionName, String documentKey, Object value, String rev, Boolean waitForSync, Boolean keepNull) throws ArangoException
collectionName
- The collection name.documentKey
- The document key.value
- An object containing the documents attributesrev
- The desired revisionwaitForSync
- if set to true the response is returned when the server has
finished.keepNull
- If true null values are kept.ArangoException
public <T> DocumentEntity<T> updateDocument(String documentHandle, T value, String rev, Boolean waitForSync, Boolean keepNull) throws ArangoException
documentHandle
- The document handle.value
- An object containing the documents attributesrev
- The desired revisionwaitForSync
- if set to true the response is returned when the server has
finished.keepNull
- If true null values are kept.ArangoException
public List<String> getDocuments(String collectionName) throws ArangoException
collectionName
- The collection name.ArangoException
public boolean exists(String collectionName, String documentKey) throws ArangoException
collectionName
- The collection name.documentKey
- The document keyArangoException
public boolean exists(String documentHandle) throws ArangoException
documentHandle
- The document handleArangoException
public String checkDocument(String collectionName, String documentKey) throws ArangoException
collectionName
- The collection name.documentKey
- The document keyArangoException
public String checkDocument(String documentHandle) throws ArangoException
documentHandle
- The document handleArangoException
public <T> DocumentEntity<T> getDocument(String collectionName, String documentKey, Class<T> clazz) throws ArangoException
collectionName
- The collection name.documentKey
- The document keyclazz
- The expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> DocumentEntity<T> getDocument(String documentHandle, Class<T> clazz) throws ArangoException
documentHandle
- The document handleclazz
- The expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> DocumentEntity<T> getDocument(String documentHandle, Class<T> clazz, String ifNoneMatchRevision, String ifMatchRevision) throws ArangoException
documentHandle
- The document handleclazz
- The expected class, the result from the server request is
deserialized to an instance of this class.ifNoneMatchRevision
- if set the document is only returned id it has a different
revision.ifMatchRevision
- if set the document is only returned id it has the same
revision.ArangoException
public DocumentEntity<?> deleteDocument(String collectionName, String documentKey) throws ArangoException
collectionName
- The collection name.documentKey
- The document key.ArangoException
public DocumentEntity<?> deleteDocument(String documentHandle) throws ArangoException
documentHandle
- The document handle.ArangoException
public DocumentEntity<?> deleteDocument(String collectionName, String documentKey, String rev) throws ArangoException
collectionName
- The collection name.documentKey
- The document key.rev
- The desired revisionArangoException
public CursorEntity<?> validateQuery(String query) throws ArangoException
query
- an AQL query as stringArangoException
public <T> CursorEntity<T> continueQuery(long cursorId, Class<?>... clazz) throws ArangoException
cursorId
- The id of a cursor.clazz
- the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public DefaultEntity finishQuery(long cursorId) throws ArangoException
cursorId
- The id of a cursor.ArangoException
public <T> CursorEntity<T> executeCursorEntityQuery(String query, Map<String,Object> bindVars, Boolean calcCount, Integer batchSize, Boolean fullCount, Class<?>... clazz) throws ArangoException
query
- an AQL query as stringbindVars
- a map containing all bind variables,clazz
- the expected class, the result from the server request is
deserialized to an instance of this class.calcCount
- if set to true the result count is returnedbatchSize
- the batch size of the result cursor (The batch size has to be
greater than 0)fullCount
- if set to true, then all results before the final LIMIT will
be countedArangoException
public AqlQueryOptions getDefaultAqlQueryOptions()
public <T> DocumentCursor<T> executeDocumentQuery(String query, Map<String,Object> bindVars, AqlQueryOptions aqlQueryOptions, Class<T> clazz) throws ArangoException
query
- an AQL query as stringbindVars
- a map containing all bind variables,aqlQueryOptions
- AQL query options (null for default values)clazz
- the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorResult<T> executeAqlQuery(String query, Map<String,Object> bindVars, AqlQueryOptions aqlQueryOptions, Class<T> clazz) throws ArangoException
query
- an AQL query as stringbindVars
- a map containing all bind variables,aqlQueryOptions
- AQL query optionsclazz
- the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public String executeAqlQueryJSON(String query, Map<String,Object> bindVars, AqlQueryOptions aqlQueryOptions) throws ArangoException
query
- an AQL query as stringbindVars
- a map containing all bind variables,aqlQueryOptions
- AQL query optionsArangoException
public <T,S extends DocumentEntity<T>> DocumentCursorResult<T,S> executeAqlQueryWithDocumentCursorResult(String query, Map<String,Object> bindVars, AqlQueryOptions aqlQueryOptions, Class<S> classDocumentEntity, Class<T> clazz) throws ArangoException
query
- an AQL query as stringbindVars
- a map containing all bind variables,aqlQueryOptions
- AQL query optionsclassDocumentEntity
- the class the expected class is wrapped in (the class has to
extend DocumentEntity)clazz
- the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public IndexEntity createIndex(String collectionName, IndexType type, boolean unique, String... fields) throws ArangoException
collectionName
- The collection name.type
- the index type.unique
- if set to true the index will be a unique indexfields
- the fields (document attributes) the index is created onArangoException
public IndexEntity createIndex(String collectionName, IndexType type, boolean unique, boolean sparse, String... fields) throws ArangoException
collectionName
- The collection name.type
- the index type.unique
- if set to true the index will be a unique indexsparse
- if set to true the index will be sparsefields
- the fields (document attributes) the index is created onArangoException
public IndexEntity createHashIndex(String collectionName, boolean unique, String... fields) throws ArangoException
collectionName
- The collection name.unique
- if set to true the index will be a unique indexfields
- the fields (document attributes) the index is created onArangoException
public IndexEntity createHashIndex(String collectionName, boolean unique, boolean sparse, String... fields) throws ArangoException
collectionName
- The collection name.unique
- if set to true the index will be a unique indexsparse
- if set to true the index will be sparsefields
- the fields (document attributes) the index is created onArangoException
public IndexEntity createGeoIndex(String collectionName, boolean unique, String... fields) throws ArangoException
collectionName
- The collection name.unique
- if set to true the index will be a unique indexfields
- the fields (document attributes) the index is created onArangoException
public IndexEntity createSkipListIndex(String collectionName, boolean unique, String... fields) throws ArangoException
collectionName
- The collection name.unique
- if set to true the index will be a unique indexfields
- the fields (document attributes) the index is created onArangoException
public IndexEntity createSkipListIndex(String collectionName, boolean unique, boolean sparse, String... fields) throws ArangoException
collectionName
- The collection name.unique
- if set to true the index will be a unique indexsparse
- if set to true the index will be sparsefields
- the fields (document attributes) the index is created onArangoException
public IndexEntity createPersistentIndex(String collectionName, boolean unique, boolean sparse, String... fields) throws ArangoException
collectionName
- The collection name.unique
- if set to true the index will be a unique indexsparse
- if set to true the index will be sparsefields
- the fields (document attributes) the index is created onArangoException
public IndexEntity createFulltextIndex(String collectionName, String... fields) throws ArangoException
collectionName
- The collection name.fields
- the fields (document attributes) the index is created onArangoException
public IndexEntity createFulltextIndex(String collectionName, Integer minLength, String... fields) throws ArangoException
collectionName
- The collection name.minLength
- Minimum character length of words to index.fields
- the fields (document attributes) the index is created onArangoException
public IndexEntity deleteIndex(String indexHandle) throws ArangoException
indexHandle
- the index handleArangoException
public IndexEntity getIndex(String indexHandle) throws ArangoException
indexHandle
- the index handleArangoException
public IndexesEntity getIndexes(String collectionName) throws ArangoException
collectionName
- The collection name.ArangoException
public AdminLogEntity getServerLog(Integer logLevel, Boolean logLevelUpTo, Integer start, Integer size, Integer offset, Boolean sortAsc, String text) throws ArangoException
logLevel
- if set only logs with this *logLevel* are returnedlogLevelUpTo
- if set all logs up to the *logLevelUpTo* are returnedstart
- Returns all log entries such that their log entry identifier
(lid value) is greater or equal to start.size
- Restricts the result to at most size log entries.offset
- Starts to return log entries skipping the first offset log
entries.sortAsc
- if set to true the default sort order (descending) is reverted
to ascendingtext
- Only return the log entries containing the text specified in
text.ArangoException
public StatisticsEntity getStatistics() throws ArangoException
ArangoException
public StatisticsDescriptionEntity getStatisticsDescription() throws ArangoException
ArangoException
public ArangoVersion getVersion() throws ArangoException
ArangoException
public ArangoUnixTime getTime() throws ArangoException
ArangoException
public DefaultEntity reloadRouting() throws ArangoException
ArangoException
public DefaultEntity executeScript(String jsCode) throws ArangoException
jsCode
- a javascript function as stringArangoException
public <T> DocumentCursor<T> executeSimpleByExampleDocuments(String collectionName, Map<String,Object> example, int skip, int limit, Class<T> clazz) throws ArangoException
collectionName
- - The collection name.example
- The example as a map.skip
- The number of documents to skip in the query.limit
- The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> DocumentCursor<T> executeSimpleAllDocuments(String collectionName, int skip, int limit, Class<T> clazz) throws ArangoException
collectionName
- The collection name.skip
- The number of documents to skip in the query.limit
- The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> ScalarExampleEntity<T> executeSimpleFirstExample(String collectionName, Map<String,Object> example, Class<T> clazz) throws ArangoException
collectionName
- The collection name.example
- The example as a map.clazz
- the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> ScalarExampleEntity<T> executeSimpleAny(String collectionName, Class<T> clazz) throws ArangoException
collectionName
- The collection name.clazz
- the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> DocumentCursor<T> executeSimpleRangeWithDocuments(String collectionName, String attribute, Object left, Object right, Boolean closed, int skip, int limit, Class<T> clazz) throws ArangoException
collectionName
- The collection name.attribute
- The attribute path to check.left
- The lower boundright
- The upper boundclosed
- If true, use interval including left and right, otherwise
exclude right, but include left.skip
- The number of documents to skip in the query.limit
- The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> DocumentCursor<T> executeSimpleFulltextWithDocuments(String collectionName, String attribute, String query, int skip, int limit, String index, Class<T> clazz) throws ArangoException
collectionName
- The collection name.attribute
- The attribute path to check.query
- The fulltext query as string.skip
- The number of documents to skip in the query.limit
- The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public SimpleByResultEntity executeSimpleRemoveByExample(String collectionName, Map<String,Object> example, Boolean waitForSync, Integer limit) throws ArangoException
collectionName
- The collection name.example
- The example as a map.waitForSync
- if set to true the response is returned when the server has
finished.limit
- limits the amount of documents which will be deleted.ArangoException
public SimpleByResultEntity executeSimpleReplaceByExample(String collectionName, Map<String,Object> example, Map<String,Object> newValue, Boolean waitForSync, Integer limit) throws ArangoException
collectionName
- The collection name.example
- The example as a map.newValue
- The new values.waitForSync
- if set to true the response is returned when the server has
finished.limit
- limits the amount of documents which will be replaced.ArangoException
public SimpleByResultEntity executeSimpleUpdateByExample(String collectionName, Map<String,Object> example, Map<String,Object> newValue, Boolean keepNull, Boolean waitForSync, Integer limit) throws ArangoException
collectionName
- The collection name.example
- The example as a map.newValue
- The new values.keepNull
- - If true null values are kept.waitForSync
- if set to true the response is returned when the server has
finished.limit
- limits the amount of documents which will be updated.ArangoException
public DefaultEntity createUser(String username, String passwd, Boolean active, Map<String,Object> extra) throws ArangoException
username
- the username as stringpasswd
- the password as stringactive
- if true the user is activeextra
- additional user dataArangoException
public DefaultEntity replaceUser(String username, String passwd, Boolean active, Map<String,Object> extra) throws ArangoException
username
- the username as stringpasswd
- the password as stringactive
- if true the user is activeextra
- additional user dataArangoException
public DefaultEntity updateUser(String username, String passwd, Boolean active, Map<String,Object> extra) throws ArangoException
username
- the username as stringpasswd
- the password as stringactive
- if true the user is activeextra
- additional user dataArangoException
public DefaultEntity deleteUser(String username) throws ArangoException
username
- the username as stringArangoException
public UserEntity getUser(String username) throws ArangoException
username
- the username as stringArangoException
public DefaultEntity grantDatabaseAccess(String username, String database) throws ArangoException
username
- the username as stringdatabase
- ArangoException
public List<DocumentEntity<UserEntity>> getUsersDocument() throws ArangoException
ArangoException
public List<UserEntity> getUsers() throws ArangoException
ArangoException
public ImportResultEntity importDocuments(String collection, Collection<?> values) throws ArangoException
collection
- the collection as a stringvalues
- a list of Objects that will be stored as documentsArangoException
public ImportResultEntity importDocuments(String collection, Collection<?> values, ImportOptionsJson importOptionsJson) throws ArangoException
collection
- the collection as a stringvalues
- a list of Objects that will be stored as documentsimportOptionsJson
- options for importing documentsArangoException
public ImportResultEntity importDocumentsRaw(String collection, String values, ImportOptionsRaw importOptionsRaw) throws ArangoException
collection
- the collection as a stringvalues
- a raw string containing JSON dataimportOptions
- options for importing documentsArangoException
public ImportResultEntity importDocumentsByHeaderValues(String collection, Collection<? extends Collection<?>> headerValues) throws ArangoException
collection
- the collection as a stringheaderValues
- a list of lists that will be stored as documentsArangoException
public ImportResultEntity importDocumentsByHeaderValues(String collection, Collection<? extends Collection<?>> headerValues, ImportOptions importOptions) throws ArangoException
collection
- the collection as a stringheaderValues
- a list of lists that will be stored as documentsimportOptions
- options for importing documentsArangoException
public ImportResultEntity importDocumentsByHeaderValuesRaw(String collection, String headerValues, ImportOptions importOptions) throws ArangoException
collection
- the collection as a stringheaderValues
- raw JSON data that contains a list of lists that will be
stored as documentsimportOptions
- options for importing documentsArangoException
public DatabaseEntity getCurrentDatabase() throws ArangoException
ArangoException
public StringsResultEntity getDatabases() throws ArangoException
ArangoException
public StringsResultEntity getDatabases(boolean currentUserAccessableOnly) throws ArangoException
currentUserAccessableOnly
- If true only the databases are returned that the current user
can accessArangoException
public StringsResultEntity getDatabases(String username, String password) throws ArangoException
username
- the username as stringpassword
- the password as stringArangoException
public BooleanResultEntity createDatabase(String database, UserEntity... users) throws ArangoException
database
- the database name as a stringusers
- a list of users which are supposed to have access to the
databaseArangoException
public BooleanResultEntity deleteDatabase(String database) throws ArangoException
database
- the database name as a stringArangoException
public BooleanResultEntity createEndpoint(String endpoint, String... databases) throws ArangoException
endpoint
- the endpoint as stringdatabases
- a list of databases that are allowed on this endpointArangoException
public List<Endpoint> getEndpoints() throws ArangoException
ArangoException
public BooleanResultEntity deleteEndpoint(String endpoint) throws ArangoException
endpoint
- the endpoint as stringArangoException
public ReplicationInventoryEntity getReplicationInventory() throws ArangoException
ArangoException
public ReplicationInventoryEntity getReplicationInventory(boolean includeSystem) throws ArangoException
includeSystem
- if true the system collections are included into the resultArangoException
public <T> void getReplicationDump(String collectionName, Long from, Long to, Integer chunkSize, Boolean ticks, Class<T> clazz, DumpHandler<T> handler) throws ArangoException
collectionName
- the collection namefrom
- Lower bound tick value for results.to
- Upper bound tick value for results.chunkSize
- Approximate maximum size of the returned result.ticks
- Whether or not to include tick values in the dump. Default
value is true.clazz
- the expected class, the result from the server request is
deserialized to an instance of this class.handler
- a handler object that processes the dumpArangoException
public ReplicationSyncEntity syncReplication(String endpoint, String database, String username, String password, RestrictType restrictType, String... restrictCollections) throws ArangoException
endpoint
- the endpoint as stringdatabase
- the database name as a stringusername
- the username as stringpassword
- the password as stringrestrictType
- collection filtering. When specified, the allowed values are
include or exclude.restrictCollections
- If restrictType is include, only the specified collections
will be sychronised. If restrictType is exclude, all but the
specified collections will be synchronized.ArangoException
public String getReplicationServerId() throws ArangoException
ArangoException
public boolean startReplicationLogger() throws ArangoException
ArangoException
public boolean stopReplicationLogger() throws ArangoException
ArangoException
public ReplicationLoggerStateEntity getReplicationLoggerState() throws ArangoException
ArangoException
public ReplicationLoggerConfigEntity getReplicationLoggerConfig() throws ArangoException
ArangoException
public ReplicationLoggerConfigEntity setReplicationLoggerConfig(Boolean autoStart, Boolean logRemoteChanges, Long maxEvents, Long maxEventsSize) throws ArangoException
autoStart
- if true autoStart is activatedlogRemoteChanges
- if true remote changes are loggedmaxEvents
- the maximum amount of events to logmaxEventsSize
- the maximum size of eventsArangoException
public ReplicationApplierConfigEntity getReplicationApplierConfig() throws ArangoException
ArangoException
public ReplicationApplierConfigEntity setReplicationApplierConfig(String endpoint, String database, String username, String password, Integer maxConnectRetries, Integer connectTimeout, Integer requestTimeout, Integer chunkSize, Boolean autoStart, Boolean adaptivePolling) throws ArangoException
endpoint
- the logger server to connect to (e.g.
"tcp://192.168.173.13:8529").database
- the name of the database on the endpoint.username
- an optional ArangoDB username to use when connecting to the
endpointpassword
- the password to use when connecting to the endpoint.maxConnectRetries
- the maximum number of connection attempts the applier will
make in a row. If the applier cannot establish a connection to
the endpoint in this number of attempts, it will stop itself.connectTimeout
- the timeout (in seconds) when attempting to connect to the
endpoint. This value is used for each connection attempt.requestTimeout
- the timeout (in seconds) for individual requests to the
endpoint.chunkSize
- the requested maximum size for log transfer packets that is
used when the endpoint is contacted.autoStart
- whether or not to auto-start the replication applier on (next
and following) server startsadaptivePolling
- if set to true, the replication applier will fall to sleep for
an increasingly long period in case the logger server at the
endpoint does not have any more replication events to apply.ArangoException
public ReplicationApplierConfigEntity setReplicationApplierConfig(ReplicationApplierConfigEntity replicationApplierConfigEntity) throws ArangoException
replicationApplierConfigEntity
- an instance of ReplicationApplierConfigEntity containing the
complete configArangoException
public ReplicationApplierStateEntity startReplicationApplier(Long from) throws ArangoException
from
- The remote lastLogTick value from which to start applying.ArangoException
public ReplicationApplierStateEntity stopReplicationApplier() throws ArangoException
ArangoException
public ReplicationApplierStateEntity getReplicationApplierState() throws ArangoException
ArangoException
public GraphsEntity getGraphs() throws ArangoException
ArangoException
public List<String> getGraphList() throws ArangoException
ArangoException
public GraphEntity createGraph(String graphName, List<EdgeDefinitionEntity> edgeDefinitions, List<String> orphanCollections, Boolean waitForSync) throws ArangoException
graphName
- The name of the graph to be created.edgeDefinitions
- List of the graphs edge definitions.orphanCollections
- List of the graphs orphan collections.waitForSync
- Wait for sync.ArangoException
public GraphEntity createGraph(GraphEntity graph, Boolean waitForSync) throws ArangoException
graph
- The graph objet to be persistet.waitForSync
- Wait for sync.ArangoException
public GraphEntity createGraph(String graphName, Boolean waitForSync) throws ArangoException
graphName
- The name of the graph to be created.waitForSync
- Wait for sync.ArangoException
public GraphEntity getGraph(String graphName) throws ArangoException
graphName
- The name of the graph.ArangoException
public DeletedEntity deleteGraph(String graphName) throws ArangoException
graphName
- Name of the graph to be deleted.ArangoException
public void deleteGraph(String graphName, Boolean dropCollections) throws ArangoException
graphName
- Name of the graph to be deleted.dropCollections
- Indicates if the collections of the graph will be droppedArangoException
public List<String> graphGetVertexCollections(String graphName) throws ArangoException
graphName
- The graph name.ArangoException
public List<String> graphGetVertexCollections(String graphName, boolean excludeOrphan) throws ArangoException
graphName
- The graph name.excludeOrphan
- ArangoException
public DeletedEntity graphDeleteVertexCollection(String graphName, String collectionName, Boolean dropCollection) throws ArangoException
graphName
- The graph name.collectionName
- The name of the vertex collection to be removed from the
graph.dropCollection
- Indicates if the collection will be droppedArangoException
public GraphEntity graphCreateVertexCollection(String graphName, String collectionName) throws ArangoException
graphName
- The graph name.collectionName
- The name of the collection to be created.ArangoException
public List<String> graphGetEdgeCollections(String graphName) throws ArangoException
graphName
- The graph name.ArangoException
public GraphEntity graphCreateEdgeDefinition(String graphName, EdgeDefinitionEntity edgeDefinition) throws ArangoException
graphName
- The graph name.edgeDefinition
- The edge definition to be added.ArangoException
public GraphEntity graphReplaceEdgeDefinition(String graphName, String edgeCollectionName, EdgeDefinitionEntity edgeDefinition) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the edge collection of the edge definition that
has to be replaced.edgeDefinition
- The new edge definition.ArangoException
public GraphEntity graphDeleteEdgeDefinition(String graphName, String edgeCollectionName, Boolean dropCollection) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of edge collection of the edge definition which has
to be deleted.ArangoException
public <T> VertexEntity<T> graphCreateVertex(String graphName, String collectionName, T vertex, Boolean waitForSync) throws ArangoException
graphName
- The name of the graph.collectionName
- The name of the collection, where the vertex will be created.vertex
- The vertex object to be storedwaitForSync
- Wait for sync.ArangoException
public <T> VertexEntity<T> graphCreateVertex(String graphName, String collectionName, String key, T vertex, Boolean waitForSync) throws ArangoException
graphName
- The name of the graph.collectionName
- The name of the collection, where the vertex will be created.key
- The vertex key.vertex
- The vertex object to be storedwaitForSync
- Wait for sync.ArangoException
public <T> VertexEntity<T> graphGetVertex(String graphName, String collectionName, String key, Class<T> clazz) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to get.key
- The key (document handle) of the vertex to get.clazz
- The class of the vertex to get.ArangoException
public <T> VertexEntity<T> graphGetVertex(String graphName, String collectionName, String key, Class<T> clazz, String ifNoneMatchRevision, String ifMatchRevision) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to get.key
- The key (document handle) of the vertex to get.clazz
- The class of the vertex to get.ifMatchRevision
- If not null the revision of the vertex in the database has to
be equal to return a document.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to
be different to return a document.ArangoException
public DeletedEntity graphDeleteVertex(String graphName, String collectionName, String key) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to delete.key
- The key (document handle) of the vertex to delete.ArangoException
public DeletedEntity graphDeleteVertex(String graphName, String collectionName, String key, Boolean waitForSync) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to delete.key
- The key (document handle) of the vertex to delete.waitForSync
- Wait for sync.ArangoException
public DeletedEntity graphDeleteVertex(String graphName, String collectionName, String key, Boolean waitForSync, String ifMatchRevision, String ifNoneMatchRevision) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to delete.key
- The key (document handle) of the vertex to delete.waitForSync
- Wait for sync.ifMatchRevision
- If not null the revision of the vertex in the database has to
be equal to return a document.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to
be different to return a document.ArangoException
public <T> VertexEntity<T> graphReplaceVertex(String graphName, String collectionName, String key, T vertex) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to replace.key
- The key (document handle) of the vertex to replace.vertex
- The object to replace the existing vertex.ArangoException
public <T> VertexEntity<T> graphReplaceVertex(String graphName, String collectionName, String key, T vertex, Boolean waitForSync, String ifMatchRevision, String ifNoneMatchRevision) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to replace.key
- The key (document handle) of the vertex to replace.vertex
- The object to replace the existing vertex.waitForSync
- Wait for sync.ifMatchRevision
- If not null the revision of the vertex in the database has to
be equal to replace the document.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to
be different to replace the document.ArangoException
public <T> VertexEntity<T> graphUpdateVertex(String graphName, String collectionName, String key, T vertex, Boolean keepNull) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to update.key
- The key (document handle) of the vertex to be updated.vertex
- The object to update the existing vertex.keepNull
- True if the update should keep null valuesArangoException
public <T> VertexEntity<T> graphUpdateVertex(String graphName, String collectionName, String key, T vertex, Boolean keepNull, Boolean waitForSync, String ifMatchRevision, String ifNoneMatchRevision) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to update.key
- The key (document handle) of the vertex to be updated.vertex
- The object to update the existing vertex.keepNull
- True if the update should keep null valueswaitForSync
- Wait for sync.ifMatchRevision
- If not null the revision of the vertex in the database has to
be equal to update the document.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to
be different to update the document.ArangoException
public <T> EdgeEntity<T> graphCreateEdge(String graphName, String edgeCollectionName, String fromHandle, String toHandle, T value, Boolean waitForSync) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection where the edge will be created.fromHandle
- Document handle of vertex, where the edge comes from.toHandle
- Document handle of vertex, where the edge goes to.value
- Object to be stored with edge.waitForSync
- Wait for sync.ArangoException
public <T> EdgeEntity<T> graphCreateEdge(String graphName, String edgeCollectionName, String key, String fromHandle, String toHandle, T value, Boolean waitForSync) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection where the edge will be created.key
- The key of the edge to create (has to be unique).fromHandle
- Document handle of vertex, where the edge comes from.toHandle
- Document handle of vertex, where the edge goes to.value
- Object to be stored with edge.waitForSync
- Wait for sync.ArangoException
public <T> EdgeEntity<T> graphCreateEdge(String graphName, String edgeCollectionName, String key, String fromHandle, String toHandle) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection where the edge will be created.key
- The key of the edge to create (has to be unique).fromHandle
- Document handle of vertex, where the edge comes from.toHandle
- Document handle of vertex, where the edge goes to.ArangoException
public <T> EdgeEntity<T> graphGetEdge(String graphName, String edgeCollectionName, String key, Class<T> clazz, String ifMatchRevision, String ifNoneMatchRevision) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to get.key
- The key of the edge to get.clazz
- The class of the edge to get.ifMatchRevision
- If not null the revision of the vertex in the database has to
be equal to load the edge.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to
be different to load the edge.ArangoException
public <T> EdgeEntity<T> graphGetEdge(String graphName, String edgeCollectionName, String key, Class<T> clazz) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to get.key
- The key of the edge to get.clazz
- The class of the edge to get.ArangoException
public DeletedEntity graphDeleteEdge(String graphName, String edgeCollectionName, String key) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to delete.key
- The key of the edge to delete.ArangoException
public DeletedEntity graphDeleteEdge(String graphName, String edgeCollectionName, String key, Boolean waitForSync) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to delete.key
- The key of the edge to delete.waitForSync
- Wait for sync.ArangoException
public DeletedEntity graphDeleteEdge(String graphName, String edgeCollectionName, String key, Boolean waitForSync, String ifMatchRevision, String ifNoneMatchRevision) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to delete.key
- The key of the edge to delete.waitForSync
- Wait for sync.ifMatchRevision
- If not null the revision of the vertex in the database has to
be equal to delete the edge.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to
be different to delete the edge.ArangoException
public <T> EdgeEntity<T> graphReplaceEdge(String graphName, String edgeCollectionName, String key, String fromHandle, String toHandle, T value) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to replace.key
- The key of the edge to replace.fromHandle
- Document handle of vertex, where the edge comes from. (can be
null if value contains "_from" attribute)toHandle
- Document handle of vertex, where the edge goes to. (can be
null if value contains "_to" attribute)value
- The object to replace the existing edge.ArangoException
public <T> EdgeEntity<T> graphReplaceEdge(String graphName, String edgeCollectionName, String key, String fromHandle, String toHandle, T value, Boolean waitForSync, String ifMatchRevision, String ifNoneMatchRevision) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to replace.key
- The key of the edge to replace.fromHandle
- Document handle of vertex, where the edge comes from. (can be
null if value contains "_from" attribute)toHandle
- Document handle of vertex, where the edge goes to. (can be
null if value contains "_to" attribute)value
- The object to replace the existing edge. Since ArangoDB 3.X
the replacement should contain "_from" and "_to".waitForSync
- Wait for sync.ifMatchRevision
- If not null the revision of the vertex in the database has to
be equal to replace the edge.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to
be different to replace the edge.ArangoException
public <T> EdgeEntity<T> graphUpdateEdge(String graphName, String edgeCollectionName, String key, String fromHandle, String toHandle, T value, Boolean keepNull) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to update.key
- The key of the edge to update.fromHandle
- Document handle of vertex, where the edge comes from. (can be
null if value contains "_from" attribute)toHandle
- Document handle of vertex, where the edge goes to. (can be
null if value contains "_to" attribute)value
- The object to update the existing edge.keepNull
- ArangoException
public <T> EdgeEntity<T> graphUpdateEdge(String graphName, String edgeCollectionName, String key, String fromHandle, String toHandle, T value, Boolean waitForSync, Boolean keepNull, String ifMatchRevision, String ifNoneMatchRevision) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to update.key
- The key of the edge to update.value
- The object to update the existing edge.fromHandle
- Document handle of vertex, where the edge comes from. (can be
null if value contains "_from" attribute)toHandle
- Document handle of vertex, where the edge goes to. (can be
null if value contains "_to" attribute)waitForSync
- Wait for sync.keepNull
- ifMatchRevision
- If not null the revision of the vertex in the database has to
be equal to update the edge.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to
be different to update the edge.ArangoException
public <T> EdgeCursor<T> executeEdgeQuery(String query, Map<String,Object> bindVars, AqlQueryOptions aqlQueryOptions, Class<T> clazz) throws ArangoException
query
- the querybindVars
- the variablesaqlQueryOptions
- AQL query options (null for default values)clazz
- the result classArangoException
public <T> VertexCursor<T> executeVertexQuery(String query, Map<String,Object> bindVars, AqlQueryOptions aqlQueryOptions, Class<T> clazz) throws ArangoException
query
- the querybindVars
- the variablesaqlQueryOptions
- AQL query options (null for default values)clazz
- the result classArangoException
@Deprecated public <T> EdgeCursor<T> graphGetEdgeCursor(String graphName, Class<T> clazz, Object vertexExample, GraphEdgesOptions graphEdgesOptions, AqlQueryOptions aqlQueryOptions) throws ArangoException
graphName
- The name of the graph.clazz
- vertexExample
- An example for the desired verticesgraphEdgesOptions
- An object containing the optionsaqlQueryOptions
- AQL query options (null for default values (count = true))ArangoException
@Deprecated public <T> VertexCursor<T> graphGetVertexCursor(String graphName, Class<T> clazz, Object vertexExample, GraphVerticesOptions graphVerticesOptions, AqlQueryOptions aqlQueryOptions) throws ArangoException
graphName
- The name of the graph.clazz
- vertexExample
- An example for the desired verticesgraphVerticesOptions
- An object containing the optionsaqlQueryOptions
- AQL query optionsArangoException
public EdgeCursor<PlainEdgeEntity> graphGetEdgeCursor(String graphName) throws ArangoException
graphName
- The name of the graph.ArangoException
public <T> EdgeCursor<T> graphGetEdgeCursorByExample(String graphName, Class<T> clazz, Object vertexExample) throws ArangoException
graphName
- clazz
- vertexExample
- a vertex example or a document handleArangoException
@Deprecated public <V,E> ShortestPathEntity<V,E> graphGetShortestPath(String graphName, Object startVertexExample, Object endVertexExample, ShortestPathOptions shortestPathOptions, Class<V> vertexClass, Class<E> edgeClass) throws ArangoException
ArangoException
public DefaultEntity createAqlFunction(String name, String code) throws ArangoException
name
- the name of the function as stringcode
- the function as javascript stringArangoException
public AqlFunctionsEntity getAqlFunctions(String namespace) throws ArangoException
namespace
- the namespaceArangoException
public DefaultEntity deleteAqlFunction(String name, boolean isNameSpace) throws ArangoException
name
- This is either the name of a function or a namespaceisNameSpace
- If set to true the param *name* is treated as a namespaceArangoException
public TransactionEntity createTransaction(String action)
action
- the transaction as javascript codepublic TransactionResultEntity executeTransaction(TransactionEntity transactionEntity) throws ArangoException
transactionEntity
- The configuration object containing all data for the
transactionArangoException
public <T> EdgeEntity<T> createEdge(String collectionName, T value, String fromHandle, String toHandle, Boolean waitForSync) throws ArangoException
collectionName
- name of the edge collectionvalue
- the edge objectfromHandle
- id of document 'from'toHandle
- id of document 'to'waitForSync
- wait for syncArangoException
public <T> EdgeEntity<T> createEdge(String collectionName, String documentKey, T value, String fromHandle, String toHandle, Boolean waitForSync) throws ArangoException
collectionName
- name of the edge collectiondocumentKey
- the desired document keyvalue
- the edge objectfromHandle
- id of document 'from'toHandle
- id of document 'to'waitForSync
- wait for syncArangoException
public <V,E> TraversalEntity<V,E> getTraversal(TraversalQueryOptions traversalQueryOptions, Class<V> vertexClazz, Class<E> edgeClazz) throws ArangoException
traversalQueryOptions
- the traversal optionsvertexClazz
- Class of returned vertex documents.edgeClazz
- Class of returned edge documents.ArangoException
public DefaultEntity deleteQueryCache() throws ArangoException
ArangoException
public QueryCachePropertiesEntity getQueryCacheProperties() throws ArangoException
ArangoException
public QueryCachePropertiesEntity setQueryCacheProperties(QueryCachePropertiesEntity properties) throws ArangoException
ArangoException
public QueryTrackingPropertiesEntity getQueryTrackingProperties() throws ArangoException
ArangoException
public QueryTrackingPropertiesEntity setQueryTrackingProperties(QueryTrackingPropertiesEntity properties) throws ArangoException
properties
- the configurationArangoException
public QueriesResultEntity getCurrentlyRunningQueries() throws ArangoException
ArangoException
public QueriesResultEntity getCurrentlyRunningQueries(String database) throws ArangoException
database
- the database name or nullArangoException
public QueriesResultEntity getSlowQueries() throws ArangoException
ArangoException
public QueriesResultEntity getSlowQueries(String database) throws ArangoException
database
- the database name or nullArangoException
public DefaultEntity deleteSlowQueries() throws ArangoException
ArangoException
public DefaultEntity deleteSlowQueries(String database) throws ArangoException
database
- the database name or nullArangoException
public DefaultEntity killQuery(String id) throws ArangoException
id
- the identifier of a queryArangoException
public DefaultEntity killQuery(String database, String id) throws ArangoException
id
- the identifier of a querydatabase
- the database name or nullArangoException
public HttpManager getHttpManager()
public DocumentEntity<String> createDocumentRaw(String collectionName, String rawJsonString, Boolean waitForSync) throws ArangoException
collectionName
- The name of the collectionrawJsonString
- A string containing a JSON objectwaitForSync
- if set to true the response is returned when the server has
finished.ArangoException
public String getDocumentRaw(String documentHandle, String ifNoneMatchRevision, String ifMatchRevision) throws ArangoException
documentHandle
- The document handleifNoneMatchRevision
- if set the document is only returned id it has a different
revision.ifMatchRevision
- if set the document is only returned id it has the same
revision.ArangoException
public CursorRawResult executeAqlQueryRaw(String query, Map<String,Object> bindVars, AqlQueryOptions aqlQueryOptions) throws ArangoException
query
- an AQL query as stringbindVars
- a map containing all bind variables,aqlQueryOptions
- AQL query optionsArangoException
public DocumentEntity<String> replaceDocumentRaw(String documentHandle, String rawJsonString, String rev, Boolean waitForSync) throws ArangoException
documentHandle
- The document's handle.rawJsonString
- A string containing a JSON objectrev
- the desired revision.waitForSync
- if set to true the response is returned when the server has
finished.ArangoException
public DocumentEntity<String> updateDocumentRaw(String documentHandle, String rawJsonString, String rev, Boolean waitForSync, Boolean keepNull) throws ArangoException
documentHandle
- The document handle.rawJsonString
- A string containing a JSON objectrev
- The desired revisionwaitForSync
- if set to true the response is returned when the server has
finished.keepNull
- If true null values are kept.ArangoException
Copyright © 2012–2016 ArangoDB GmbH. All rights reserved.