public class ArangoDatabaseImpl extends InternalArangoDatabase<ArangoDBImpl,ArangoExecutorSync> implements ArangoDatabase
PATH_API_DATABASEexecutor, serde| Modifier | Constructor and Description |
|---|---|
protected |
ArangoDatabaseImpl(ArangoDBImpl arangoDB,
DbName name) |
| Modifier and Type | Method and Description |
|---|---|
StreamTransactionEntity |
abortStreamTransaction(String id)
Aborts a Stream Transaction.
|
ArangoSearch |
arangoSearch(String name)
Returns a
ArangoSearch instance for the given view name. |
StreamTransactionEntity |
beginStreamTransaction(StreamTransactionOptions options)
Begins a Stream Transaction.
|
void |
clearQueryCache()
Clears the AQL query cache
|
void |
clearSlowQueries()
Clears the list of slow AQL queries
|
ArangoCollection |
collection(String name)
Returns a
ArangoCollection instance for the given collection name. |
StreamTransactionEntity |
commitStreamTransaction(String id)
Commits a Stream Transaction.
|
Boolean |
create()
Creates the database
|
void |
createAqlFunction(String name,
String code,
AqlFunctionCreateOptions options)
Create a new AQL user function
|
ViewEntity |
createArangoSearch(String name,
ArangoSearchCreateOptions options)
Creates a ArangoSearch view with the given
options, then returns view information from the server. |
CollectionEntity |
createCollection(String name)
Creates a collection for the given collection's name, then returns collection information from the server.
|
CollectionEntity |
createCollection(String name,
CollectionCreateOptions options)
Creates a collection with the given
options for this collection's name, then returns collection
information from the server. |
GraphEntity |
createGraph(String name,
Collection<EdgeDefinition> edgeDefinitions)
Create a new graph in the graph module.
|
GraphEntity |
createGraph(String name,
Collection<EdgeDefinition> edgeDefinitions,
GraphCreateOptions options)
Create a new graph in the graph module.
|
ViewEntity |
createSearchAlias(String name,
SearchAliasCreateOptions options)
Creates a SearchAlias view with the given
options, then returns view information from the server. |
SearchAnalyzer |
createSearchAnalyzer(SearchAnalyzer analyzer)
Creates an Analyzer
|
ViewEntity |
createView(String name,
ViewType type)
Creates a view of the given
type, then returns view information from the server. |
<T> ArangoCursor<T> |
cursor(String cursorId,
Class<T> type)
Return an cursor from the given cursor-ID if still existing
|
Integer |
deleteAqlFunction(String name,
AqlFunctionDeleteOptions options)
Deletes the AQL user function with the given name from the database.
|
String |
deleteIndex(String id)
Deletes an index
|
void |
deleteSearchAnalyzer(String name)
Deletes an Analyzer
|
void |
deleteSearchAnalyzer(String name,
AnalyzerDeleteOptions options)
Deletes an Analyzer
|
Boolean |
drop()
Deletes the database from the server.
|
boolean |
exists()
Checks whether the database exists
|
AqlExecutionExplainEntity |
explainQuery(String query,
Map<String,Object> bindVars,
AqlQueryExplainOptions options)
Explain an AQL query and return information about it
|
Collection<String> |
getAccessibleDatabases()
Retrieves a list of all databases the current user can access
|
Collection<AqlFunctionEntity> |
getAqlFunctions(AqlFunctionGetOptions options)
Gets all reqistered AQL user functions
|
Collection<CollectionEntity> |
getCollections()
Fetches all collections from the database and returns an list of collection descriptions.
|
Collection<CollectionEntity> |
getCollections(CollectionsReadOptions options)
Fetches all collections from the database and returns an list of collection descriptions.
|
Collection<QueryEntity> |
getCurrentlyRunningQueries()
Returns a list of currently running AQL queries
|
<T> T |
getDocument(String id,
Class<T> type)
Reads a single document
|
<T> T |
getDocument(String id,
Class<T> type,
DocumentReadOptions options)
Reads a single document
|
ArangoDBEngine |
getEngine()
Returns the name of the used storage engine.
|
Collection<GraphEntity> |
getGraphs()
Lists all graphs known to the graph module
|
IndexEntity |
getIndex(String id)
Returns an index
|
DatabaseEntity |
getInfo()
Retrieves information about the current database
|
Permissions |
getPermissions(String user)
Get specific database access level
|
QueryCachePropertiesEntity |
getQueryCacheProperties()
Returns the global configuration for the AQL query cache
|
QueryTrackingPropertiesEntity |
getQueryTrackingProperties()
Returns the configuration for the AQL query tracking
|
SearchAnalyzer |
getSearchAnalyzer(String name)
Gets information about an Analyzer
|
Collection<SearchAnalyzer> |
getSearchAnalyzers()
Retrieves all analyzers definitions.
|
Collection<QueryEntity> |
getSlowQueries()
Returns a list of slow running AQL queries
|
StreamTransactionEntity |
getStreamTransaction(String id)
Gets information about a Stream Transaction.
|
Collection<TransactionEntity> |
getStreamTransactions()
Gets all the currently running Stream Transactions.
|
ArangoDBVersion |
getVersion()
Returns the server name and version number.
|
Collection<ViewEntity> |
getViews()
Fetches all views from the database and returns an list of view descriptions.
|
void |
grantAccess(String user)
Grants access to the database for user
user. |
void |
grantAccess(String user,
Permissions permissions)
Grants or revoke access to the database for user
user. |
void |
grantDefaultCollectionAccess(String user,
Permissions permissions)
Sets the default access level for collections within this database for the user
user. |
ArangoGraph |
graph(String name)
Returns a
ArangoGraph instance for the given graph name. |
void |
killQuery(String id)
Kills a running query.
|
AqlParseEntity |
parseQuery(String query)
Parse an AQL query and return information about it This method is for query validation only.
|
<T> ArangoCursor<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> ArangoCursor<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> ArangoCursor<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> ArangoCursor<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. |
void |
reloadRouting()
Reload the routing table.
|
void |
resetAccess(String user)
Clear the database access level, revert back to the default access level.
|
void |
revokeAccess(String user)
Revokes access to the database dbname for user
user. |
SearchAlias |
searchAlias(String name)
Returns a
SearchAlias instance for the given view name. |
QueryCachePropertiesEntity |
setQueryCacheProperties(QueryCachePropertiesEntity properties)
Changes the configuration for the AQL query cache.
|
QueryTrackingPropertiesEntity |
setQueryTrackingProperties(QueryTrackingPropertiesEntity properties)
Changes the configuration for the AQL query tracking
|
<T> T |
transaction(String action,
Class<T> type,
TransactionOptions options)
Performs a server-side transaction and returns its return value.
|
ArangoView |
view(String name)
Returns a
ArangoView instance for the given view name. |
abortStreamTransactionRequest, arango, beginStreamTransactionRequest, clearQueryCacheRequest, clearSlowQueriesRequest, commitStreamTransactionRequest, createAnalyzerRequest, createAqlFunctionRequest, createArangoSearchRequest, createCollectionRequest, createDropResponseDeserializer, createGraphRequest, createGraphResponseDeserializer, createSearchAliasRequest, createViewRequest, dbName, deleteAnalyzerRequest, deleteAqlFunctionRequest, deleteAqlFunctionResponseDeserializer, dropRequest, explainQueryRequest, getAccessibleDatabasesRequest, getAnalyzerRequest, getAnalyzersRequest, getAqlFunctionsRequest, getAqlFunctionsResponseDeserializer, getCollectionsRequest, getCollectionsResponseDeserializer, getCurrentlyRunningQueriesRequest, getDatabaseResponseDeserializer, getEngineRequest, getGraphsRequest, getGraphsResponseDeserializer, getInfoRequest, getInfoResponseDeserializer, getPermissionsRequest, getPermissionsResponseDeserialzer, getQueryCachePropertiesRequest, getQueryTrackingPropertiesRequest, getSearchAnalyzersResponseDeserializer, getSlowQueriesRequest, getStreamTransactionRequest, getStreamTransactionsRequest, getVersionRequest, getViewsRequest, getViewsResponseDeserializer, grantAccessRequest, killQueryRequest, parseQueryRequest, queryCloseRequest, queryNextRequest, queryRequest, reloadRoutingRequest, resetAccessRequest, setQueryCachePropertiesRequest, setQueryTrackingPropertiesRequest, streamTransactionResponseDeserializer, transactionRequest, transactionResponseDeserializer, transactionsResponseDeserializer, updateUserDefaultCollectionAccessRequestcreatePath, executor, getSerde, requestclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitarango, dbNamegetSerdeprotected ArangoDatabaseImpl(ArangoDBImpl arangoDB, DbName name)
public ArangoDBVersion getVersion()
ArangoDatabasegetVersion in interface ArangoDatabasepublic ArangoDBEngine getEngine()
ArangoDatabasegetEngine in interface ArangoDatabasepublic boolean exists()
ArangoDatabaseexists in interface ArangoDatabasepublic Collection<String> getAccessibleDatabases()
ArangoDatabasegetAccessibleDatabases in interface ArangoDatabasepublic ArangoCollection collection(String name)
ArangoDatabaseArangoCollection instance for the given collection name.collection in interface ArangoDatabasename - Name of the collectionpublic CollectionEntity createCollection(String name)
ArangoDatabasecreateCollection in interface ArangoDatabasename - The name of the collectionpublic CollectionEntity createCollection(String name, CollectionCreateOptions options)
ArangoDatabaseoptions for this collection's name, then returns collection
information from the server.createCollection in interface ArangoDatabasename - The name of the collectionoptions - Additional options, can be nullpublic Collection<CollectionEntity> getCollections()
ArangoDatabasegetCollections in interface ArangoDatabasepublic Collection<CollectionEntity> getCollections(CollectionsReadOptions options)
ArangoDatabasegetCollections in interface ArangoDatabaseoptions - Additional options, can be nullpublic IndexEntity getIndex(String id)
ArangoDatabasegetIndex in interface ArangoDatabaseid - The index-handlepublic String deleteIndex(String id)
ArangoDatabasedeleteIndex in interface ArangoDatabaseid - The index-handlepublic Boolean create()
ArangoDatabasecreate in interface ArangoDatabasepublic Boolean drop()
ArangoDatabasedrop in interface ArangoDatabasepublic void grantAccess(String user, Permissions permissions)
ArangoDatabaseuser. You need permission to the _system database in
order to execute this call.grantAccess in interface ArangoDatabaseuser - The name of the userpermissions - The permissions the user grantpublic void grantAccess(String user)
ArangoDatabaseuser. You need permission to the _system database in order to
execute this call.grantAccess in interface ArangoDatabaseuser - The name of the userpublic void revokeAccess(String user)
ArangoDatabaseuser. You need permission to the _system database in order
to execute this call.revokeAccess in interface ArangoDatabaseuser - The name of the userpublic void resetAccess(String user)
ArangoDatabaseresetAccess in interface ArangoDatabaseuser - The name of the userpublic void grantDefaultCollectionAccess(String user, Permissions permissions)
ArangoDatabaseuser. You need permission
to the _system database in order to execute this call.grantDefaultCollectionAccess in interface ArangoDatabaseuser - The name of the userpermissions - The permissions the user grantpublic Permissions getPermissions(String user)
ArangoDatabasegetPermissions in interface ArangoDatabaseuser - The name of the userpublic <T> ArangoCursor<T> query(String query, Map<String,Object> bindVars, AqlQueryOptions options, Class<T> type)
ArangoDatabasequery and bindVars, then returns a new
ArangoCursor instance for the result list.query in interface ArangoDatabasequery - An AQL query stringbindVars - key/value pairs defining the variables to bind the query tooptions - Additional options that will be passed to the query API, can be nulltype - The type of the result (POJO or RawData)public <T> ArangoCursor<T> query(String query, Map<String,Object> bindVars, Class<T> type)
ArangoDatabasequery and bindVars, then returns a new
ArangoCursor instance for the result list.query in interface ArangoDatabasequery - An AQL query stringbindVars - key/value pairs defining the variables to bind the query totype - The type of the result (POJO or RawData)public <T> ArangoCursor<T> query(String query, AqlQueryOptions options, Class<T> type)
ArangoDatabasequery, then returns a new ArangoCursor instance for the
result list.query in interface ArangoDatabasequery - An AQL query stringoptions - Additional options that will be passed to the query API, can be nulltype - The type of the result (POJO or RawData)public <T> ArangoCursor<T> query(String query, Class<T> type)
ArangoDatabasequery, then returns a new ArangoCursor instance for the
result list.query in interface ArangoDatabasequery - An AQL query stringtype - The type of the result (POJO or RawData)public <T> ArangoCursor<T> cursor(String cursorId, Class<T> type)
ArangoDatabasecursor in interface ArangoDatabasecursorId - The ID of the cursortype - The type of the result (POJO or RawData)public AqlExecutionExplainEntity explainQuery(String query, Map<String,Object> bindVars, AqlQueryExplainOptions options)
ArangoDatabaseexplainQuery in interface ArangoDatabasequery - the query which you want explainedbindVars - key/value pairs representing the bind parametersoptions - Additional options, can be nullpublic AqlParseEntity parseQuery(String query)
ArangoDatabaseArangoDatabase.query(String, Map, AqlQueryOptions, Class)parseQuery in interface ArangoDatabasequery - the query which you want parsepublic void clearQueryCache()
ArangoDatabaseclearQueryCache in interface ArangoDatabasepublic QueryCachePropertiesEntity getQueryCacheProperties()
ArangoDatabasegetQueryCacheProperties in interface ArangoDatabasepublic QueryCachePropertiesEntity setQueryCacheProperties(QueryCachePropertiesEntity properties)
ArangoDatabasesetQueryCacheProperties in interface ArangoDatabaseproperties - properties to be setpublic QueryTrackingPropertiesEntity getQueryTrackingProperties()
ArangoDatabasegetQueryTrackingProperties in interface ArangoDatabasepublic QueryTrackingPropertiesEntity setQueryTrackingProperties(QueryTrackingPropertiesEntity properties)
ArangoDatabasesetQueryTrackingProperties in interface ArangoDatabaseproperties - properties to be setpublic Collection<QueryEntity> getCurrentlyRunningQueries()
ArangoDatabasegetCurrentlyRunningQueries in interface ArangoDatabasepublic Collection<QueryEntity> getSlowQueries()
ArangoDatabasegetSlowQueries in interface ArangoDatabasepublic void clearSlowQueries()
ArangoDatabaseclearSlowQueries in interface ArangoDatabasepublic void killQuery(String id)
ArangoDatabasekillQuery in interface ArangoDatabaseid - The id of the querypublic void createAqlFunction(String name, String code, AqlFunctionCreateOptions options)
ArangoDatabasecreateAqlFunction in interface ArangoDatabasename - A valid AQL function name, e.g.: `"myfuncs::accounting::calculate_vat"`code - A String evaluating to a JavaScript functionoptions - Additional options, can be nullpublic Integer deleteAqlFunction(String name, AqlFunctionDeleteOptions options)
ArangoDatabasedeleteAqlFunction in interface ArangoDatabasename - The name of the user function to deleteoptions - Additional options, can be nullpublic Collection<AqlFunctionEntity> getAqlFunctions(AqlFunctionGetOptions options)
ArangoDatabasegetAqlFunctions in interface ArangoDatabaseoptions - Additional options, can be nullpublic ArangoGraph graph(String name)
ArangoDatabaseArangoGraph instance for the given graph name.graph in interface ArangoDatabasename - Name of the graphpublic GraphEntity createGraph(String name, Collection<EdgeDefinition> edgeDefinitions)
ArangoDatabasecreateGraph in interface ArangoDatabasename - Name of the graphedgeDefinitions - An array of definitions for the edgepublic GraphEntity createGraph(String name, Collection<EdgeDefinition> edgeDefinitions, GraphCreateOptions options)
ArangoDatabasecreateGraph in interface ArangoDatabasename - Name of the graphedgeDefinitions - An array of definitions for the edgeoptions - Additional options, can be nullpublic Collection<GraphEntity> getGraphs()
ArangoDatabasegetGraphs in interface ArangoDatabasepublic <T> T transaction(String action, Class<T> type, TransactionOptions options)
ArangoDatabasetransaction in interface ArangoDatabaseaction - A String evaluating to a JavaScript function to be executed on the server.type - The type of the result (POJO or RawData)options - Additional options, can be nullpublic StreamTransactionEntity beginStreamTransaction(StreamTransactionOptions options)
ArangoDatabasebeginStreamTransaction in interface ArangoDatabaseoptions - Additional options, can be nullpublic StreamTransactionEntity abortStreamTransaction(String id)
ArangoDatabaseabortStreamTransaction in interface ArangoDatabasepublic StreamTransactionEntity getStreamTransaction(String id)
ArangoDatabasegetStreamTransaction in interface ArangoDatabasepublic Collection<TransactionEntity> getStreamTransactions()
ArangoDatabasegetStreamTransactions in interface ArangoDatabasepublic StreamTransactionEntity commitStreamTransaction(String id)
ArangoDatabasecommitStreamTransaction in interface ArangoDatabasepublic DatabaseEntity getInfo()
ArangoDatabasegetInfo in interface ArangoDatabasepublic <T> T getDocument(String id, Class<T> type)
ArangoDatabasegetDocument in interface ArangoDatabaseid - The id of the documenttype - The type of the document (POJO or RawData)public <T> T getDocument(String id, Class<T> type, DocumentReadOptions options)
ArangoDatabasegetDocument in interface ArangoDatabaseid - The id of the documenttype - The type of the document (POJO or RawData)options - Additional options, can be nullpublic void reloadRouting()
ArangoDatabasereloadRouting in interface ArangoDatabasepublic Collection<ViewEntity> getViews()
ArangoDatabasegetViews in interface ArangoDatabasepublic ArangoView view(String name)
ArangoDatabaseArangoView instance for the given view name.view in interface ArangoDatabasename - Name of the viewpublic ArangoSearch arangoSearch(String name)
ArangoDatabaseArangoSearch instance for the given view name.arangoSearch in interface ArangoDatabasename - Name of the viewpublic SearchAlias searchAlias(String name)
ArangoDatabaseSearchAlias instance for the given view name.searchAlias in interface ArangoDatabasename - Name of the viewpublic ViewEntity createView(String name, ViewType type)
ArangoDatabasetype, then returns view information from the server.createView in interface ArangoDatabasename - The name of the viewtype - The type of the viewpublic ViewEntity createArangoSearch(String name, ArangoSearchCreateOptions options)
ArangoDatabaseoptions, then returns view information from the server.createArangoSearch in interface ArangoDatabasename - The name of the viewoptions - Additional options, can be nullpublic ViewEntity createSearchAlias(String name, SearchAliasCreateOptions options)
ArangoDatabaseoptions, then returns view information from the server.createSearchAlias in interface ArangoDatabasename - The name of the viewoptions - Additional options, can be nullpublic SearchAnalyzer createSearchAnalyzer(SearchAnalyzer analyzer)
ArangoDatabasecreateSearchAnalyzer in interface ArangoDatabaseanalyzer - SearchAnalyzerpublic SearchAnalyzer getSearchAnalyzer(String name)
ArangoDatabasegetSearchAnalyzer in interface ArangoDatabasename - of the Analyzer without database prefixpublic Collection<SearchAnalyzer> getSearchAnalyzers()
ArangoDatabasegetSearchAnalyzers in interface ArangoDatabasepublic void deleteSearchAnalyzer(String name)
ArangoDatabasedeleteSearchAnalyzer in interface ArangoDatabasename - of the Analyzer without database prefixpublic void deleteSearchAnalyzer(String name, AnalyzerDeleteOptions options)
ArangoDatabasedeleteSearchAnalyzer in interface ArangoDatabasename - of the Analyzer without database prefixoptions - AnalyzerDeleteOptionsCopyright © 2016–2023 ArangoDB GmbH. All rights reserved.