public interface ArangoDatabaseAsync
extends com.arangodb.ArangoSerializationAccessor
| Modifier and Type | Method and Description |
|---|---|
ArangoDBAsync |
arango()
Return the main entry point for the ArangoDB driver
|
ArangoSearchAsync |
arangoSearch(String name)
Returns a
ArangoSearchAsync instance for the given ArangoSearch view name. |
CompletableFuture<Void> |
clearQueryCache()
Clears the AQL query cache
|
CompletableFuture<Void> |
clearSlowQueries()
Clears the list of slow AQL queries
|
ArangoCollectionAsync |
collection(String name)
Returns a handler of the collection by the given name
|
CompletableFuture<Boolean> |
create()
Creates the database
|
CompletableFuture<Void> |
createAqlFunction(String name,
String code,
com.arangodb.model.AqlFunctionCreateOptions options)
Create a new AQL user function
|
CompletableFuture<com.arangodb.entity.ViewEntity> |
createArangoSearch(String name,
com.arangodb.model.arangosearch.ArangoSearchCreateOptions options)
Creates a ArangoSearch view with the given
options, then returns view information from the server. |
CompletableFuture<com.arangodb.entity.CollectionEntity> |
createCollection(String name)
Creates a collection
|
CompletableFuture<com.arangodb.entity.CollectionEntity> |
createCollection(String name,
com.arangodb.model.CollectionCreateOptions options)
Creates a collection
|
CompletableFuture<com.arangodb.entity.GraphEntity> |
createGraph(String name,
Collection<com.arangodb.entity.EdgeDefinition> edgeDefinitions)
Create a new graph in the graph module.
|
CompletableFuture<com.arangodb.entity.GraphEntity> |
createGraph(String name,
Collection<com.arangodb.entity.EdgeDefinition> edgeDefinitions,
com.arangodb.model.GraphCreateOptions options)
Create a new graph in the graph module.
|
CompletableFuture<com.arangodb.entity.ViewEntity> |
createView(String name,
com.arangodb.entity.ViewType type)
Creates a view of the given
type, then returns view information from the server. |
<T> CompletableFuture<ArangoCursorAsync<T>> |
cursor(String cursorId,
Class<T> type)
Return an cursor from the given cursor-ID if still existing
|
CompletableFuture<Integer> |
deleteAqlFunction(String name,
com.arangodb.model.AqlFunctionDeleteOptions options)
Remove an existing AQL user function
|
CompletableFuture<String> |
deleteIndex(String id)
Deletes an index
|
CompletableFuture<Boolean> |
drop()
Drop an existing database
|
<V,E> CompletableFuture<com.arangodb.entity.TraversalEntity<V,E>> |
executeTraversal(Class<V> vertexClass,
Class<E> edgeClass,
com.arangodb.model.TraversalOptions options)
Execute a server-side traversal
|
CompletableFuture<Boolean> |
exists()
Checks whether the database exists
|
CompletableFuture<com.arangodb.entity.AqlExecutionExplainEntity> |
explainQuery(String query,
Map<String,Object> bindVars,
com.arangodb.model.AqlQueryExplainOptions options)
Explain an AQL query and return information about it
|
CompletableFuture<Collection<String>> |
getAccessibleDatabases()
Retrieves a list of all databases the current user can access
|
CompletableFuture<Collection<com.arangodb.entity.AqlFunctionEntity>> |
getAqlFunctions(com.arangodb.model.AqlFunctionGetOptions options)
Gets all reqistered AQL user functions
|
CompletableFuture<Collection<com.arangodb.entity.CollectionEntity>> |
getCollections()
Returns all collections
|
CompletableFuture<Collection<com.arangodb.entity.CollectionEntity>> |
getCollections(com.arangodb.model.CollectionsReadOptions options)
Returns all collections
|
CompletableFuture<Collection<com.arangodb.entity.QueryEntity>> |
getCurrentlyRunningQueries()
Returns a list of currently running AQL queries
|
<T> CompletableFuture<T> |
getDocument(String id,
Class<T> type)
Reads a single document
|
<T> CompletableFuture<T> |
getDocument(String id,
Class<T> type,
com.arangodb.model.DocumentReadOptions options)
Reads a single document
|
CompletableFuture<Collection<com.arangodb.entity.GraphEntity>> |
getGraphs()
Lists all graphs known to the graph module
|
CompletableFuture<com.arangodb.entity.IndexEntity> |
getIndex(String id)
Returns an index
|
CompletableFuture<com.arangodb.entity.DatabaseEntity> |
getInfo()
Retrieves information about the current database
|
CompletableFuture<com.arangodb.entity.Permissions> |
getPermissions(String user)
Get specific database access level
|
CompletableFuture<com.arangodb.entity.QueryCachePropertiesEntity> |
getQueryCacheProperties()
Returns the global configuration for the AQL query cache
|
CompletableFuture<com.arangodb.entity.QueryTrackingPropertiesEntity> |
getQueryTrackingProperties()
Returns the configuration for the AQL query tracking
|
CompletableFuture<Collection<com.arangodb.entity.QueryEntity>> |
getSlowQueries()
Returns a list of slow running AQL queries
|
CompletableFuture<com.arangodb.entity.ArangoDBVersion> |
getVersion()
Returns the server name and version number.
|
CompletableFuture<Collection<com.arangodb.entity.ViewEntity>> |
getViews()
Fetches all views from the database and returns an list of view descriptions.
|
CompletableFuture<Void> |
grantAccess(String user)
Grants access to the database dbname for user user.
|
CompletableFuture<Void> |
grantAccess(String user,
com.arangodb.entity.Permissions permissions)
Grants access to the database dbname for user user.
|
CompletableFuture<Void> |
grantDefaultCollectionAccess(String user,
com.arangodb.entity.Permissions permissions)
Sets the default access level for collections within this database for the user
user. |
ArangoGraphAsync |
graph(String name)
Returns a handler of the graph by the given name
|
CompletableFuture<Void> |
killQuery(String id)
Kills a running query.
|
String |
name()
Returns the name of the database
|
CompletableFuture<com.arangodb.entity.AqlParseEntity> |
parseQuery(String query)
Parse an AQL query and return information about it This method is for query validation only.
|
<T> CompletableFuture<ArangoCursorAsync<T>> |
query(String query,
com.arangodb.model.AqlQueryOptions options,
Class<T> type)
Performs a database query using the given
query, then returns a new ArangoCursor instance for the
result list. |
<T> CompletableFuture<ArangoCursorAsync<T>> |
query(String query,
Class<T> type)
Performs a database query using the given
query, then returns a new ArangoCursor instance for the
result list. |
<T> CompletableFuture<ArangoCursorAsync<T>> |
query(String query,
Map<String,Object> bindVars,
com.arangodb.model.AqlQueryOptions options,
Class<T> type)
Performs a database query using the given
query and bindVars, then returns a new
ArangoCursor instance for the result list. |
<T> CompletableFuture<ArangoCursorAsync<T>> |
query(String query,
Map<String,Object> bindVars,
Class<T> type)
Performs a database query using the given
query and bindVars, then returns a new
ArangoCursor instance for the result list. |
CompletableFuture<Void> |
reloadRouting()
Reload the routing table.
|
CompletableFuture<Void> |
resetAccess(String user)
Clear the database access level, revert back to the default access level.
|
CompletableFuture<Void> |
revokeAccess(String user)
Revokes access to the database dbname for user user.
|
ArangoRouteAsync |
route(String... path)
Returns a new
ArangoRouteAsync instance for the given path (relative to the database) that can be used to
perform arbitrary requests. |
CompletableFuture<com.arangodb.entity.QueryCachePropertiesEntity> |
setQueryCacheProperties(com.arangodb.entity.QueryCachePropertiesEntity properties)
Changes the configuration for the AQL query cache.
|
CompletableFuture<com.arangodb.entity.QueryTrackingPropertiesEntity> |
setQueryTrackingProperties(com.arangodb.entity.QueryTrackingPropertiesEntity properties)
Changes the configuration for the AQL query tracking
|
<T> CompletableFuture<T> |
transaction(String action,
Class<T> type,
com.arangodb.model.TransactionOptions options)
Execute a server-side transaction
|
ArangoViewAsync |
view(String name)
Returns a
ArangoViewAsync instance for the given view name. |
ArangoDBAsync arango()
String name()
CompletableFuture<com.arangodb.entity.ArangoDBVersion> getVersion()
CompletableFuture<Boolean> exists()
CompletableFuture<Collection<String>> getAccessibleDatabases()
ArangoCollectionAsync collection(String name)
name - Name of the collectionCompletableFuture<com.arangodb.entity.CollectionEntity> createCollection(String name)
name - The name of the collectionoptions - Additional options, can be nullCompletableFuture<com.arangodb.entity.CollectionEntity> createCollection(String name, com.arangodb.model.CollectionCreateOptions options)
name - The name of the collectionoptions - Additional options, can be nullCompletableFuture<Collection<com.arangodb.entity.CollectionEntity>> getCollections()
CompletableFuture<Collection<com.arangodb.entity.CollectionEntity>> getCollections(com.arangodb.model.CollectionsReadOptions options)
options - Additional options, can be nullCompletableFuture<com.arangodb.entity.IndexEntity> getIndex(String id)
id - The index-handleCompletableFuture<String> deleteIndex(String id)
id - The index handleCompletableFuture<Boolean> create()
CompletableFuture<Boolean> drop()
CompletableFuture<Void> grantAccess(String user, com.arangodb.entity.Permissions permissions)
user - The name of the userpermissions - The permissions the user grantCompletableFuture<Void> grantAccess(String user)
user - The name of the userCompletableFuture<Void> revokeAccess(String user)
user - The name of the userCompletableFuture<Void> resetAccess(String user)
user - The name of the userCompletableFuture<Void> grantDefaultCollectionAccess(String user, com.arangodb.entity.Permissions permissions) throws com.arangodb.ArangoDBException
user. You need
permission to the _system database in order to execute this call.user - The name of the userpermissions - The permissions the user grantArangoDBExceptionCompletableFuture<com.arangodb.entity.Permissions> getPermissions(String user) throws com.arangodb.ArangoDBException
user - The name of the usercom.arangodb.ArangoDBException<T> CompletableFuture<ArangoCursorAsync<T>> query(String query, Map<String,Object> bindVars, com.arangodb.model.AqlQueryOptions options, Class<T> type) throws com.arangodb.ArangoDBException
query and bindVars, then returns a new
ArangoCursor instance for the result list.query - contains the query string to be executedbindVars - key/value pairs representing the bind parametersoptions - Additional options, can be nulltype - The type of the result (POJO class, VPackSlice, String for Json, or Collection/List/Map)ArangoDBException<T> CompletableFuture<ArangoCursorAsync<T>> query(String query, com.arangodb.model.AqlQueryOptions options, Class<T> type) throws com.arangodb.ArangoDBException
query, then returns a new ArangoCursor instance for the
result list.query - contains the query string to be executedoptions - Additional options, can be nulltype - The type of the result (POJO class, VPackSlice, String for Json, or Collection/List/Map)ArangoDBException<T> CompletableFuture<ArangoCursorAsync<T>> query(String query, Map<String,Object> bindVars, Class<T> type) throws com.arangodb.ArangoDBException
query and bindVars, then returns a new
ArangoCursor instance for the result list.query - contains the query string to be executedbindVars - key/value pairs representing the bind parameterstype - The type of the result (POJO class, VPackSlice, String for Json, or Collection/List/Map)ArangoDBException<T> CompletableFuture<ArangoCursorAsync<T>> query(String query, Class<T> type) throws com.arangodb.ArangoDBException
query, then returns a new ArangoCursor instance for the
result list.query - contains the query string to be executedtype - The type of the result (POJO class, VPackSlice, String for Json, or Collection/List/Map)ArangoDBException<T> CompletableFuture<ArangoCursorAsync<T>> cursor(String cursorId, Class<T> type) throws com.arangodb.ArangoDBException
cursorId - The ID of the cursortype - The type of the result (POJO class, VPackSlice, String for Json, or Collection/List/Map)ArangoDBExceptionCompletableFuture<com.arangodb.entity.AqlExecutionExplainEntity> explainQuery(String query, Map<String,Object> bindVars, com.arangodb.model.AqlQueryExplainOptions options)
query - the query which you want explainedbindVars - key/value pairs representing the bind parametersoptions - Additional options, can be nullCompletableFuture<com.arangodb.entity.AqlParseEntity> parseQuery(String query)
query(String, Map, AqlQueryOptions, Class)query - the query which you want parseCompletableFuture<Void> clearQueryCache()
CompletableFuture<com.arangodb.entity.QueryCachePropertiesEntity> getQueryCacheProperties()
CompletableFuture<com.arangodb.entity.QueryCachePropertiesEntity> setQueryCacheProperties(com.arangodb.entity.QueryCachePropertiesEntity properties)
properties - properties to be setCompletableFuture<com.arangodb.entity.QueryTrackingPropertiesEntity> getQueryTrackingProperties()
CompletableFuture<com.arangodb.entity.QueryTrackingPropertiesEntity> setQueryTrackingProperties(com.arangodb.entity.QueryTrackingPropertiesEntity properties)
properties - properties to be setCompletableFuture<Collection<com.arangodb.entity.QueryEntity>> getCurrentlyRunningQueries()
CompletableFuture<Collection<com.arangodb.entity.QueryEntity>> getSlowQueries()
CompletableFuture<Void> clearSlowQueries()
CompletableFuture<Void> killQuery(String id)
id - The id of the queryCompletableFuture<Void> createAqlFunction(String name, String code, com.arangodb.model.AqlFunctionCreateOptions options)
name - the fully qualified name of the user functionscode - a string representation of the function bodyoptions - Additional options, can be nullCompletableFuture<Integer> deleteAqlFunction(String name, com.arangodb.model.AqlFunctionDeleteOptions options)
name - the name of the AQL user functionoptions - Additional options, can be nullCompletableFuture<Collection<com.arangodb.entity.AqlFunctionEntity>> getAqlFunctions(com.arangodb.model.AqlFunctionGetOptions options)
options - Additional options, can be nullArangoGraphAsync graph(String name)
name - Name of the graphCompletableFuture<com.arangodb.entity.GraphEntity> createGraph(String name, Collection<com.arangodb.entity.EdgeDefinition> edgeDefinitions)
name - Name of the graphedgeDefinitions - An array of definitions for the edgeCompletableFuture<com.arangodb.entity.GraphEntity> createGraph(String name, Collection<com.arangodb.entity.EdgeDefinition> edgeDefinitions, com.arangodb.model.GraphCreateOptions options)
name - Name of the graphedgeDefinitions - An array of definitions for the edgeoptions - Additional options, can be nullCompletableFuture<Collection<com.arangodb.entity.GraphEntity>> getGraphs()
<T> CompletableFuture<T> transaction(String action, Class<T> type, com.arangodb.model.TransactionOptions options)
action - the actual transaction operations to be executed, in the form of stringified JavaScript codetype - The type of the result (POJO class, VPackSlice or String for Json)options - Additional options, can be nullCompletableFuture<com.arangodb.entity.DatabaseEntity> getInfo()
<V,E> CompletableFuture<com.arangodb.entity.TraversalEntity<V,E>> executeTraversal(Class<V> vertexClass, Class<E> edgeClass, com.arangodb.model.TraversalOptions options)
vertexClass - The type of the vertex documents (POJO class, VPackSlice or String for Json)edgeClass - The type of the edge documents (POJO class, VPackSlice or String for Json)options - Additional options<T> CompletableFuture<T> getDocument(String id, Class<T> type) throws com.arangodb.ArangoDBException
id - The id of the documenttype - The type of the document (POJO class, VPackSlice or String for Json)com.arangodb.ArangoDBException<T> CompletableFuture<T> getDocument(String id, Class<T> type, com.arangodb.model.DocumentReadOptions options) throws com.arangodb.ArangoDBException
id - The id of the documenttype - The type of the document (POJO class, VPackSlice or String for Json)options - Additional options, can be nullcom.arangodb.ArangoDBExceptionCompletableFuture<Void> reloadRouting()
ArangoRouteAsync route(String... path)
ArangoRouteAsync instance for the given path (relative to the database) that can be used to
perform arbitrary requests.path - The database-relative URL of the routeArangoRouteAsyncCompletableFuture<Collection<com.arangodb.entity.ViewEntity>> getViews() throws com.arangodb.ArangoDBException
ArangoDBExceptionArangoViewAsync view(String name)
ArangoViewAsync instance for the given view name.name - Name of the viewArangoSearchAsync arangoSearch(String name)
ArangoSearchAsync instance for the given ArangoSearch view name.name - Name of the viewCompletableFuture<com.arangodb.entity.ViewEntity> createView(String name, com.arangodb.entity.ViewType type) throws com.arangodb.ArangoDBException
type, then returns view information from the server.name - The name of the viewtype - The type of the viewArangoDBExceptionCompletableFuture<com.arangodb.entity.ViewEntity> createArangoSearch(String name, com.arangodb.model.arangosearch.ArangoSearchCreateOptions options) throws com.arangodb.ArangoDBException
options, then returns view information from the server.name - The name of the viewoptions - Additional options, can be nullArangoDBExceptionCopyright © 2016–2018 ArangoDB GmbH. All rights reserved.