public interface CollectionOperations
Modifier and Type | Method and Description |
---|---|
long |
count()
Counts the documents in a collection
|
void |
drop()
Drops the collection
|
void |
dropIndex(String id)
Deletes an index
|
com.arangodb.entity.IndexEntity |
ensureFulltextIndex(Iterable<String> fields,
com.arangodb.model.FulltextIndexOptions options)
Creates a fulltext index for the collection, if it does not already exist.
|
com.arangodb.entity.IndexEntity |
ensureGeoIndex(Iterable<String> fields,
com.arangodb.model.GeoIndexOptions options)
Creates a geo-spatial index for the collection, if it does not already exist.
|
com.arangodb.entity.IndexEntity |
ensureHashIndex(Iterable<String> fields,
com.arangodb.model.HashIndexOptions options)
Creates a hash index for the collection if it does not already exist.
|
com.arangodb.entity.IndexEntity |
ensurePersistentIndex(Iterable<String> fields,
com.arangodb.model.PersistentIndexOptions options)
Creates a persistent index for the collection, if it does not already exist.
|
com.arangodb.entity.IndexEntity |
ensureSkiplistIndex(Iterable<String> fields,
com.arangodb.model.SkiplistIndexOptions options)
Creates a skip-list index for the collection, if it does not already exist.
|
Collection<com.arangodb.entity.IndexEntity> |
getIndexes()
Returns all indexes of the collection
|
com.arangodb.entity.Permissions |
getPermissions(String username)
Get the collection access level
|
com.arangodb.entity.CollectionPropertiesEntity |
getProperties()
Reads the properties of the specified collection
|
void |
grantAccess(String username,
com.arangodb.entity.Permissions permissions)
Grants or revoke access to the collection for user user.
|
String |
name()
Return the collection name
|
void |
resetAccess(String username)
Clear the collection access level, revert back to the default access level.
|
void |
truncate()
Removes all documents from the collection, but leaves the indexes intact
|
String name()
void drop() throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
void truncate() throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
long count() throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
com.arangodb.entity.CollectionPropertiesEntity getProperties() throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
Collection<com.arangodb.entity.IndexEntity> getIndexes() throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
com.arangodb.entity.IndexEntity ensureHashIndex(Iterable<String> fields, com.arangodb.model.HashIndexOptions options) throws org.springframework.dao.DataAccessException
fields
- A list of attribute pathsoptions
- Additional options, can be nullorg.springframework.dao.DataAccessException
com.arangodb.entity.IndexEntity ensureSkiplistIndex(Iterable<String> fields, com.arangodb.model.SkiplistIndexOptions options) throws org.springframework.dao.DataAccessException
fields
- A list of attribute pathsoptions
- Additional options, can be nullorg.springframework.dao.DataAccessException
com.arangodb.entity.IndexEntity ensurePersistentIndex(Iterable<String> fields, com.arangodb.model.PersistentIndexOptions options) throws org.springframework.dao.DataAccessException
fields
- A list of attribute pathsoptions
- Additional options, can be nullorg.springframework.dao.DataAccessException
com.arangodb.entity.IndexEntity ensureGeoIndex(Iterable<String> fields, com.arangodb.model.GeoIndexOptions options) throws org.springframework.dao.DataAccessException
fields
- A list of attribute pathsoptions
- Additional options, can be nullorg.springframework.dao.DataAccessException
com.arangodb.entity.IndexEntity ensureFulltextIndex(Iterable<String> fields, com.arangodb.model.FulltextIndexOptions options) throws org.springframework.dao.DataAccessException
fields
- A list of attribute pathsoptions
- Additional options, can be nullorg.springframework.dao.DataAccessException
void dropIndex(String id) throws org.springframework.dao.DataAccessException
id
- The index-handleorg.springframework.dao.DataAccessException
void grantAccess(String username, com.arangodb.entity.Permissions permissions) throws org.springframework.dao.DataAccessException
username
- The name of the userpermissions
- The permissions the user grantorg.springframework.dao.DataAccessException
void resetAccess(String username) throws org.springframework.dao.DataAccessException
username
- The name of the userorg.springframework.dao.DataAccessException
com.arangodb.entity.Permissions getPermissions(String username) throws org.springframework.dao.DataAccessException
username
- The name of the userorg.springframework.dao.DataAccessException
Copyright © 2017–2018 ArangoDB GmbH. All rights reserved.