Class: VertxSqlClient::SqlClient
- Inherits:
-
Object
- Object
- VertxSqlClient::SqlClient
show all
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_client.rb
Overview
Defines the client operations with a database server.
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary
(collapse)
Instance Method Summary
(collapse)
Class Method Details
+ (Boolean) accept?(obj)
21
22
23
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_client.rb', line 21
def @@j_api_type.accept?(obj)
obj.class == SqlClient
end
|
+ (Object) j_api_type
30
31
32
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_client.rb', line 30
def self.j_api_type
@@j_api_type
end
|
+ (Object) j_class
33
34
35
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_client.rb', line 33
def self.j_class
Java::IoVertxSqlclient::SqlClient.java_class
end
|
+ (Object) unwrap(obj)
27
28
29
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_client.rb', line 27
def @@j_api_type.unwrap(obj)
obj.j_del
end
|
+ (Object) wrap(obj)
24
25
26
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_client.rb', line 24
def @@j_api_type.wrap(obj)
SqlClient.new(obj)
end
|
Instance Method Details
- (void) close
This method returns an undefined value.
Close the client and release the associated resources.
57
58
59
60
61
62
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_client.rb', line 57
def close
if !block_given?
return @j_del.java_method(:close, []).call()
end
raise ArgumentError, "Invalid arguments when calling close()"
end
|
49
50
51
52
53
54
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-sql-client/sql_client.rb', line 49
def prepared_query(sql=nil)
if sql.class == String && !block_given?
return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:preparedQuery, [Java::java.lang.String.java_class]).call(sql),::VertxSqlClient::PreparedQuery,::VertxSqlClient::RowSet.j_api_type)
end
raise ArgumentError, "Invalid arguments when calling prepared_query(#{sql})"
end
|
Create a query, the
Query#execute method must be called to execute the query.
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_client.rb', line 39
def query(sql=nil)
if sql.class == String && !block_given?
return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:query, [Java::java.lang.String.java_class]).call(sql),::VertxSqlClient::Query,::VertxSqlClient::RowSet.j_api_type)
end
raise ArgumentError, "Invalid arguments when calling query(#{sql})"
end
|