Trait

ch.acmesoftware.arangodbscaladriver

ArangoCollection

Related Doc: package arangodbscaladriver

Permalink

trait ArangoCollection[F[_]] extends AnyRef

Scala API for collections, wrapping com.arangodb.ArangoCollectionAsync

Document Management

case class TestObj(_key: String, name: String)

implicit val codec = DocumentCodec.derive[testObj]

val collection: ArangoCollection[IO] = ???

for {
  _ <- collection.insertDocument(TestObj("1234", "Frank"))

  ex1 <- collection.documentExists("1234") // true

  _ <- collection.getDocument[String, TestObj]("1234")

  _ <- collection.deleteDocument("1234")

  ex2 <- collection.documentExists("1234") // false
} yield ()
F

The effect type

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ArangoCollection
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def changeProperties(props: CollectionPropertiesOptions): F[CollectionPropertiesEntity]

    Permalink

    Changes the collection's properties to given ones

    Changes the collection's properties to given ones

    See also

    com.arangodb.model.CollectionPropertiesOptions

  2. abstract def count: F[Long]

    Permalink

    Returns the number of documents in the collection

  3. abstract def create(options: CollectionCreateOptions = new CollectionCreateOptions): F[CollectionEntity]

    Permalink

    Creates the collection

    Creates the collection

    See also

    drop

    exists

  4. abstract def db: ArangoDatabase[F]

    Permalink

    Returns the parent database of this collection

    Returns the parent database of this collection

    returns

    The wrapped ArangoDatabase which contains this collection

  5. abstract def deleteDocument[T](key: String, deleteOptions: DocumentDeleteOptions = new DocumentDeleteOptions)(implicit codec: DocumentCodec[T]): F[DocumentDeleteEntity[T]]

    Permalink

    Removed a document from the collection

    Removed a document from the collection

    T

    Only needed if com.arangodb.model.DocumentDeleteOptions#returnOld is set to true for deserializing the returned document.

    key

    The value of the documents _key property

    deleteOptions

    See com.arangodb.model.DocumentDeleteOptions for details

    codec

    Only needed if com.arangodb.model.DocumentDeleteOptions#returnOld is set to true for deserializing the returned document.

  6. abstract def deleteDocuments[T](keys: Iterable[String], deleteOptions: DocumentDeleteOptions = new DocumentDeleteOptions)(implicit codec: DocumentCodec[T]): F[Iterable[Either[Throwable, DocumentDeleteEntity[T]]]]

    Permalink

    Batch delete documents

    Batch delete documents

    See also

    deleteDocument

  7. abstract def deleteIndex(id: String): F[Unit]

    Permalink

    Removes an index

  8. abstract def documentExists(key: String, options: DocumentExistsOptions = new DocumentExistsOptions): F[Boolean]

    Permalink

    Returns true if a document with given key exists on this collection

    Returns true if a document with given key exists on this collection

    key

    The value of the documents _key property

    options

    See com.arangodb.model.DocumentExistsOptions for details

  9. abstract def drop(isSystem: Boolean = false): F[Unit]

    Permalink

    Drops (deletes) the collection

    Drops (deletes) the collection

    See also

    create

    exists

  10. abstract def ensureFulltextIndex(fields: Iterable[String], options: FulltextIndexOptions): F[IndexEntity]

    Permalink

    Adds a new fulltext-index if no index with this name exists

  11. abstract def ensureGeoIndex(fields: Iterable[String], options: GeoIndexOptions): F[IndexEntity]

    Permalink

    Adds a new geo-index if no index with this name exists

  12. abstract def ensureHashIndex(fields: Iterable[String], options: HashIndexOptions): F[IndexEntity]

    Permalink

    Adds a new hash-index if no index with this name exists

  13. abstract def ensurePersistentIndex(fields: Iterable[String], options: PersistentIndexOptions): F[IndexEntity]

    Permalink

    Adds a new persistent-index if no index with this name exists

  14. abstract def ensureSkiplistIndex(fields: Iterable[String], options: SkiplistIndexOptions): F[IndexEntity]

    Permalink

    Adds a new skiplist-index if no index with this name exists

  15. abstract def exists: F[Boolean]

    Permalink

    Returns rue if this collection exists on the server

    Returns rue if this collection exists on the server

    See also

    drop

    create

  16. abstract def getDocument[K, T](key: K, readOptions: DocumentReadOptions = new DocumentReadOptions)(implicit codec: DocumentCodec[T]): F[Option[T]]

    Permalink

    Gets a document by its _key

    Gets a document by its _key

    K

    Type of the document key. If this is something other then String, AnyRef.toString will be used

    T

    Type of the document

    key

    The value of the documents _key property

    readOptions

    See com.arangodb.model.DocumentReadOptions for details

  17. abstract def getDocuments[K, T](keys: Iterable[K], readOptions: DocumentReadOptions = new DocumentReadOptions)(implicit codec: DocumentCodec[T]): F[Iterable[Either[Throwable, T]]]

    Permalink

    Batch read documents

    Batch read documents

    To do

    Streaming should be supported in a later version

    See also

    getDocument

  18. abstract def getIndex(id: String): F[Option[IndexEntity]]

    Permalink

    Returns details about an index

  19. abstract def grantAccess(user: String, permissions: Permissions): F[Unit]

    Permalink

    Grants access to this collection

  20. abstract def indexes: F[Iterable[IndexEntity]]

    Permalink

    Returns a list of all indexes in this collection

  21. abstract def info: F[CollectionEntity]

    Permalink

    Returns information about the collection

    Returns information about the collection

    See also

    com.arangodb.entity.CollectionEntity

  22. abstract def insertDocument[T](document: T, createOptions: DocumentCreateOptions = new DocumentCreateOptions)(implicit codec: DocumentCodec[T]): F[Unit]

    Permalink

    Inserts a document into the collection

    Inserts a document into the collection

    This method can also be used to overwrite already existing documents with the same _key field. See com.arangodb.model.DocumentCreateOptions#overwrite javadoc for details.

  23. abstract def insertDocuments[T](documents: Iterable[T], createOptions: DocumentCreateOptions = new DocumentCreateOptions)(implicit codec: DocumentCodec[T]): F[Unit]

    Permalink

    Batch insert documents into collection

    Batch insert documents into collection

    See also

    insertDocument

  24. abstract def load: F[CollectionEntity]

    Permalink

    Load the collection

    Load the collection

    See also

    unload

  25. abstract def name: String

    Permalink

    Returns the collections name

  26. abstract def permissions(user: String): F[Permissions]

    Permalink

    Returns the permissions to this collection for the given user

  27. abstract def properties: F[CollectionPropertiesEntity]

    Permalink

    Returns the collection's properties

    Returns the collection's properties

    See also

    com.arangodb.entity.CollectionPropertiesEntity

  28. abstract def rename(newName: String): F[CollectionEntity]

    Permalink

    Changes the collection's name

  29. abstract def resetAccess(user: String): F[Unit]

    Permalink

    Resets access privileges to this collection to defaults

  30. abstract def revision: F[CollectionRevisionEntity]

    Permalink

    Returns the current revision

    Returns the current revision

    See also

    com.arangodb.entity.CollectionRevisionEntity

  31. abstract def revokeAccess(user: String): F[Unit]

    Permalink

    Revokes access to this collection

  32. abstract def truncate: F[CollectionEntity]

    Permalink

    Truncates (deletes all documents) the collection

  33. abstract def unload: F[CollectionEntity]

    Permalink

    Unload the collection

    Unload the collection

    See also

    load

  34. abstract def unwrap: ArangoCollectionAsync

    Permalink

    Access to underlying java driver's ar.ArangoCollectionAsync

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  14. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  15. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped