Class: ReactivePgClient::PgResult
- Inherits:
-
Object
- Object
- ReactivePgClient::PgResult
- Defined in:
- /Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/pg_result.rb
Overview
Represents the result of an operation on database.
Direct Known Subclasses
Instance Method Summary (collapse)
-
- (Array<String>) columns_names
Get the names of columns in the PgResult.
-
- (::ReactivePgClient::PgResult) next
Return the next available result or null, e.g for a simple query that executed multiple queries or for a batch result.
-
- (Fixnum) row_count
Get the number of the affected rows in the operation to this PgResult.
-
- (Fixnum) size
Get the number of rows in the PgResult.
-
- (Object) value
Get the result value.
Instance Method Details
- (Array<String>) columns_names
Get the names of columns in the PgResult.
35 36 37 38 39 40 |
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/pg_result.rb', line 35 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 |
- (::ReactivePgClient::PgResult) next
Return the next available result or
null
, e.g for a simple query that executed multiple queries or for
a batch result.
60 61 62 63 64 65 |
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/pg_result.rb', line 60 def next if !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:next, []).call(),::ReactivePgClient::PgResult, nil) end raise ArgumentError, "Invalid arguments when calling next()" end |
- (Fixnum) row_count
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
27 28 29 30 31 32 |
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/pg_result.rb', line 27 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 in the PgResult.
43 44 45 46 47 48 |
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/pg_result.rb', line 43 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.
51 52 53 54 55 56 |
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/pg_result.rb', line 51 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 |