public interface ArangoDatabaseAsync extends ArangoSerializationAccessor
Modifier and Type | Method and Description |
---|---|
CompletableFuture<StreamTransactionEntity> |
abortStreamTransaction(String id)
Aborts a Stream Transaction.
|
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<StreamTransactionEntity> |
beginStreamTransaction(StreamTransactionOptions options)
Begins a Stream Transaction.
|
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<StreamTransactionEntity> |
commitStreamTransaction(String id)
Commits a Stream Transaction.
|
CompletableFuture<Boolean> |
create()
Creates the database
|
CompletableFuture<AnalyzerEntity> |
createAnalyzer(AnalyzerEntity options)
Deprecated.
use
this#createSearchAnalyzer(SearchAnalyzer) } |
CompletableFuture<Void> |
createAqlFunction(String name,
String code,
AqlFunctionCreateOptions options)
Create a new AQL user function
|
CompletableFuture<ViewEntity> |
createArangoSearch(String name,
ArangoSearchCreateOptions options)
Creates a ArangoSearch view with the given
options , then returns view information from the server. |
CompletableFuture<CollectionEntity> |
createCollection(String name)
Creates a collection
|
CompletableFuture<CollectionEntity> |
createCollection(String name,
CollectionCreateOptions options)
Creates a collection
|
CompletableFuture<GraphEntity> |
createGraph(String name,
Collection<EdgeDefinition> edgeDefinitions)
Create a new graph in the graph module.
|
CompletableFuture<GraphEntity> |
createGraph(String name,
Collection<EdgeDefinition> edgeDefinitions,
GraphCreateOptions options)
Create a new graph in the graph module.
|
CompletableFuture<SearchAnalyzer> |
createSearchAnalyzer(SearchAnalyzer analyzer)
Creates an Analyzer
|
CompletableFuture<ViewEntity> |
createView(String name,
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
|
DbName |
dbName()
Returns the name of the database
|
CompletableFuture<Void> |
deleteAnalyzer(String name)
Deprecated.
use
this#deleteSearchAnalyzer(String) }} |
CompletableFuture<Void> |
deleteAnalyzer(String name,
AnalyzerDeleteOptions options)
Deprecated.
use
this#deleteSearchAnalyzer(String, AnalyzerDeleteOptions) }} |
CompletableFuture<Integer> |
deleteAqlFunction(String name,
AqlFunctionDeleteOptions options)
Remove an existing AQL user function
|
CompletableFuture<String> |
deleteIndex(String id)
Deletes an index
|
CompletableFuture<Void> |
deleteSearchAnalyzer(String name)
Deletes an Analyzer
|
CompletableFuture<Void> |
deleteSearchAnalyzer(String name,
AnalyzerDeleteOptions options)
Deletes an Analyzer
|
CompletableFuture<Boolean> |
drop()
Drop an existing database
|
<V,E> CompletableFuture<TraversalEntity<V,E>> |
executeTraversal(Class<V> vertexClass,
Class<E> edgeClass,
TraversalOptions options)
Deprecated.
use
this#query(String, Map, AqlQueryOptions, Class) |
CompletableFuture<Boolean> |
exists()
Checks whether the database exists
|
CompletableFuture<AqlExecutionExplainEntity> |
explainQuery(String query,
Map<String,Object> bindVars,
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<AnalyzerEntity> |
getAnalyzer(String name)
Deprecated.
use
this#getSearchAnalyzer(String) } |
CompletableFuture<Collection<AnalyzerEntity>> |
getAnalyzers()
Deprecated.
use
this#getSearchAnalyzers() |
CompletableFuture<Collection<AqlFunctionEntity>> |
getAqlFunctions(AqlFunctionGetOptions options)
Gets all reqistered AQL user functions
|
CompletableFuture<Collection<CollectionEntity>> |
getCollections()
Returns all collections
|
CompletableFuture<Collection<CollectionEntity>> |
getCollections(CollectionsReadOptions options)
Returns all collections
|
CompletableFuture<Collection<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,
DocumentReadOptions options)
Reads a single document
|
CompletableFuture<ArangoDBEngine> |
getEngine()
Returns the name of the used storage engine.
|
CompletableFuture<Collection<GraphEntity>> |
getGraphs()
Lists all graphs known to the graph module
|
CompletableFuture<IndexEntity> |
getIndex(String id)
Returns an index
|
CompletableFuture<DatabaseEntity> |
getInfo()
Retrieves information about the current database
|
CompletableFuture<Permissions> |
getPermissions(String user)
Get specific database access level
|
CompletableFuture<QueryCachePropertiesEntity> |
getQueryCacheProperties()
Returns the global configuration for the AQL query cache
|
CompletableFuture<QueryTrackingPropertiesEntity> |
getQueryTrackingProperties()
Returns the configuration for the AQL query tracking
|
CompletableFuture<SearchAnalyzer> |
getSearchAnalyzer(String name)
Gets information about an Analyzer
|
CompletableFuture<Collection<SearchAnalyzer>> |
getSearchAnalyzers()
Retrieves all analyzers definitions.
|
CompletableFuture<Collection<QueryEntity>> |
getSlowQueries()
Returns a list of slow running AQL queries
|
CompletableFuture<StreamTransactionEntity> |
getStreamTransaction(String id)
Gets information about a Stream Transaction.
|
CompletableFuture<Collection<TransactionEntity>> |
getStreamTransactions()
Gets all the currently running Stream Transactions.
|
CompletableFuture<ArangoDBVersion> |
getVersion()
Returns the server name and version number.
|
CompletableFuture<Collection<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,
Permissions permissions)
Grants access to the database dbname for user user.
|
CompletableFuture<Void> |
grantDefaultCollectionAccess(String user,
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.
|
default String |
name()
Deprecated.
Use
dbName() instead |
CompletableFuture<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,
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,
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<QueryCachePropertiesEntity> |
setQueryCacheProperties(QueryCachePropertiesEntity properties)
Changes the configuration for the AQL query cache.
|
CompletableFuture<QueryTrackingPropertiesEntity> |
setQueryTrackingProperties(QueryTrackingPropertiesEntity properties)
Changes the configuration for the AQL query tracking
|
<T> CompletableFuture<T> |
transaction(String action,
Class<T> type,
TransactionOptions options)
Execute a server-side transaction
|
ArangoViewAsync |
view(String name)
Returns a
ArangoViewAsync instance for the given view name. |
util, util
ArangoDBAsync arango()
@Deprecated default String name()
dbName()
insteadDbName dbName()
CompletableFuture<ArangoDBVersion> getVersion()
CompletableFuture<ArangoDBEngine> getEngine()
CompletableFuture<Boolean> exists()
CompletableFuture<Collection<String>> getAccessibleDatabases()
ArangoCollectionAsync collection(String name)
name
- Name of the collectionCompletableFuture<CollectionEntity> createCollection(String name)
name
- The name of the collectionCompletableFuture<CollectionEntity> createCollection(String name, CollectionCreateOptions options)
name
- The name of the collectionoptions
- Additional options, can be nullCompletableFuture<Collection<CollectionEntity>> getCollections()
CompletableFuture<Collection<CollectionEntity>> getCollections(CollectionsReadOptions options)
options
- Additional options, can be nullCompletableFuture<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, 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, Permissions permissions)
user
. You need
permission to the _system database in order to execute this call.user
- The name of the userpermissions
- The permissions the user grantCompletableFuture<Permissions> getPermissions(String user)
user
- The name of the user<T> CompletableFuture<ArangoCursorAsync<T>> query(String query, Map<String,Object> bindVars, AqlQueryOptions options, Class<T> type)
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)<T> CompletableFuture<ArangoCursorAsync<T>> query(String query, AqlQueryOptions options, Class<T> type)
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)<T> CompletableFuture<ArangoCursorAsync<T>> query(String query, Map<String,Object> bindVars, Class<T> type)
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)<T> CompletableFuture<ArangoCursorAsync<T>> query(String query, Class<T> type)
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)<T> CompletableFuture<ArangoCursorAsync<T>> cursor(String cursorId, Class<T> type)
cursorId
- The ID of the cursortype
- The type of the result (POJO class, VPackSlice, String for Json, or Collection/List/Map)CompletableFuture<AqlExecutionExplainEntity> explainQuery(String query, Map<String,Object> bindVars, AqlQueryExplainOptions options)
query
- the query which you want explainedbindVars
- key/value pairs representing the bind parametersoptions
- Additional options, can be nullCompletableFuture<AqlParseEntity> parseQuery(String query)
query(String, Map, AqlQueryOptions, Class)
query
- the query which you want parseCompletableFuture<Void> clearQueryCache()
CompletableFuture<QueryCachePropertiesEntity> getQueryCacheProperties()
CompletableFuture<QueryCachePropertiesEntity> setQueryCacheProperties(QueryCachePropertiesEntity properties)
properties
- properties to be setCompletableFuture<QueryTrackingPropertiesEntity> getQueryTrackingProperties()
CompletableFuture<QueryTrackingPropertiesEntity> setQueryTrackingProperties(QueryTrackingPropertiesEntity properties)
properties
- properties to be setCompletableFuture<Collection<QueryEntity>> getCurrentlyRunningQueries()
CompletableFuture<Collection<QueryEntity>> getSlowQueries()
CompletableFuture<Void> clearSlowQueries()
CompletableFuture<Void> killQuery(String id)
id
- The id of the queryCompletableFuture<Void> createAqlFunction(String name, String code, 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, AqlFunctionDeleteOptions options)
name
- the name of the AQL user functionoptions
- Additional options, can be nullCompletableFuture<Collection<AqlFunctionEntity>> getAqlFunctions(AqlFunctionGetOptions options)
options
- Additional options, can be nullArangoGraphAsync graph(String name)
name
- Name of the graphCompletableFuture<GraphEntity> createGraph(String name, Collection<EdgeDefinition> edgeDefinitions)
name
- Name of the graphedgeDefinitions
- An array of definitions for the edgeCompletableFuture<GraphEntity> createGraph(String name, Collection<EdgeDefinition> edgeDefinitions, GraphCreateOptions options)
name
- Name of the graphedgeDefinitions
- An array of definitions for the edgeoptions
- Additional options, can be nullCompletableFuture<Collection<GraphEntity>> getGraphs()
<T> CompletableFuture<T> transaction(String action, Class<T> type, 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<StreamTransactionEntity> beginStreamTransaction(StreamTransactionOptions options)
options
- Additional options, can be nullCompletableFuture<StreamTransactionEntity> abortStreamTransaction(String id)
CompletableFuture<StreamTransactionEntity> getStreamTransaction(String id)
CompletableFuture<Collection<TransactionEntity>> getStreamTransactions()
CompletableFuture<StreamTransactionEntity> commitStreamTransaction(String id)
CompletableFuture<DatabaseEntity> getInfo()
@Deprecated <V,E> CompletableFuture<TraversalEntity<V,E>> executeTraversal(Class<V> vertexClass, Class<E> edgeClass, TraversalOptions options)
this#query(String, Map, AqlQueryOptions, Class)
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 ArangoDBException
id
- The id of the documenttype
- The type of the document (POJO class, VPackSlice or String for Json)ArangoDBException
<T> CompletableFuture<T> getDocument(String id, Class<T> type, DocumentReadOptions options) throws ArangoDBException
id
- The id of the documenttype
- The type of the document (POJO class, VPackSlice or String for Json)options
- Additional options, can be nullArangoDBException
CompletableFuture<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 routeArangoRouteAsync
CompletableFuture<Collection<ViewEntity>> getViews()
ArangoViewAsync 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<ViewEntity> createView(String name, ViewType type)
type
, then returns view information from the server.name
- The name of the viewtype
- The type of the viewCompletableFuture<ViewEntity> createArangoSearch(String name, ArangoSearchCreateOptions options)
options
, then returns view information from the server.name
- The name of the viewoptions
- Additional options, can be null@Deprecated CompletableFuture<AnalyzerEntity> createAnalyzer(AnalyzerEntity options)
this#createSearchAnalyzer(SearchAnalyzer)
}options
- AnalyzerEntityCompletableFuture<SearchAnalyzer> createSearchAnalyzer(SearchAnalyzer analyzer)
analyzer
- SearchAnalyzerArangoDBException
@Deprecated CompletableFuture<AnalyzerEntity> getAnalyzer(String name)
this#getSearchAnalyzer(String)
}name
- of the Analyzer without database prefixCompletableFuture<SearchAnalyzer> getSearchAnalyzer(String name)
name
- of the Analyzer without database prefixArangoDBException
@Deprecated CompletableFuture<Collection<AnalyzerEntity>> getAnalyzers()
this#getSearchAnalyzers()
CompletableFuture<Collection<SearchAnalyzer>> getSearchAnalyzers()
ArangoDBException
@Deprecated CompletableFuture<Void> deleteAnalyzer(String name)
this#deleteSearchAnalyzer(String)
}}name
- of the Analyzer without database prefix@Deprecated CompletableFuture<Void> deleteAnalyzer(String name, AnalyzerDeleteOptions options)
this#deleteSearchAnalyzer(String, AnalyzerDeleteOptions)
}}name
- of the Analyzer without database prefixoptions
- AnalyzerDeleteOptionsCompletableFuture<Void> deleteSearchAnalyzer(String name)
name
- of the Analyzer without database prefixArangoDBException
CompletableFuture<Void> deleteSearchAnalyzer(String name, AnalyzerDeleteOptions options)
name
- of the Analyzer without database prefixoptions
- AnalyzerDeleteOptionsArangoDBException
Copyright © 2016–2022 ArangoDB GmbH. All rights reserved.