Class InsertParam.Builder

    • Field Detail

      • databaseName

        protected String databaseName
      • collectionName

        protected String collectionName
      • partitionName

        protected String partitionName
      • rows

        protected List<com.alibaba.fastjson.JSONObject> rows
      • rowCount

        protected int rowCount
    • Constructor Detail

      • Builder

        protected Builder()
    • Method Detail

      • withDatabaseName

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

        public InsertParam.Builder withCollectionName​(@NonNull
                                                      @NonNull 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 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
      • withRows

        public InsertParam.Builder withRows​(@NonNull
                                            @NonNull 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
      • checkFields

        protected void checkFields​(int count)
      • checkRows

        protected void checkRows()