All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.kenshoo.jooq.BulkExecutor Maven / Gradle / Ivy

Go to download

A Java persistence layer based on JOOQ for high performance and business flow support.

There is a newer version: 0.1.121-jooq-3.16.3
Show newest version
package com.kenshoo.jooq;

import org.jooq.Query;

/**
 * Created by khiloj on 3/23/16
 */
public class BulkExecutor {

    public static int updateTillNoRowsAffected(Query q) {
        int totalUpdated = 0;
        int numOfAffectedRows;

        do {
            numOfAffectedRows = q.execute();
            totalUpdated += numOfAffectedRows;
        }
        while (numOfAffectedRows != 0);
        return totalUpdated;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy