Package com.arangodb
Interface ArangoCollection
- All Superinterfaces:
ArangoSerdeAccessor
- All Known Implementing Classes:
ArangoCollectionImpl
Interface for operations on ArangoDB collection level.
- Author:
- Mark Vollmary, Heiko Kernbach, Michele Rastelli
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionChanges the properties of the collectioncount()
Counts the documents in a collectioncount
(CollectionCountOptions options) Counts the documents in a collectioncreate()
Creates a collection for this collection's name, then returns collection information from the server.create
(CollectionCreateOptions options) Creates a collection with the givenoptions
for this collection's name, then returns collection information from the server.db()
The the handler of the database the collection is withindeleteDocument
(String key) Deletes the document with the givenkey
from the collection.deleteDocument
(String key, DocumentDeleteOptions options) Deletes the document with the givenkey
from the collection.<T> DocumentDeleteEntity<T>
deleteDocument
(String key, DocumentDeleteOptions options, Class<T> type) Deletes the document with the givenkey
from the collection.deleteDocuments
(RawData values) Deletes multiple documents from the collection.deleteDocuments
(RawData values, DocumentDeleteOptions options) Deletes multiple documents from the collection.deleteDocuments
(Iterable<?> values) Deletes multiple documents from the collection.deleteDocuments
(Iterable<?> values, DocumentDeleteOptions options) Deletes multiple documents from the collection.deleteDocuments
(Iterable<?> values, DocumentDeleteOptions options, Class<T> type) Deletes multiple documents from the collection.deleteIndex
(String id) Deletes the index with the givenid
from the collection.documentExists
(String key) Checks if the document exists by reading a single document headdocumentExists
(String key, DocumentExistsOptions options) Checks if the document exists by reading a single document headvoid
drop()
Deletes the collection from the database.void
drop
(boolean isSystem) Deletes the collection from the database.ensureFulltextIndex
(Iterable<String> fields, FulltextIndexOptions options) Deprecated.since ArangoDB 3.10, use ArangoSearch or Inverted indexes instead.ensureGeoIndex
(Iterable<String> fields, GeoIndexOptions options) Creates a geo-spatial index for the collection, if it does not already exist.ensureInvertedIndex
(InvertedIndexOptions options) Creates an inverted index for the collection, if it does not already exist.ensureMDIndex
(Iterable<String> fields, MDIndexOptions options) Creates a multi-dimensional index for the collection, if it does not already exist.ensureMDPrefixedIndex
(Iterable<String> fields, MDPrefixedIndexOptions options) Creates a multi-dimensional prefixed index for the collection, if it does not already exist.ensurePersistentIndex
(Iterable<String> fields, PersistentIndexOptions options) Creates a persistent index for the collection, if it does not already exist.ensureTtlIndex
(Iterable<String> fields, TtlIndexOptions options) Creates a ttl index for the collection, if it does not already exist.ensureZKDIndex
(Iterable<String> fields, ZKDIndexOptions options) Deprecated.since ArangoDB 3.12, useensureMDIndex(Iterable, MDIndexOptions)
orensureMDPrefixedIndex(Iterable, MDPrefixedIndexOptions)
instead.boolean
exists()
Checks whether the collection exists<T> T
getDocument
(String key, Class<T> type) Retrieves the document with the givenkey
from the collection.<T> T
getDocument
(String key, Class<T> type, DocumentReadOptions options) Retrieves the document with the givenkey
from the collection.<T> MultiDocumentEntity<T>
getDocuments
(Iterable<String> keys, Class<T> type) Retrieves multiple documents with the given_key
from the collection.<T> MultiDocumentEntity<T>
getDocuments
(Iterable<String> keys, Class<T> type, DocumentReadOptions options) Retrieves multiple documents with the given_key
from the collection.Fetches information about the index with the givenid
and returns it.Fetches a list of all indexes on this collection.getInfo()
Returns information about the collectionFetches information about the inverted index with the givenid
and returns it.Fetches a list of all inverted indexes on this collection.getPermissions
(String user) Get the collection access levelReads the properties of the specified collectiongetResponsibleShard
(Object value) Returns the responsible shard for the document.Retrieve the collections revisionvoid
grantAccess
(String user, Permissions permissions) Grants or revoke access to the collection for user user.importDocuments
(RawData values) Bulk imports the given values into the collection.importDocuments
(RawData values, DocumentImportOptions options) Bulk imports the given values into the collection.importDocuments
(Iterable<?> values) Bulk imports the given values into the collection.importDocuments
(Iterable<?> values, DocumentImportOptions options) Bulk imports the given values into the collection.insertDocument
(Object value) Creates a new document from the given document, unless there is already a document with the _key given.<T> DocumentCreateEntity<T>
insertDocument
(T value, DocumentCreateOptions options) Creates a new document from the given document, unless there is already a document with the _key given.<T> DocumentCreateEntity<T>
insertDocument
(T value, DocumentCreateOptions options, Class<T> type) Creates a new document from the given document, unless there is already a document with the _key given.insertDocuments
(RawData values) Creates new documents from the given documents, unless there is already a document with the _key given.insertDocuments
(RawData values, DocumentCreateOptions options) Creates new documents from the given documents, unless there is already a document with the _key given.insertDocuments
(Iterable<?> values) Creates new documents from the given documents, unless there is already a document with the _key given.insertDocuments
(Iterable<?> values, DocumentCreateOptions options) Creates new documents from the given documents, unless there is already a document with the _key given.insertDocuments
(Iterable<? extends T> values, DocumentCreateOptions options, Class<T> type) Creates new documents from the given documents, unless there is already a document with the _key given.name()
The name of the collectionRenames the collectionreplaceDocument
(String key, Object value) Replaces the document withkey
with the one in the body, provided there is such a document and no precondition is violated<T> DocumentUpdateEntity<T>
replaceDocument
(String key, T value, DocumentReplaceOptions options) Replaces the document withkey
with the one in the body, provided there is such a document and no precondition is violated<T> DocumentUpdateEntity<T>
replaceDocument
(String key, T value, DocumentReplaceOptions options, Class<T> type) Replaces the document withkey
with the one in the body, provided there is such a document and no precondition is violatedreplaceDocuments
(RawData values) Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are specified by the _key attributes in the documents in values.replaceDocuments
(RawData values, DocumentReplaceOptions options) Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are specified by the _key attributes in the documents in values.replaceDocuments
(Iterable<?> values) Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are specified by the _key attributes in the documents in values.replaceDocuments
(Iterable<?> values, DocumentReplaceOptions options) Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are specified by the _key attributes in the documents in values.replaceDocuments
(Iterable<? extends T> values, DocumentReplaceOptions options, Class<T> type) Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are specified by the _key attributes in the documents in values.void
resetAccess
(String user) Clear the collection access level, revert back to the default access level.void
revokeAccess
(String user) Revokes access to the collection for user user.truncate()
Removes all documents from the collection, but leaves the indexes intacttruncate
(CollectionTruncateOptions options) Removes all documents from the collection, but leaves the indexes intactupdateDocument
(String key, Object value) Partially updates the document identified by document-key.<T> DocumentUpdateEntity<T>
updateDocument
(String key, Object value, DocumentUpdateOptions options, Class<T> returnType) Partially updates the document identified by document-key.<T> DocumentUpdateEntity<T>
updateDocument
(String key, T value, DocumentUpdateOptions options) Partially updates the document identified by document-key.updateDocuments
(RawData values) Partially updates documents, the documents to update are specified by the _key attributes in the objects on values.updateDocuments
(RawData values, DocumentUpdateOptions options) Partially updates documents, the documents to update are specified by the _key attributes in the objects on values.updateDocuments
(Iterable<?> values) Partially updates documents, the documents to update are specified by the _key attributes in the objects on values.updateDocuments
(Iterable<?> values, DocumentUpdateOptions options) Partially updates documents, the documents to update are specified by the _key attributes in the objects on values.updateDocuments
(Iterable<?> values, DocumentUpdateOptions options, Class<T> returnType) Partially updates documents, the documents to update are specified by the _key attributes in the objects on values.Methods inherited from interface com.arangodb.ArangoSerdeAccessor
getSerde
-
Method Details
-
db
ArangoDatabase db()The the handler of the database the collection is within- Returns:
- database handler
-
name
String name()The name of the collection- Returns:
- collection name
-
insertDocument
Creates a new document from the given document, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Parameters:
value
- A representation of a single document (POJO orRawData
- Returns:
- information about the document
- See Also:
-
insertDocument
Creates a new document from the given document, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Parameters:
value
- A representation of a single document (POJO orRawData
)options
- Additional options- Returns:
- information about the document
- See Also:
-
insertDocument
Creates a new document from the given document, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Parameters:
value
- A representation of a single document (POJO orRawData
)options
- Additional optionstype
- Deserialization target type for the returned documents.- Returns:
- information about the document
- See Also:
-
insertDocuments
Creates new documents from the given documents, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Parameters:
values
- Raw data representing a collection of documents- Returns:
- information about the documents
- See Also:
-
insertDocuments
MultiDocumentEntity<DocumentCreateEntity<RawData>> insertDocuments(RawData values, DocumentCreateOptions options) Creates new documents from the given documents, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Parameters:
values
- Raw data representing a collection of documentsoptions
- Additional options- Returns:
- information about the documents
- See Also:
-
insertDocuments
Creates new documents from the given documents, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Parameters:
values
- A List of documents- Returns:
- information about the documents
- See Also:
-
insertDocuments
MultiDocumentEntity<DocumentCreateEntity<Void>> insertDocuments(Iterable<?> values, DocumentCreateOptions options) Creates new documents from the given documents, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Parameters:
values
- A List of documents (POJO orRawData
)options
- Additional options- Returns:
- information about the documents
- See Also:
-
insertDocuments
<T> MultiDocumentEntity<DocumentCreateEntity<T>> insertDocuments(Iterable<? extends T> values, DocumentCreateOptions options, Class<T> type) Creates new documents from the given documents, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Parameters:
values
- A List of documents (POJO orRawData
)options
- Additional optionstype
- Deserialization target type for the returned documents.- Returns:
- information about the documents
- See Also:
-
importDocuments
Bulk imports the given values into the collection.- Parameters:
values
- A List of documents (POJO orRawData
)- Returns:
- information about the import
- See Also:
-
importDocuments
Bulk imports the given values into the collection.- Parameters:
values
- A List of documents (POJO orRawData
)options
- Additional options, can be null- Returns:
- information about the import
- See Also:
-
importDocuments
Bulk imports the given values into the collection.- Parameters:
values
- Raw data representing a collection of documents- Returns:
- information about the import
- See Also:
-
importDocuments
Bulk imports the given values into the collection.- Parameters:
values
- Raw data representing a collection of documentsoptions
- Additional options, can be null- Returns:
- information about the import
- See Also:
-
getDocument
Retrieves the document with the givenkey
from the collection.- Parameters:
key
- The key of the documenttype
- The type of the document (POJO orRawData
)- Returns:
- the document identified by the key
- See Also:
-
getDocument
Retrieves the document with the givenkey
from the collection.- Parameters:
key
- The key of the documenttype
- The type of the document (POJO orRawData
)options
- Additional options, can be null- Returns:
- the document identified by the key
- See Also:
-
getDocuments
Retrieves multiple documents with the given_key
from the collection.- Parameters:
keys
- The keys of the documentstype
- The type of the documents (POJO orRawData
)- Returns:
- the documents and possible errors
- See Also:
-
getDocuments
<T> MultiDocumentEntity<T> getDocuments(Iterable<String> keys, Class<T> type, DocumentReadOptions options) Retrieves multiple documents with the given_key
from the collection.- Parameters:
keys
- The keys of the documentstype
- The type of the documents (POJO orRawData
)options
- Additional options, can be null- Returns:
- the documents and possible errors
- See Also:
-
replaceDocument
Replaces the document withkey
with the one in the body, provided there is such a document and no precondition is violated- Parameters:
key
- The key of the documentvalue
- A representation of a single document (POJO orRawData
)- Returns:
- information about the document
- See Also:
-
replaceDocument
Replaces the document withkey
with the one in the body, provided there is such a document and no precondition is violated- Parameters:
key
- The key of the documentvalue
- A representation of a single document (POJO orRawData
)options
- Additional options- Returns:
- information about the document
- See Also:
-
replaceDocument
<T> DocumentUpdateEntity<T> replaceDocument(String key, T value, DocumentReplaceOptions options, Class<T> type) Replaces the document withkey
with the one in the body, provided there is such a document and no precondition is violated- Parameters:
key
- The key of the documentvalue
- A representation of a single document (POJO orRawData
)options
- Additional optionstype
- Deserialization target type for the returned documents.- Returns:
- information about the document
- See Also:
-
replaceDocuments
Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are specified by the _key attributes in the documents in values.- Parameters:
values
- Raw data representing a collection of documents- Returns:
- information about the documents
- See Also:
-
replaceDocuments
MultiDocumentEntity<DocumentUpdateEntity<RawData>> replaceDocuments(RawData values, DocumentReplaceOptions options) Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are specified by the _key attributes in the documents in values.- Parameters:
values
- Raw data representing a collection of documentsoptions
- Additional options- Returns:
- information about the documents
- See Also:
-
replaceDocuments
Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are specified by the _key attributes in the documents in values.- Parameters:
values
- A List of documents (POJO orRawData
)- Returns:
- information about the documents
- See Also:
-
replaceDocuments
MultiDocumentEntity<DocumentUpdateEntity<Void>> replaceDocuments(Iterable<?> values, DocumentReplaceOptions options) Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are specified by the _key attributes in the documents in values.- Parameters:
values
- A List of documents (POJO orRawData
)options
- Additional options- Returns:
- information about the documents
- See Also:
-
replaceDocuments
<T> MultiDocumentEntity<DocumentUpdateEntity<T>> replaceDocuments(Iterable<? extends T> values, DocumentReplaceOptions options, Class<T> type) Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are specified by the _key attributes in the documents in values.- Parameters:
values
- A List of documents (POJO orRawData
)options
- Additional optionstype
- Deserialization target type for the returned documents.- Returns:
- information about the documents
- See Also:
-
updateDocument
Partially updates the document identified by document-key. The value must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing document if they do not yet exist, and overwritten in the existing document if they do exist there.- Parameters:
key
- The key of the documentvalue
- A representation of a single document (POJO orRawData
)- Returns:
- information about the document
- See Also:
-
updateDocument
Partially updates the document identified by document-key. The value must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing document if they do not yet exist, and overwritten in the existing document if they do exist there.- Parameters:
key
- The key of the documentvalue
- A representation of a single document (POJO orRawData
)options
- Additional options- Returns:
- information about the document
- See Also:
-
updateDocument
<T> DocumentUpdateEntity<T> updateDocument(String key, Object value, DocumentUpdateOptions options, Class<T> returnType) Partially updates the document identified by document-key. The value must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing document if they do not yet exist, and overwritten in the existing document if they do exist there.- Parameters:
key
- The key of the documentvalue
- A representation of a single document (POJO orRawData
)options
- Additional optionsreturnType
- Type of the returned newDocument and/or oldDocument- Returns:
- information about the document
- See Also:
-
updateDocuments
Partially updates documents, the documents to update are specified by the _key attributes in the objects on values. Vales must contain a list of document updates with the attributes to patch (the patch documents). All attributes from the patch documents will be added to the existing documents if they do not yet exist, and overwritten in the existing documents if they do exist there.- Parameters:
values
- Raw data representing a collection of documents- Returns:
- information about the documents
- See Also:
-
updateDocuments
MultiDocumentEntity<DocumentUpdateEntity<RawData>> updateDocuments(RawData values, DocumentUpdateOptions options) Partially updates documents, the documents to update are specified by the _key attributes in the objects on values. Vales must contain a list of document updates with the attributes to patch (the patch documents). All attributes from the patch documents will be added to the existing documents if they do not yet exist, and overwritten in the existing documents if they do exist there.- Parameters:
values
- Raw data representing a collection of documentsoptions
- Additional options- Returns:
- information about the documents
- See Also:
-
updateDocuments
Partially updates documents, the documents to update are specified by the _key attributes in the objects on values. Vales must contain a list of document updates with the attributes to patch (the patch documents). All attributes from the patch documents will be added to the existing documents if they do not yet exist, and overwritten in the existing documents if they do exist there.- Parameters:
values
- A list of documents (POJO orRawData
)- Returns:
- information about the documents
- See Also:
-
updateDocuments
MultiDocumentEntity<DocumentUpdateEntity<Void>> updateDocuments(Iterable<?> values, DocumentUpdateOptions options) Partially updates documents, the documents to update are specified by the _key attributes in the objects on values. Vales must contain a list of document updates with the attributes to patch (the patch documents). All attributes from the patch documents will be added to the existing documents if they do not yet exist, and overwritten in the existing documents if they do exist there.- Parameters:
values
- A list of documents (POJO orRawData
)options
- Additional options- Returns:
- information about the documents
- See Also:
-
updateDocuments
<T> MultiDocumentEntity<DocumentUpdateEntity<T>> updateDocuments(Iterable<?> values, DocumentUpdateOptions options, Class<T> returnType) Partially updates documents, the documents to update are specified by the _key attributes in the objects on values. Vales must contain a list of document updates with the attributes to patch (the patch documents). All attributes from the patch documents will be added to the existing documents if they do not yet exist, and overwritten in the existing documents if they do exist there.- Parameters:
values
- A list of documents (POJO orRawData
)options
- Additional optionsreturnType
- Type of the returned newDocument and/or oldDocument- Returns:
- information about the documents
- See Also:
-
deleteDocument
Deletes the document with the givenkey
from the collection.- Parameters:
key
- The key of the document- Returns:
- information about the document
- See Also:
-
deleteDocument
Deletes the document with the givenkey
from the collection.- Parameters:
key
- The key of the documentoptions
- Additional options- Returns:
- information about the document
- See Also:
-
deleteDocument
<T> DocumentDeleteEntity<T> deleteDocument(String key, DocumentDeleteOptions options, Class<T> type) Deletes the document with the givenkey
from the collection.- Parameters:
key
- The key of the documenttype
- Deserialization target type for the returned documents.options
- Additional options- Returns:
- information about the document
- See Also:
-
deleteDocuments
Deletes multiple documents from the collection.- Parameters:
values
- Raw data representing the keys of the documents or the documents themselves- Returns:
- information about the documents
- See Also:
-
deleteDocuments
MultiDocumentEntity<DocumentDeleteEntity<RawData>> deleteDocuments(RawData values, DocumentDeleteOptions options) Deletes multiple documents from the collection.- Parameters:
values
- Raw data representing the keys of the documents or the documents themselvesoptions
- Additional options- Returns:
- information about the documents
- See Also:
-
deleteDocuments
Deletes multiple documents from the collection.- Parameters:
values
- The keys of the documents or the documents themselves- Returns:
- information about the documents
- See Also:
-
deleteDocuments
MultiDocumentEntity<DocumentDeleteEntity<Void>> deleteDocuments(Iterable<?> values, DocumentDeleteOptions options) Deletes multiple documents from the collection.- Parameters:
values
- The keys of the documents or the documents themselvesoptions
- Additional options- Returns:
- information about the documents
- See Also:
-
deleteDocuments
<T> MultiDocumentEntity<DocumentDeleteEntity<T>> deleteDocuments(Iterable<?> values, DocumentDeleteOptions options, Class<T> type) Deletes multiple documents from the collection.- Parameters:
values
- The keys of the documents or the documents themselvestype
- Deserialization target type for the returned documents.options
- Additional options- Returns:
- information about the documents
- See Also:
-
documentExists
Checks if the document exists by reading a single document head- Parameters:
key
- The key of the document- Returns:
- true if the document was found, otherwise false
- See Also:
-
documentExists
Checks if the document exists by reading a single document head- Parameters:
key
- The key of the documentoptions
- Additional options, can be null- Returns:
- true if the document was found, otherwise false
- See Also:
-
getIndex
Fetches information about the index with the givenid
and returns it.
Note: inverted indexes are not returned by this method. UsegetInvertedIndex(String)
instead.- Parameters:
id
- The index-handle- Returns:
- information about the index
- See Also:
-
getInvertedIndex
Fetches information about the inverted index with the givenid
and returns it.- Parameters:
id
- The index-handle- Returns:
- information about the index
- Since:
- ArangoDB 3.10
- See Also:
-
deleteIndex
Deletes the index with the givenid
from the collection.- Parameters:
id
- The index-handle- Returns:
- the id of the index
- See Also:
-
ensurePersistentIndex
Creates a persistent index for the collection, if it does not already exist.- Parameters:
fields
- A list of attribute pathsoptions
- Additional options, can be null- Returns:
- information about the index
- See Also:
-
ensureGeoIndex
Creates a geo-spatial index for the collection, if it does not already exist.- Parameters:
fields
- A list of attribute pathsoptions
- Additional options, can be null- Returns:
- information about the index
- See Also:
-
ensureFulltextIndex
Deprecated.since ArangoDB 3.10, use ArangoSearch or Inverted indexes instead.Creates a fulltext index for the collection, if it does not already exist.- Parameters:
fields
- A list of attribute pathsoptions
- Additional options, can be null- Returns:
- information about the index
- See Also:
-
ensureTtlIndex
Creates a ttl index for the collection, if it does not already exist.- Parameters:
fields
- A list of attribute pathsoptions
- Additional options, can be null- Returns:
- information about the index
- See Also:
-
ensureZKDIndex
Deprecated.since ArangoDB 3.12, useensureMDIndex(Iterable, MDIndexOptions)
orensureMDPrefixedIndex(Iterable, MDPrefixedIndexOptions)
instead.Creates a ZKD multi-dimensional index for the collection, if it does not already exist. Note that zkd indexes are an experimental feature in ArangoDB 3.9.- Parameters:
fields
- A list of attribute pathsoptions
- Additional options, can be null- Returns:
- information about the index
- Since:
- ArangoDB 3.9
- See Also:
-
ensureMDIndex
Creates a multi-dimensional index for the collection, if it does not already exist.- Parameters:
fields
- A list of attribute names used for each dimensionoptions
- Additional options, can be null.- Returns:
- information about the index
- Since:
- ArangoDB 3.12
- See Also:
-
ensureMDPrefixedIndex
Creates a multi-dimensional prefixed index for the collection, if it does not already exist.- Parameters:
fields
- A list of attribute names used for each dimensionoptions
- Additional options, cannot be null.- Returns:
- information about the index
- Since:
- ArangoDB 3.12
- See Also:
-
ensureInvertedIndex
Creates an inverted index for the collection, if it does not already exist.- Parameters:
options
- index creation options- Returns:
- information about the index
- Since:
- ArangoDB 3.10
- See Also:
-
getIndexes
Collection<IndexEntity> getIndexes()Fetches a list of all indexes on this collection.
Note: inverted indexes are not returned by this method. UsegetInvertedIndexes()
instead.- Returns:
- information about the indexes
- See Also:
-
getInvertedIndexes
Collection<InvertedIndexEntity> getInvertedIndexes()Fetches a list of all inverted indexes on this collection.- Returns:
- information about the indexes
- Since:
- ArangoDB 3.10
- See Also:
-
exists
boolean exists()Checks whether the collection exists- Returns:
- true if the collection exists, otherwise false
- See Also:
-
truncate
CollectionEntity truncate()Removes all documents from the collection, but leaves the indexes intact- Returns:
- information about the collection
- See Also:
-
truncate
Removes all documents from the collection, but leaves the indexes intact- Parameters:
options
-- Returns:
- information about the collection
- Since:
- ArangoDB 3.5.0
- See Also:
-
count
CollectionPropertiesEntity count()Counts the documents in a collection- Returns:
- information about the collection, including the number of documents
- See Also:
-
count
Counts the documents in a collection- Parameters:
options
-- Returns:
- information about the collection, including the number of documents
- Since:
- ArangoDB 3.5.0
- See Also:
-
create
CollectionEntity create()Creates a collection for this collection's name, then returns collection information from the server.- Returns:
- information about the collection
- See Also:
-
create
Creates a collection with the givenoptions
for this collection's name, then returns collection information from the server.- Parameters:
options
- Additional options, can be null- Returns:
- information about the collection
- See Also:
-
drop
void drop()Deletes the collection from the database.- See Also:
-
drop
void drop(boolean isSystem) Deletes the collection from the database.- Parameters:
isSystem
- Whether or not the collection to drop is a system collection. This parameter must be set to true in order to drop a system collection.- Since:
- ArangoDB 3.1.0
- See Also:
-
getInfo
CollectionEntity getInfo()Returns information about the collection- Returns:
- information about the collection
- See Also:
-
getProperties
CollectionPropertiesEntity getProperties()Reads the properties of the specified collection- Returns:
- properties of the collection
- See Also:
-
changeProperties
Changes the properties of the collection- Parameters:
options
- Additional options, can be null- Returns:
- properties of the collection
- See Also:
-
rename
Renames the collection- Parameters:
newName
- The new name- Returns:
- information about the collection
- See Also:
-
getResponsibleShard
Returns the responsible shard for the document. Please note that this API is only meaningful and available on a cluster coordinator.- Parameters:
value
- A projection of the document containing at least the shard key (_key or a custom attribute) for which the responsible shard should be determined- Returns:
- information about the responsible shard
- Since:
- ArangoDB 3.5.0
- See Also:
-
getRevision
CollectionRevisionEntity getRevision()Retrieve the collections revision- Returns:
- information about the collection, including the collections revision
- See Also:
-
grantAccess
Grants or revoke access to the collection for user user. You need permission to the _system database in order to execute this call.- Parameters:
user
- The name of the userpermissions
- The permissions the user grant- See Also:
-
revokeAccess
Revokes access to the collection for user user. You need permission to the _system database in order to execute this call.- Parameters:
user
- The name of the user- See Also:
-
resetAccess
Clear the collection access level, revert back to the default access level.- Parameters:
user
- The name of the user- Since:
- ArangoDB 3.2.0
- See Also:
-
getPermissions
Get the collection access level- Parameters:
user
- The name of the user- Returns:
- permissions of the user
- Since:
- ArangoDB 3.2.0
- See Also:
-