Interface UpdateStatement

    • Method Detail

      • batch

        default <T> int batch​(@NonNull
                              @NonNull SQLContext context,
                              @NonNull
                              @NonNull Stream<? extends T> items,
                              @NonNull
                              @NonNull CheckedBiConsumer<T,​NamedPreparedStatement> statementFiller)
                       throws SQLException
        Performs a batch update over a Stream of items filling the NamedPreparedStatement using the given CheckedBiConsumer.
        Type Parameters:
        T - the type of object in the Stream
        Parameters:
        context - the context to perform this update statement on
        items - the items to use to fill in the values of the update statement
        statementFiller - a consumer that fills in a NamedPreparedStatement for an item in the Stream
        Returns:
        the total number of items that were updated
        Throws:
        SQLException - something happened trying to update
      • batch

        default <T> int batch​(@NonNull
                              @NonNull SQLContext context,
                              @NonNull
                              @NonNull Stream<? extends T> items,
                              @NonNull
                              @NonNull CheckedBiConsumer<T,​NamedPreparedStatement> statementFiller,
                              int batchSize)
                       throws SQLException
        Performs a batch update over a Stream of items filling the NamedPreparedStatement using the given CheckedBiConsumer.
        Type Parameters:
        T - the type of object in the Stream
        Parameters:
        context - the context to perform this update statement on
        items - the items to use to fill in the values of the update statement
        statementFiller - a consumer that fills in a NamedPreparedStatement for an item in the Stream
        batchSize - the size of the batch for updating the database
        Returns:
        the total number of items that were updated
        Throws:
        SQLException - something happened trying to update
      • batch

        default <T> int batch​(@NonNull
                              @NonNull SQLContext context,
                              @NonNull
                              @NonNull Collection<? extends T> items,
                              @NonNull
                              @NonNull CheckedBiConsumer<T,​NamedPreparedStatement> statementFiller)
                       throws SQLException
        Performs a batch update over a Collection of items filling the NamedPreparedStatement using the given CheckedBiConsumer.
        Type Parameters:
        T - the type of object in the Stream
        Parameters:
        context - the context to perform this update statement on
        items - the items to use to fill in the values of the update statement
        statementFiller - a consumer that fills in a NamedPreparedStatement for an item in the Collection
        Returns:
        the total number of items that were updated
        Throws:
        SQLException - something happened trying to update
      • batch

        default <T> int batch​(@NonNull
                              @NonNull SQLContext context,
                              @NonNull
                              @NonNull Collection<? extends T> items,
                              @NonNull
                              @NonNull CheckedBiConsumer<T,​NamedPreparedStatement> statementFiller,
                              int batchSize)
                       throws SQLException
        Performs a batch update over a Collection of items filling the NamedPreparedStatement using the given CheckedBiConsumer.
        Type Parameters:
        T - the type of object in the Stream
        Parameters:
        context - the context to perform this update statement on
        items - the items to use to fill in the values of the update statement
        statementFiller - a consumer that fills in a NamedPreparedStatement for an item in the Collection
        batchSize - the size of the batch for updating the database
        Returns:
        the total number of items that were updated
        Throws:
        SQLException - something happened trying to update
      • batch

        default int batch​(@NonNull
                          @NonNull SQLContext context,
                          @NonNull
                          @NonNull Collection<Map<String,​?>> items)
                   throws SQLException
        Performs a batch update over a Collection of Maps whose keys are column names and values of the column.
        Parameters:
        context - the context to perform this update statement on
        items - the items to use to fill in the values of the update statement
        Returns:
        the total number of items that were updated
        Throws:
        SQLException - something happened trying to update
      • batch

        default int batch​(@NonNull
                          @NonNull SQLContext context,
                          @NonNull
                          @NonNull Collection<Map<String,​?>> items,
                          int batchSize)
                   throws SQLException
        Performs a batch update over a Collection of Maps whose keys are column names and values of the column.
        Parameters:
        context - the context to perform this update statement on
        items - the items to use to fill in the values of the update statement
        batchSize - the size of the batch for updating the database
        Returns:
        the total number of items that were updated
        Throws:
        SQLException - something happened trying to update
      • update

        default int update​(@NonNull
                           @NonNull SQLContext context)
                    throws SQLException
        Performs the update using the given SQLContext
        Parameters:
        context - the context to perform this update statement on
        Returns:
        the number of rows updated
        Throws:
        SQLException - something happened trying to update
      • update

        default int update​(@NonNull
                           @NonNull SQLContext context,
                           @NonNull
                           @NonNull Map<String,​Object> values)
                    throws SQLException
        Performs the update using the given SQLContext filling in named value placeholders using the given Map of values.
        Parameters:
        context - the context to perform this update statement on
        values - the values to use to fill the query statement (by Index)
        Returns:
        the number of rows updated
        Throws:
        SQLException - something happened trying to update
      • update

        default int update​(@NonNull
                           @NonNull SQLContext context,
                           @NonNull
                           @NonNull List<Object> values)
                    throws SQLException
        Performs the update using the given SQLContext filling in indexed value placeholders using the given List of values.
        Parameters:
        context - the context to perform this update statement on
        values - the values to use to fill the query statement (by Index)
        Returns:
        the number of rows updated
        Throws:
        SQLException - something happened trying to update
      • update

        default <T> int update​(@NonNull
                               @NonNull SQLContext context,
                               @NonNull
                               T value,
                               @NonNull
                               @NonNull CheckedBiConsumer<? super T,​NamedPreparedStatement> statementFiller)
                        throws SQLException
        Performs the update s using the given SQLContext filling in value placeholders using the given value and the consumer to for filling the statement.
        Type Parameters:
        T - the type parameter
        Parameters:
        context - the context to perform this update statement on
        value - the values to use for updating
        statementFiller - the consumer to use to fill the prepared statement.
        Returns:
        the number of rows updated
        Throws:
        SQLException - something happened trying to update