Class: VertxSqlClient::SqlResult

Inherits:
Object
  • Object
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)

Instance Method Details

- (Array<String>) columnsNames

Get the names of columns in the PgResult.

Returns:

  • (Array<String>)
    the list of names of columns.


48
49
50
51
52
53
54
55
56
57
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_result.rb', line 48

def columns_names
  if !block_given?
    return @j_del.java_method(:columnsNames, []).call().to_a.map { |elt| elt }
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling columns_names()"
  end
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:



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

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

- (Fixnum) rowCount

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

The meaning depends on the executed statement:

  • INSERT: the number of rows inserted
  • DELETE: the number of rows deleted
  • UPDATE: the number of rows updated
  • SELECT: the number of rows retrieved

Returns:

  • (Fixnum)
    the count of affected rows.


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

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

- (Fixnum) size

Get the number of rows in the PgResult.

Returns:

  • (Fixnum)
    the count of rows.


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

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

- (Object) value

Get the result value.

Returns:

  • (Object)
    the result


82
83
84
85
86
87
88
89
90
91
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_result.rb', line 82

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