Top Description Methods
com.mysql.cj.xdevapi

public Interface AddStatement

extends Statement<AddStatement, AddResult>
Known Direct Implementers
com.mysql.cj.xdevapi.AddStatementImpl

A statement adding documents to a collection.

Method Summary

Modifier and TypeMethod and Description
public AddStatement

Returns:

AddStatement
add
(String
document as a JSON string
jsonString
)

Add a document as a JSON string.

public AddStatement

Returns:

AddStatement
add
(DbDoc...
one or more DbDoc documents
documents
)

Add a sequence of DbDocs.

public boolean

Returns:

true if this is an upsert statement.
isUpsert
()

Check the upsert flag.

public AddStatement

Returns:

AddStatement
setUpsert
(boolean
if true then this statement will be executed as an upsert statement
upsert
)

Set upsert flag on this statement.

Inherited from com.mysql.cj.xdevapi.Statement:
bindbindbindbindclearBindingsexecuteexecuteAsync

Method Detail

addback to summary
public AddStatement add(String jsonString)

Add a document as a JSON string.

Parameters
jsonString:String

document as a JSON string

Returns:AddStatement

AddStatement

addback to summary
public AddStatement add(DbDoc... documents)

Add a sequence of DbDocs.

Parameters
documents:DbDoc[]

one or more DbDoc documents

Returns:AddStatement

AddStatement

isUpsertback to summary
public boolean isUpsert()

Check the upsert flag.

Returns:boolean

true if this is an upsert statement.

setUpsertback to summary
public AddStatement setUpsert(boolean upsert)

Set upsert flag on this statement. Used internally by the Collection#addOrReplaceOne(String, DbDoc) method.

Parameters
upsert:boolean

if true then this statement will be executed as an upsert statement

Returns:AddStatement

AddStatement