public class AddStatementImpl extends java.lang.Object implements AddStatement
Statement.LockContention
Modifier and Type | Method and Description |
---|---|
AddStatement |
add(DbDoc... docs)
Add a sequence of DbDocs.
|
AddStatement |
add(java.lang.String jsonString)
Add a document as a JSON string.
|
AddResult |
execute()
Execute the statement synchronously.
|
java.util.concurrent.CompletableFuture<AddResult> |
executeAsync()
Execute the statement asynchronously.
|
boolean |
isUpsert()
Check the upsert flag.
|
AddStatement |
setUpsert(boolean upsert)
Set upsert flag on this statement.
|
public AddStatement add(java.lang.String jsonString)
AddStatement
add
in interface AddStatement
jsonString
- document as a JSON stringAddStatement
public AddStatement add(DbDoc... docs)
AddStatement
add
in interface AddStatement
docs
- one or more DbDoc
documentsAddStatement
public AddResult execute()
Statement
execute
in interface Statement<AddStatement,AddResult>
public java.util.concurrent.CompletableFuture<AddResult> executeAsync()
Statement
executeAsync
in interface Statement<AddStatement,AddResult>
CompletableFuture
for resultpublic boolean isUpsert()
AddStatement
isUpsert
in interface AddStatement
public AddStatement setUpsert(boolean upsert)
AddStatement
Collection.addOrReplaceOne(String, DbDoc)
method.setUpsert
in interface AddStatement
upsert
- if true then this statement will be executed as an upsert statementAddStatement