io.vertx.ext.sql

## Class UpdateResult

- java.lang.Object
- - io.vertx.ext.sql.UpdateResult

-     public class UpdateResult
      extends Object

  Represents the result of an update/insert/delete operation on the database.

  The number of rows updated is available with `getUpdated()` and any generated keys are available with `getKeys()`.

  Author:
    Tim Fox

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UpdateResult()` Default constructor
    `UpdateResult(int updated, JsonArray keys)` Constructor
    `UpdateResult(JsonObject json)` Constructor from JSON
    `UpdateResult(UpdateResult other)` Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `JsonArray` | `getKeys()` Get any generated keys
    `int` | `getUpdated()` Get the number of rows updated
    `int` | `hashCode()`
    `UpdateResult` | `setKeys(JsonArray keys)`
    `UpdateResult` | `setUpdated(int updated)`
    `JsonObject` | `toJson()` Convert to JSON

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UpdateResult

          public UpdateResult()

      Default constructor

    - #### UpdateResult

          public UpdateResult(UpdateResult other)

      Copy constructor
      Parameters:
        `other` - the result to copy

    - #### UpdateResult

          public UpdateResult(JsonObject json)

      Constructor from JSON
      Parameters:
        `json` - the json

    - #### UpdateResult

          public UpdateResult(int updated,
                              JsonArray keys)

      Constructor
      Parameters:
        `updated` - number of rows updated
        `keys` - any generated keys

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the json

    - #### getUpdated

          public int getUpdated()

      Get the number of rows updated
      Returns:
        number of rows updated

    - #### setUpdated

          public UpdateResult setUpdated(int updated)

    - #### getKeys

          public JsonArray getKeys()

      Get any generated keys
      Returns:
        generated keys

    - #### setKeys

          public UpdateResult setKeys(JsonArray keys)

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2017. All rights reserved.