Class List Method List File List

# Class: VertxSqlClient::SqlResult

Inherits:
  Object
  - Object
  - VertxSqlClient::SqlResult
  show all
Defined in:
  /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_result.rb

## Overview

Represents the result of an operation on database.

## Direct Known Subclasses

RowSet

## Instance Method Summary (collapse)

- - (Array<::VertxSqlClient::ColumnDescriptor>) column_descriptors
  Get the column descriptors in the SqlResult.
- - (Array<String>) columns_names
  Get the names of columns in the SqlResult.
- - (::VertxSqlClient::SqlResult) next
  Return the next available result or null, e.g for a simple query that executed multiple queries or for a batch result.
- - (Object) property(propertyKind = nil)
  Get the property with the specified PropertyKind.
- - (Fixnum) row_count
  Get the number of the affected rows in the operation to this SqlResult.
- - (Fixnum) size
  Get the number of rows retrieved in the SqlResult.
- - (Object) value
  Get the result value.

## Instance Method Details

### - (`Array<::VertxSqlClient::ColumnDescriptor>`) column_descriptors

Get the column descriptors in the SqlResult.

Returns:

- (`Array<::VertxSqlClient::ColumnDescriptor>`) —
  the list of column descriptors

Raises:

- (`ArgumentError`)

    37
    38
    39
    40
    41
    42
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_result.rb', line 37

    def column_descriptors
      if !block_given?
        return @j_del.java_method(:columnDescriptors, []).call().to_a.map { |elt| ::Vertx::Util::Utils.safe_create(elt,::VertxSqlClient::ColumnDescriptor) }
      end
      raise ArgumentError, "Invalid arguments when calling column_descriptors()"
    end

### - (`Array<String>`) columns_names

Get the names of columns in the SqlResult.

Returns:

- (`Array<String>`) —
  the list of names of columns.

Raises:

- (`ArgumentError`)

    29
    30
    31
    32
    33
    34
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_result.rb', line 29

    def columns_names
      if !block_given?
        return @j_del.java_method(:columnsNames, []).call().to_a.map { |elt| elt }
      end
      raise ArgumentError, "Invalid arguments when calling columns_names()"
    end

### - (`::VertxSqlClient::SqlResult`) next

Return the next available result or `null`, e.g for a simple query that executed multiple queries or for a batch result.

Returns:

- (`::VertxSqlClient::SqlResult`) —
  the next available result or `null` if none is available

Raises:

- (`ArgumentError`)

    71
    72
    73
    74
    75
    76
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_result.rb', line 71

    def next
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:next, []).call(),::VertxSqlClient::SqlResult, nil)
      end
      raise ArgumentError, "Invalid arguments when calling next()"
    end

### - (`Object`) property(propertyKind = nil)

Get the property with the specified PropertyKind.

Parameters:

- propertyKind (`::VertxSqlClient::PropertyKind`) (defaults to: `nil`) —
  the kind of the property

Returns:

- (`Object`) —
  the value of the property

Raises:

- (`ArgumentError`)

    54
    55
    56
    57
    58
    59
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_result.rb', line 54

    def property(propertyKind=nil)
      if propertyKind.class.method_defined?(:j_del) && !block_given?
        return ::Vertx::Util::Utils.from_object(@j_del.java_method(:property, [Java::IoVertxSqlclient::PropertyKind.java_class]).call(propertyKind.j_del))
      end
      raise ArgumentError, "Invalid arguments when calling property(#{propertyKind})"
    end

### - (`Fixnum`) row_count

Get the number of the affected rows in the operation to this SqlResult.

Returns:

- (`Fixnum`) —
  the count of affected rows.

Raises:

- (`ArgumentError`)

    21
    22
    23
    24
    25
    26
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_result.rb', line 21

    def row_count
      if !block_given?
        return @j_del.java_method(:rowCount, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling row_count()"
    end

### - (`Fixnum`) size

Get the number of rows retrieved in the SqlResult.

Returns:

- (`Fixnum`) —
  the count of rows.

Raises:

- (`ArgumentError`)

    45
    46
    47
    48
    49
    50
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_result.rb', line 45

    def size
      if !block_given?
        return @j_del.java_method(:size, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling size()"
    end

### - (`Object`) value

Get the result value.

Returns:

- (`Object`) —
  the result

Raises:

- (`ArgumentError`)

    62
    63
    64
    65
    66
    67
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_result.rb', line 62

    def value
      if !block_given?
        return @j_arg_T.wrap(@j_del.java_method(:value, []).call())
      end
      raise ArgumentError, "Invalid arguments when calling value()"
    end