view src/main/java/nl/cwi/monetdb/mcl/responses/UpdateResponse.java @ 83:724a0061db63 embedded

Only some rare data types mapping is missing on the JDBC embedded connection. I will now be testing extensively, then adding these mappings to finish the JDBC embedded connection.
author Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
date Wed, 28 Dec 2016 17:50:04 +0000 (2016-12-28)
parents 7307caacc2d5
children 2b5e32efb1a4
line wrap: on
line source
package nl.cwi.monetdb.mcl.responses;

/**
 * The UpdateResponse represents an update statement response.  It
 * is issued on an UPDATE, INSERT or DELETE SQL statement.  This
 * response keeps a count field that represents the affected rows
 * and a field that contains the last inserted auto-generated ID, or
 * -1 if not applicable.<br />
 * <tt>&amp;2 0 -1</tt>
 */
public class UpdateResponse implements IResponse {

    private final int lastid;

    private final int count;

    public UpdateResponse(int lastid, int count) {
        // fill the blank finals
        this.lastid = lastid;
        this.count = count;
    }

    public int getLastid() {
        return lastid;
    }

    public int getCount() {
        return count;
    }

    @Override
    public void close() {
        // nothing to do here...
    }
}