Example usage for java.sql Statement SUCCESS_NO_INFO

List of usage examples for java.sql Statement SUCCESS_NO_INFO

Introduction

In this page you can find the example usage for java.sql Statement SUCCESS_NO_INFO.

Prototype

int SUCCESS_NO_INFO

To view the source code for java.sql Statement SUCCESS_NO_INFO.

Click Source Link

Document

The constant indicating that a batch statement executed successfully but that no count of the number of rows it affected is available.

Usage

From source file:org.rhq.enterprise.server.purge.PurgeTemplate.java

private int evalDeletedRows(int[] results) {
    int total = 0, failed = 0;
    for (int result : results) {
        if (result == Statement.EXECUTE_FAILED) {
            failed++;//  w ww .  ja v  a2  s . c o m
        } else if (result == Statement.SUCCESS_NO_INFO) {
            // Pre v12 Oracle servers return -2 because they don't track batch update counts
            total++;
        } else {
            total += result;
        }
    }
    if (failed > 0) {
        LOG.warn(getEntityName() + ": " + failed + " row(s) not purged");
    }
    return total;
}