Packages

trait CouchbaseSession extends AnyRef

Scala API: A Couchbase session allowing querying and interacting with a specific couchbase bucket.

Not for user extension.

Annotations
@DoNotInherit()
Source
CouchbaseSession.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CouchbaseSession
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def asJava: javadsl.CouchbaseSession
  2. abstract def close(): Future[Done]

    Close the session and release all resources it holds.

    Close the session and release all resources it holds. Subsequent calls to other methods will likely fail.

  3. abstract def counter(id: String, delta: Long, initial: Long, writeSettings: CouchbaseWriteSettings): Future[Long]

    Create or increment a counter

    Create or increment a counter

    id

    What counter document id

    delta

    Value to increase the counter with if it does exist

    initial

    Value to start from if the counter does not exist

    returns

    The value of the counter after applying the delta

  4. abstract def counter(id: String, delta: Long, initial: Long): Future[Long]

    Create or increment a counter

    Create or increment a counter

    id

    What counter document id

    delta

    Value to increase the counter with if it does exist

    initial

    Value to start from if the counter does not exist

    returns

    The value of the counter after applying the delta

  5. abstract def createIndex(indexName: String, ignoreIfExist: Boolean, fields: AnyRef*): Future[Boolean]

    Create a secondary index for the current bucket.

    Create a secondary index for the current bucket.

    indexName

    the name of the index.

    ignoreIfExist

    if a secondary index already exists with that name, an exception will be thrown unless this is set to true.

    fields

    the JSON fields to index - each can be either String or [com.couchbase.client.java.query.dsl.Expression]

    returns

    a scala.concurrent.Future of true if the index was/will be effectively created, false if the index existed and ignoreIfExist is true. Completion of the future does not guarantee the index is online and ready to be used.

  6. abstract def get[T <: Document[_]](id: String, timeout: FiniteDuration, documentClass: Class[T]): Future[Option[T]]

    returns

    A document of the given type if found or none if there is no document for the id

  7. abstract def get(id: String, timeout: FiniteDuration): Future[Option[JsonDocument]]

    timeout

    fail the returned future with a TimeoutException if it takes longer than this

    returns

    A document if found or none if there is no document for the id

  8. abstract def get[T <: Document[_]](id: String, documentClass: Class[T]): Future[Option[T]]

    returns

    A document of the given type if found or none if there is no document for the id

  9. abstract def get(id: String): Future[Option[JsonDocument]]

    returns

    A document if found or none if there is no document for the id

  10. abstract def insert(document: JsonDocument, writeSettings: CouchbaseWriteSettings): Future[JsonDocument]

    Insert a JSON document using the given write settings.

    Insert a JSON document using the given write settings.

    For inserting other types of documents see insertDoc.

  11. abstract def insert(document: JsonDocument): Future[JsonDocument]

    Insert a JSON document using the default write settings.

    Insert a JSON document using the default write settings.

    For inserting other types of documents see insertDoc.

    returns

    A future that completes with the written document when the write completes

  12. abstract def insertDoc[T <: Document[_]](document: T, writeSettings: CouchbaseWriteSettings): Future[T]

    Insert any type of document using the given write settings.

    Insert any type of document using the given write settings. Separate from insert to make the most common case smoother with the type inference

    returns

    A future that completes with the written document when the write completes

  13. abstract def insertDoc[T <: Document[_]](document: T): Future[T]

    Insert any type of document using the default write settings.

    Insert any type of document using the default write settings. Separate from insert to make the most common case smoother with the type inference

    returns

    A future that completes with the written document when the write completes

  14. abstract def listIndexes(): Source[IndexInfo, NotUsed]

    List the existing secondary indexes for the bucket

  15. abstract def remove(id: String, writeSettings: CouchbaseWriteSettings): Future[Done]

    Remove a document by id using the default write settings.

    Remove a document by id using the default write settings.

    returns

    Future that completes when the document has been removed, if there is no such document the future is failed with a DocumentDoesNotExistException

  16. abstract def remove(id: String): Future[Done]

    Remove a document by id using the default write settings.

    Remove a document by id using the default write settings.

    returns

    Future that completes when the document has been removed, if there is no such document the future is failed with a DocumentDoesNotExistException

  17. abstract def replace(document: JsonDocument, writeSettings: CouchbaseWriteSettings): Future[JsonDocument]

    Replace using the given write settings

    Replace using the given write settings

    For replacing other types of documents see replaceDoc.

    returns

    a future that completes when the replace is done

  18. abstract def replace(document: JsonDocument): Future[JsonDocument]

    Replace using the default write settings.

    Replace using the default write settings.

    For replacing other types of documents see replaceDoc.

    returns

    a future that completes when the replace is done

  19. abstract def replaceDoc[T <: Document[_]](document: T, writeSettings: CouchbaseWriteSettings): Future[T]

    Replace using the given write settings

    Replace using the given write settings

    Separate from replace to make the most common case smoother with the type inference

    returns

    a future that completes when the replace is done

  20. abstract def replaceDoc[T <: Document[_]](document: T): Future[T]

    Replace using the default write settings.

    Replace using the default write settings.

    Separate from replace to make the most common case smoother with the type inference

    returns

    a future that completes when the replace is done

  21. abstract def singleResponseQuery(query: N1qlQuery): Future[Option[JsonObject]]
  22. abstract def singleResponseQuery(query: Statement): Future[Option[JsonObject]]
  23. abstract def streamedQuery(query: Statement): Source[JsonObject, NotUsed]
  24. abstract def streamedQuery(query: N1qlQuery): Source[JsonObject, NotUsed]
  25. abstract def underlying: AsyncBucket
  26. abstract def upsert(document: JsonDocument, writeSettings: CouchbaseWriteSettings): Future[JsonDocument]

    Upsert using the given write settings

    Upsert using the given write settings

    For upserting other types of documents see upsertDoc.

    returns

    a future that completes when the upsert is done

  27. abstract def upsert(document: JsonDocument): Future[JsonDocument]

    Upsert using the default write settings.

    Upsert using the default write settings.

    For upserting other types of documents see upsertDoc.

    returns

    a future that completes when the upsert is done

  28. abstract def upsertDoc[T <: Document[_]](document: T, writeSettings: CouchbaseWriteSettings): Future[T]

    Upsert using the given write settings

    Upsert using the given write settings

    Separate from upsert to make the most common case smoother with the type inference

    returns

    a future that completes when the upsert is done

  29. abstract def upsertDoc[T <: Document[_]](document: T): Future[T]

    Upsert using the default write settings.

    Upsert using the default write settings.

    Separate from upsert to make the most common case smoother with the type inference

    returns

    a future that completes when the upsert is done

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped