public class ReactiveTransactionAttemptContext extends Object
Modifier and Type | Method and Description |
---|---|
Mono<TransactionGetResult> |
get(ReactiveCollection collection,
String id)
Gets a document with the specified
id and from the specified Couchbase collection . |
Mono<TransactionGetResult> |
get(ReactiveCollection collection,
String id,
TransactionGetOptions options)
Gets a document with the specified
id and from the specified Couchbase collection . |
Mono<TransactionGetResult> |
insert(ReactiveCollection collection,
String id,
Object content)
Inserts a new document into the specified Couchbase
collection . |
Mono<TransactionGetResult> |
insert(ReactiveCollection collection,
String id,
Object content,
TransactionInsertOptions options)
Inserts a new document into the specified Couchbase
collection . |
Mono<TransactionQueryResult> |
query(ReactiveScope scope,
String statement)
Runs a N1QL query and returns the result, with default parameters.
|
Mono<TransactionQueryResult> |
query(ReactiveScope scope,
String statement,
TransactionQueryOptions options)
Runs a N1QL query and returns the result.
|
Mono<TransactionQueryResult> |
query(String statement)
Calls query() with default options.
|
Mono<TransactionQueryResult> |
query(String statement,
TransactionQueryOptions options)
Runs a N1QL query and returns the result.
|
Mono<Void> |
remove(TransactionGetResult doc)
Removes the specified
doc . |
Mono<TransactionGetResult> |
replace(TransactionGetResult doc,
Object content)
Mutates the specified
doc with new content. |
Mono<TransactionGetResult> |
replace(TransactionGetResult doc,
Object content,
TransactionReplaceOptions options)
Mutates the specified
doc with new content. |
public Mono<TransactionGetResult> get(ReactiveCollection collection, String id)
id
and from the specified Couchbase collection
.
If the document does not exist it will throw a DocumentNotFoundException
.
collection
- the Couchbase collection the document exists onid
- the document's IDTransactionGetResult
containing the documentpublic Mono<TransactionGetResult> get(ReactiveCollection collection, String id, TransactionGetOptions options)
id
and from the specified Couchbase collection
.
If the document does not exist it will throw a DocumentNotFoundException
.
collection
- the Couchbase collection the document exists onid
- the document's IDoptions
- options controlling the operationTransactionGetResult
containing the documentpublic Mono<TransactionGetResult> insert(ReactiveCollection collection, String id, Object content)
collection
.collection
- the Couchbase collection in which to insert the docid
- the document's unique IDcontent
- the content to insertTransactionGetResult
public Mono<TransactionGetResult> insert(ReactiveCollection collection, String id, Object content, TransactionInsertOptions options)
collection
.collection
- the Couchbase collection in which to insert the docid
- the document's unique IDcontent
- the content to insertoptions
- options controlling the operationTransactionGetResult
public Mono<TransactionGetResult> replace(TransactionGetResult doc, Object content)
doc
with new content.doc
- the doc to be mutatedcontent
- the content to replace the doc withpublic Mono<TransactionGetResult> replace(TransactionGetResult doc, Object content, TransactionReplaceOptions options)
doc
with new content.doc
- the doc to be mutatedcontent
- the content to replace the doc withoptions
- options controlling the operationpublic Mono<Void> remove(TransactionGetResult doc)
doc
.
doc
- - the doc to be removedpublic Mono<TransactionQueryResult> query(String statement)
public Mono<TransactionQueryResult> query(String statement, TransactionQueryOptions options)
All rows are buffered in-memory.
Raises 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.
public Mono<TransactionQueryResult> query(ReactiveScope scope, String statement)
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 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.
public Mono<TransactionQueryResult> query(ReactiveScope scope, String statement, TransactionQueryOptions options)
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 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.
Copyright © 2024 Couchbase, Inc.. All rights reserved.