Package io.milvus.param.dml

## Class UpsertParam.Builder

- java.lang.Object
- - io.milvus.param.dml.InsertParam.Builder
  - - io.milvus.param.dml.UpsertParam.Builder

- Enclosing class:
    UpsertParam

      public static class UpsertParam.Builder
      extends InsertParam.Builder

  Builder for `UpsertParam` class.

- - ### Field Summary

    - ### Fields inherited from class io.milvus.param.dml.InsertParam.Builder

      `collectionName, databaseName, fields, partitionName, rowCount, rows`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `UpsertParam` | `build()` | Verifies parameters and creates a new `UpsertParam` instance.
    `UpsertParam.Builder` | `withCollectionName​(@NonNull java.lang.String collectionName)` | Sets the collection name.
    `UpsertParam.Builder` | `withDatabaseName​(java.lang.String databaseName)` | Sets the database name.
    `UpsertParam.Builder` | `withFields​(@NonNull java.util.List<InsertParam.Field> fields)` | Sets the column data to insert.
    `UpsertParam.Builder` | `withPartitionName​(@NonNull java.lang.String partitionName)` | Set partition name (Optional).
    `UpsertParam.Builder` | `withRows​(@NonNull java.util.List<com.alibaba.fastjson.JSONObject> rows)` | Sets the row data to insert.

    - ### Methods inherited from class io.milvus.param.dml.InsertParam.Builder

      `checkFields, checkRows`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### withDatabaseName

          public UpsertParam.Builder withDatabaseName​(java.lang.String databaseName)

      Sets the database name. database name can be nil.
      Overrides:
        `withDatabaseName` in class `InsertParam.Builder`
      Parameters:
        `databaseName` - database name
      Returns:
        `Builder`

    - #### withCollectionName

          public UpsertParam.Builder withCollectionName​(@NonNull
                                                        @NonNull java.lang.String collectionName)

      Sets the collection name. Collection name cannot be empty or null.
      Overrides:
        `withCollectionName` in class `InsertParam.Builder`
      Parameters:
        `collectionName` - collection name
      Returns:
        `Builder`

    - #### withPartitionName

          public UpsertParam.Builder withPartitionName​(@NonNull
                                                       @NonNull java.lang.String partitionName)

      Set partition name (Optional). This partition name will be ignored if the collection has a partition key field.
      Overrides:
        `withPartitionName` in class `InsertParam.Builder`
      Parameters:
        `partitionName` - partition name
      Returns:
        `Builder`

    - #### withFields

          public UpsertParam.Builder withFields​(@NonNull
                                                @NonNull java.util.List<InsertParam.Field> fields)

      Sets the column data to insert. The field list cannot be empty.
      Overrides:
        `withFields` in class `InsertParam.Builder`
      Parameters:
        `fields` - insert column data
      Returns:
        `Builder`
      See Also:
        `InsertParam.Field`

    - #### withRows

          public UpsertParam.Builder withRows​(@NonNull
                                              @NonNull java.util.List<com.alibaba.fastjson.JSONObject> rows)

      Sets the row data to insert. The rows list cannot be empty.
      Overrides:
        `withRows` in class `InsertParam.Builder`
      Parameters:
        `rows` - insert row data
      Returns:
        `Builder`
      See Also:
        `JSONObject`

    - #### build

          public UpsertParam build()
                            throws ParamException

      Verifies parameters and creates a new `UpsertParam` instance.
      Overrides:
        `build` in class `InsertParam.Builder`
      Returns:
        `UpsertParam`
      Throws:
        `ParamException`