Class: VertxSqlClient::Tuple
- Inherits:
-
Object
- Object
- VertxSqlClient::Tuple
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb
Overview
A general purpose tuple.
Direct Known Subclasses
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
- + (Object) j_api_type
- + (Object) j_class
-
+ (Object) JSON_NULL
The JSON null literal value.
-
+ (::VertxSqlClient::Tuple) of(elt1 = nil, elt2 = nil, elt3 = nil, elt4 = nil, elt5 = nil, elt6 = nil)
Create a tuple of six elements.
-
+ (::VertxSqlClient::Tuple) tuple(elements = nil)
Create a tuple with the provided elements list.
- + (Object) unwrap(obj)
-
+ (::VertxSqlClient::Tuple) wrap(list = nil)
Wrap the provided list with a tuple.
Instance Method Summary (collapse)
-
- (self) add_boolean(value = nil)
Add a boolean value at the end of the tuple.
-
- (self) add_buffer(value = nil)
Add a buffer value at the end of the tuple.
-
- (self) add_double(value = nil)
Add a double value at the end of the tuple.
-
- (self) add_float(value = nil)
Add a float value at the end of the tuple.
-
- (self) add_integer(value = nil)
Add an integer value at the end of the tuple.
-
- (self) add_long(value = nil)
Add a long value at the end of the tuple.
-
- (self) add_short(value = nil)
Add a short value at the end of the tuple.
-
- (self) add_string(value = nil)
Add a string value at the end of the tuple.
-
- (self) add_value(value = nil)
Add an object value at the end of the tuple.
- - (void) clear
-
- (String) deep_to_string
A String containing the toString value of each element, separated by a comma (,) character.
- - (Object) get(type = nil, pos = nil)
-
- (true, false) get_boolean?(pos = nil)
Get a boolean value at pos.
-
- (::Vertx::Buffer) get_buffer(pos = nil)
Get a buffer value at pos.
-
- (Float) get_double(pos = nil)
Get a double value at pos.
-
- (Float) get_float(pos = nil)
Get a float value at pos.
-
- (Fixnum) get_integer(pos = nil)
Get an integer value at pos.
-
- (Fixnum) get_long(pos = nil)
Get a long value at pos.
-
- (Fixnum) get_short(pos = nil)
Get a short value at pos.
-
- (String) get_string(pos = nil)
Get a string value at pos.
-
- (Object) get_value(pos = nil)
Get an object value at pos.
-
- (Fixnum) size
The tuple size.
Class Method Details
+ (Boolean) accept?(obj)
18 19 20 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 18 def @@j_api_type.accept?(obj) obj.class == Tuple end |
+ (Object) j_api_type
27 28 29 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 27 def self.j_api_type @@j_api_type end |
+ (Object) j_class
30 31 32 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 30 def self.j_class Java::IoVertxSqlclient::Tuple.java_class end |
+ (Object) JSON_NULL
The JSON null literal value.
It is used to distinguish a JSON null literal value from the Java
It is used to distinguish a JSON null literal value from the Java
null
value. This is only
used when the database supports JSON types.
286 287 288 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 286 def self.JSON_NULL ::Vertx::Util::Utils.from_object(Java::IoVertxSqlclient::Tuple.JSON_NULL) end |
+ (::VertxSqlClient::Tuple) of(elt1 = nil, elt2 = nil, elt3 = nil, elt4 = nil, elt5 = nil, elt6 = nil)
Create a tuple of six elements.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 65 def self.of(elt1=nil,elt2=nil,elt3=nil,elt4=nil,elt5=nil,elt6=nil) if ::Vertx::Util::unknown_type.accept?(elt1) && !block_given? && elt2 == nil && elt3 == nil && elt4 == nil && elt5 == nil && elt6 == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxSqlclient::Tuple.java_method(:of, [Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(elt1)),::VertxSqlClient::Tuple) elsif ::Vertx::Util::unknown_type.accept?(elt1) && ::Vertx::Util::unknown_type.accept?(elt2) && !block_given? && elt3 == nil && elt4 == nil && elt5 == nil && elt6 == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxSqlclient::Tuple.java_method(:of, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(elt1),::Vertx::Util::Utils.to_object(elt2)),::VertxSqlClient::Tuple) elsif ::Vertx::Util::unknown_type.accept?(elt1) && ::Vertx::Util::unknown_type.accept?(elt2) && ::Vertx::Util::unknown_type.accept?(elt3) && !block_given? && elt4 == nil && elt5 == nil && elt6 == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxSqlclient::Tuple.java_method(:of, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(elt1),::Vertx::Util::Utils.to_object(elt2),::Vertx::Util::Utils.to_object(elt3)),::VertxSqlClient::Tuple) elsif ::Vertx::Util::unknown_type.accept?(elt1) && ::Vertx::Util::unknown_type.accept?(elt2) && ::Vertx::Util::unknown_type.accept?(elt3) && ::Vertx::Util::unknown_type.accept?(elt4) && !block_given? && elt5 == nil && elt6 == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxSqlclient::Tuple.java_method(:of, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(elt1),::Vertx::Util::Utils.to_object(elt2),::Vertx::Util::Utils.to_object(elt3),::Vertx::Util::Utils.to_object(elt4)),::VertxSqlClient::Tuple) elsif ::Vertx::Util::unknown_type.accept?(elt1) && ::Vertx::Util::unknown_type.accept?(elt2) && ::Vertx::Util::unknown_type.accept?(elt3) && ::Vertx::Util::unknown_type.accept?(elt4) && ::Vertx::Util::unknown_type.accept?(elt5) && !block_given? && elt6 == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxSqlclient::Tuple.java_method(:of, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(elt1),::Vertx::Util::Utils.to_object(elt2),::Vertx::Util::Utils.to_object(elt3),::Vertx::Util::Utils.to_object(elt4),::Vertx::Util::Utils.to_object(elt5)),::VertxSqlClient::Tuple) elsif ::Vertx::Util::unknown_type.accept?(elt1) && ::Vertx::Util::unknown_type.accept?(elt2) && ::Vertx::Util::unknown_type.accept?(elt3) && ::Vertx::Util::unknown_type.accept?(elt4) && ::Vertx::Util::unknown_type.accept?(elt5) && ::Vertx::Util::unknown_type.accept?(elt6) && !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxSqlclient::Tuple.java_method(:of, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(elt1),::Vertx::Util::Utils.to_object(elt2),::Vertx::Util::Utils.to_object(elt3),::Vertx::Util::Utils.to_object(elt4),::Vertx::Util::Utils.to_object(elt5),::Vertx::Util::Utils.to_object(elt6)),::VertxSqlClient::Tuple) end raise ArgumentError, "Invalid arguments when calling of(#{elt1},#{elt2},#{elt3},#{elt4},#{elt5},#{elt6})" end |
+ (::VertxSqlClient::Tuple) tuple(elements = nil)
Create a tuple with the provided
elements
list.
The elements
list is not modified.
38 39 40 41 42 43 44 45 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 38 def self.tuple(elements=nil) if !block_given? && elements == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxSqlclient::Tuple.java_method(:tuple, []).call(),::VertxSqlClient::Tuple) elsif elements.class == Array && !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxSqlclient::Tuple.java_method(:tuple, [Java::JavaUtil::List.java_class]).call(elements.map { |element| ::Vertx::Util::Utils.to_object(element) }),::VertxSqlClient::Tuple) end raise ArgumentError, "Invalid arguments when calling tuple(#{elements})" end |
+ (Object) unwrap(obj)
24 25 26 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 24 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (::VertxSqlClient::Tuple) wrap(list = nil)
Wrap the provided
The list is not copied and is used as store for tuple elements.
list
with a tuple.
The list is not copied and is used as store for tuple elements.
51 52 53 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 51 def @@j_api_type.wrap(obj) Tuple.new(obj) end |
Instance Method Details
- (self) add_boolean(value = nil)
Add a boolean value at the end of the tuple.
175 176 177 178 179 180 181 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 175 def add_boolean(value=nil) if (value.class == TrueClass || value.class == FalseClass) && !block_given? @j_del.java_method(:addBoolean, [Java::JavaLang::Boolean.java_class]).call(value) return self end raise ArgumentError, "Invalid arguments when calling add_boolean(#{value})" end |
- (self) add_buffer(value = nil)
Add a buffer value at the end of the tuple.
245 246 247 248 249 250 251 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 245 def add_buffer(value=nil) if value.class.method_defined?(:j_del) && !block_given? @j_del.java_method(:addBuffer, [Java::IoVertxCoreBuffer::Buffer.java_class]).call(value.j_del) return self end raise ArgumentError, "Invalid arguments when calling add_buffer(#{value})" end |
- (self) add_double(value = nil)
Add a double value at the end of the tuple.
225 226 227 228 229 230 231 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 225 def add_double(value=nil) if value.class == Float && !block_given? @j_del.java_method(:addDouble, [Java::JavaLang::Double.java_class]).call(::Vertx::Util::Utils.to_double(value)) return self end raise ArgumentError, "Invalid arguments when calling add_double(#{value})" end |
- (self) add_float(value = nil)
Add a float value at the end of the tuple.
215 216 217 218 219 220 221 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 215 def add_float(value=nil) if value.class == Float && !block_given? @j_del.java_method(:addFloat, [Java::JavaLang::Float.java_class]).call(::Vertx::Util::Utils.to_float(value)) return self end raise ArgumentError, "Invalid arguments when calling add_float(#{value})" end |
- (self) add_integer(value = nil)
Add an integer value at the end of the tuple.
195 196 197 198 199 200 201 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 195 def add_integer(value=nil) if value.class == Fixnum && !block_given? @j_del.java_method(:addInteger, [Java::JavaLang::Integer.java_class]).call(::Vertx::Util::Utils.to_integer(value)) return self end raise ArgumentError, "Invalid arguments when calling add_integer(#{value})" end |
- (self) add_long(value = nil)
Add a long value at the end of the tuple.
205 206 207 208 209 210 211 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 205 def add_long(value=nil) if value.class == Fixnum && !block_given? @j_del.java_method(:addLong, [Java::JavaLang::Long.java_class]).call(value) return self end raise ArgumentError, "Invalid arguments when calling add_long(#{value})" end |
- (self) add_short(value = nil)
Add a short value at the end of the tuple.
185 186 187 188 189 190 191 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 185 def add_short(value=nil) if value.class == Fixnum && !block_given? @j_del.java_method(:addShort, [Java::JavaLang::Short.java_class]).call(::Vertx::Util::Utils.to_short(value)) return self end raise ArgumentError, "Invalid arguments when calling add_short(#{value})" end |
- (self) add_string(value = nil)
Add a string value at the end of the tuple.
235 236 237 238 239 240 241 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 235 def add_string(value=nil) if value.class == String && !block_given? @j_del.java_method(:addString, [Java::java.lang.String.java_class]).call(value) return self end raise ArgumentError, "Invalid arguments when calling add_string(#{value})" end |
- (self) add_value(value = nil)
Add an object value at the end of the tuple.
165 166 167 168 169 170 171 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 165 def add_value(value=nil) if ::Vertx::Util::unknown_type.accept?(value) && !block_given? @j_del.java_method(:addValue, [Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(value)) return self end raise ArgumentError, "Invalid arguments when calling add_value(#{value})" end |
- (void) clear
This method returns an undefined value.
269 270 271 272 273 274 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 269 def clear if !block_given? return @j_del.java_method(:clear, []).call() end raise ArgumentError, "Invalid arguments when calling clear()" end |
- (String) deep_to_string
Returns A String containing the toString value of each element, separated by a comma (,) character
276 277 278 279 280 281 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 276 def deep_to_string if !block_given? return @j_del.java_method(:deepToString, []).call() end raise ArgumentError, "Invalid arguments when calling deep_to_string()" end |
- (Object) get(type = nil, pos = nil)
255 256 257 258 259 260 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 255 def get(type=nil,pos=nil) if type.class == Class && pos.class == Fixnum && !block_given? return ::Vertx::Util::Utils.v_type_of(type).wrap(@j_del.java_method(:get, [Java::JavaLang::Class.java_class,Java::int.java_class]).call(::Vertx::Util::Utils.j_class_of(type),pos)) end raise ArgumentError, "Invalid arguments when calling get(#{type},#{pos})" end |
- (true, false) get_boolean?(pos = nil)
Get a boolean value at
pos
.
93 94 95 96 97 98 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 93 def get_boolean?(pos=nil) if pos.class == Fixnum && !block_given? return @j_del.java_method(:getBoolean, [Java::int.java_class]).call(pos) end raise ArgumentError, "Invalid arguments when calling get_boolean?(#{pos})" end |
- (::Vertx::Buffer) get_buffer(pos = nil)
Get a buffer value at
pos
.
156 157 158 159 160 161 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 156 def get_buffer(pos=nil) if pos.class == Fixnum && !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:getBuffer, [Java::int.java_class]).call(pos),::Vertx::Buffer) end raise ArgumentError, "Invalid arguments when calling get_buffer(#{pos})" end |
- (Float) get_double(pos = nil)
Get a double value at
pos
.
138 139 140 141 142 143 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 138 def get_double(pos=nil) if pos.class == Fixnum && !block_given? return @j_del.java_method(:getDouble, [Java::int.java_class]).call(pos) end raise ArgumentError, "Invalid arguments when calling get_double(#{pos})" end |
- (Float) get_float(pos = nil)
Get a float value at
pos
.
129 130 131 132 133 134 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 129 def get_float(pos=nil) if pos.class == Fixnum && !block_given? return @j_del.java_method(:getFloat, [Java::int.java_class]).call(pos) end raise ArgumentError, "Invalid arguments when calling get_float(#{pos})" end |
- (Fixnum) get_integer(pos = nil)
Get an integer value at
pos
.
111 112 113 114 115 116 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 111 def get_integer(pos=nil) if pos.class == Fixnum && !block_given? return @j_del.java_method(:getInteger, [Java::int.java_class]).call(pos) end raise ArgumentError, "Invalid arguments when calling get_integer(#{pos})" end |
- (Fixnum) get_long(pos = nil)
Get a long value at
pos
.
120 121 122 123 124 125 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 120 def get_long(pos=nil) if pos.class == Fixnum && !block_given? return @j_del.java_method(:getLong, [Java::int.java_class]).call(pos) end raise ArgumentError, "Invalid arguments when calling get_long(#{pos})" end |
- (Fixnum) get_short(pos = nil)
Get a short value at
pos
.
102 103 104 105 106 107 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 102 def get_short(pos=nil) if pos.class == Fixnum && !block_given? return @j_del.java_method(:getShort, [Java::int.java_class]).call(pos) end raise ArgumentError, "Invalid arguments when calling get_short(#{pos})" end |
- (String) get_string(pos = nil)
Get a string value at
pos
.
147 148 149 150 151 152 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 147 def get_string(pos=nil) if pos.class == Fixnum && !block_given? return @j_del.java_method(:getString, [Java::int.java_class]).call(pos) end raise ArgumentError, "Invalid arguments when calling get_string(#{pos})" end |
- (Object) get_value(pos = nil)
Get an object value at
pos
.
84 85 86 87 88 89 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 84 def get_value(pos=nil) if pos.class == Fixnum && !block_given? return ::Vertx::Util::Utils.from_object(@j_del.java_method(:getValue, [Java::int.java_class]).call(pos)) end raise ArgumentError, "Invalid arguments when calling get_value(#{pos})" end |
- (Fixnum) size
Returns the tuple size
262 263 264 265 266 267 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/tuple.rb', line 262 def size if !block_given? return @j_del.java_method(:size, []).call() end raise ArgumentError, "Invalid arguments when calling size()" end |