Class InsertParam.Builder

    • Method Detail

      • withDatabaseName

        public InsertParam.Builder withDatabaseName​(java.lang.String databaseName)
        Sets the database name. database name can be nil.
        Parameters:
        databaseName - database name
        Returns:
        Builder
      • withCollectionName

        public InsertParam.Builder withCollectionName​(@NonNull
                                                      @NonNull java.lang.String collectionName)
        Sets the collection name. Collection name cannot be empty or null.
        Parameters:
        collectionName - collection name
        Returns:
        Builder
      • withPartitionName

        public InsertParam.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.
        Parameters:
        partitionName - partition name
        Returns:
        Builder
      • withFields

        public InsertParam.Builder withFields​(@NonNull
                                              @NonNull java.util.List<InsertParam.Field> fields)
        Sets the column data to insert. The field list cannot be empty.
        Parameters:
        fields - insert column data
        Returns:
        Builder
        See Also:
        InsertParam.Field
      • withRows

        public InsertParam.Builder withRows​(@NonNull
                                            @NonNull java.util.List<com.alibaba.fastjson.JSONObject> rows)
        Sets the row data to insert. The rows list cannot be empty.
        Parameters:
        rows - insert row data
        Returns:
        Builder
        See Also:
        JSONObject