class AsyncTransactionAttemptContext extends AnyRef
Provides methods to allow an application's transaction logic to read, mutate, insert and delete documents.
- Alphabetic
- By Inheritance
- AsyncTransactionAttemptContext
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit val executionContext: ExecutionContext
- def get(collection: AsyncCollection, id: String): Future[TransactionGetResult]
Gets a document with the specified
id
and from the specified Couchbasecollection
.Gets a document with the specified
id
and from the specified Couchbasecollection
.If the document does not exist it will raise a com.couchbase.client.core.error.DocumentNotFoundException.
- collection
the Couchbase collection the document exists on
- id
the document's ID
- returns
a
TransactionGetResult
containing the document
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def insert[T](collection: AsyncCollection, id: String, content: T)(implicit serializer: JsonSerializer[T]): Future[TransactionGetResult]
Inserts a new document into the specified Couchbase
collection
.Inserts a new document into the specified Couchbase
collection
.- collection
the Couchbase collection in which to insert the doc
- id
the document's unique ID
- content
this can be of any type for which an implicit
com.couchbase.client.scala.codec.Conversions.JsonSerializer
can be found: a list of types that are supported 'out of the box' is available at these JSON docs- returns
the doc, updated with its new CAS value and ID, and converted to a
TransactionGetResult
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def query(scope: AsyncScope, statement: String, options: TransactionQueryOptions): Future[TransactionQueryResult]
Runs a N1QL query and returns the result.
Runs a N1QL query and returns the result.
All rows are buffered in-memory.
This overload performs a 'scope-level query': that is, one in which a collection may be referenced by name in the query statement, without needing to specify the full bucket.scope.collection syntax.
Raises com.couchbase.client.core.error.CouchbaseException or an error derived from it on failure. The application can choose to catch and ignore this error, and the transaction attempt is allowed to continue. This differs from Key-Value operations, whose failure will cause the attempt to fail.
- def query(scope: AsyncScope, statement: String): Future[TransactionQueryResult]
Runs a N1QL query and returns the result.
Runs a N1QL query and returns the result.
All rows are buffered in-memory.
This overload performs a 'scope-level query': that is, one in which a collection may be referenced by name in the query statement, without needing to specify the full bucket.scope.collection syntax.
Raises com.couchbase.client.core.error.CouchbaseException or an error derived from it on failure. The application can choose to catch and ignore this error, and the transaction attempt is allowed to continue. This differs from Key-Value operations, whose failure will cause the attempt to fail.
- def query(statement: String, options: TransactionQueryOptions): Future[TransactionQueryResult]
Runs a N1QL query and returns the result.
Runs a N1QL query and returns the result.
All rows are buffered in-memory.
Raises com.couchbase.client.core.error.CouchbaseException or an error derived from it on failure. The application can choose to catch and ignore this error, and the transaction attempt is allowed to continue. This differs from Key-Value operations, whose failure will cause the attempt to fail.
- def query(statement: String): Future[TransactionQueryResult]
Runs a N1QL query and returns the result.
Runs a N1QL query and returns the result.
All rows are buffered in-memory.
Raises com.couchbase.client.core.error.CouchbaseException or an error derived from it on failure. The application can choose to catch and ignore this error, and the transaction attempt is allowed to continue. This differs from Key-Value operations, whose failure will cause the attempt to fail.
- def remove(doc: TransactionGetResult): Future[Unit]
Removes the specified
doc
.Removes the specified
doc
.- doc
- the doc to be removed
- def replace[T](doc: TransactionGetResult, content: T)(implicit serializer: JsonSerializer[T]): Future[TransactionGetResult]
Mutates the specified
doc
with new content.Mutates the specified
doc
with new content.- doc
the doc to be mutated
- content
this can be of any type for which an implicit
com.couchbase.client.scala.codec.Conversions.JsonSerializer
can be found: a list of types that are supported 'out of the box' is available at these JSON docs- returns
the doc, updated with its new CAS value. For performance a copy is not created and the original doc object is modified.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
- Deprecated